Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6966

[Go] 32bit memset is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.16.0
    • Component/s: Go

      Description

      If you use a function that calls `memset.Set`, the implementation on a 32 bit machine seems to be unset. This happened in our 32 bit build here:

      https://circleci.com/gh/influxdata/influxdb/66112#tests/containers/2

      goroutine 66 [running]:goroutine 66 [running]:testing.tRunner.func1(0x9e1f2c0) /usr/local/go/src/testing/testing.go:830 +0x30epanic(0x899cb40, 0x9403c40) /usr/local/go/src/runtime/panic.go:522 +0x16egithub.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/memory.Set(...) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/memory/memory.go:25github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array.(*builder).init(0x9e44990, 0x20) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array/builder.go:101 +0xc7github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array.(*Int64Builder).init(0x9e44990, 0x20) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array/numericbuilder.gen.go:102 +0x2fgithub.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array.(*Int64Builder).Resize(0x9e44990, 0x2) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array/numericbuilder.gen.go:125 +0x42github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array.(*builder).reserve(0x9e44990, 0x1, 0x9c52464) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array/builder.go:138 +0x72github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array.(*Int64Builder).Reserve(0x9e44990, 0x1) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/apache/arrow/go/arrow/array/numericbuilder.gen.go:113 +0x51github.com/influxdata/influxdb/vendor/github.com/influxdata/flux/arrow.NewInt(0x9e4a770, 0x1, 0x1, 0x0, 0x89f0360) /root/go/src/github.com/influxdata/influxdb/vendor/github.com/influxdata/flux/arrow/int.go:10 +0x6cgithub.com/influxdata/influxdb/storage/reads.(*floatTable).advance(0x9e42070, 0x0) /root/go/src/github.com/influxdata/influxdb/storage/reads/table.gen.go:91 +0x7egithub.com/influxdata/influxdb/storage/reads.newFloatTable(0x9e17740, 0xe521a160, 0x9e1b8c0, 0x0, 0x0, 0x1e, 0x0, 0x8c13be0, 0x9e448a0, 0x9e448d0, ...) /root/go/src/github.com/influxdata/influxdb/storage/reads/table.gen.go:47 +0x1c2github.com/influxdata/influxdb/storage/reads.(*filterIterator).handleRead(0x9e22840, 0x9e0d1a0, 0x8c0ce00, 0x9e48780, 0x0, 0x0) /root/go/src/github.com/influxdata/influxdb/storage/reads/reader.go:177 +0x755github.com/influxdata/influxdb/storage/reads.(*filterIterator).Do(0x9e22840, 0x9e0d170, 0x9c40070, 0x0) /root/go/src/github.com/influxdata/influxdb/storage/reads/reader.go:140 +0x138github.com/influxdata/influxdb/storage/reads_test.TestDuplicateKeys_ReadFilter(0x9e1f2c0) /root/go/src/github.com/influxdata/influxdb/storage/reads/reader_test.go:89 +0x1dftesting.tRunner(0x9e1f2c0, 0x8ad44e4) /usr/local/go/src/testing/testing.go:865 +0x97created by testing.(*T).Run /usr/local/go/src/testing/testing.go:916 +0x2b2
      

      I added a print statement at where memset happened to print the function that was being used and got this:

      <nil> [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 0
      

      If I set memset with a default, the code that calls into this works fine.
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jsternberg Jonathan A Sternberg
                Reporter:
                jsternberg Jonathan A Sternberg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h