Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] ASAN tests fail when using Go1.20+ #35337

Closed
zeroshade opened this issue Apr 25, 2023 · 0 comments · Fixed by #35338
Closed

[Go] ASAN tests fail when using Go1.20+ #35337

zeroshade opened this issue Apr 25, 2023 · 0 comments · Fixed by #35338
Assignees
Milestone

Comments

@zeroshade
Copy link
Member

Describe the bug, including details regarding any error messages, version, and platform.

When using Go1.20+ and running the unit tests with the -asan flag, several tests fail with crashes like the following:

==3737513==ERROR: AddressSanitizer: unknown-crash on address 0x10c000bfd6a0 at pc 0x000000c375b4 bp 0x000000000000 sp 0x10c0004158a8
READ of size 24 at 0x10c000bfd6a0 thread T4
    #0 0xc375b3  (/tmp/go-build2991846278/b479/ipc.test+0xc375b3)

Address 0x10c000bfd6a0 is a wild pointer inside of access range of size 0x000000000018.
SUMMARY: AddressSanitizer: unknown-crash (/tmp/go-build2991846278/b479/ipc.test+0xc375b3) 
Shadow bytes around the buggy address:
  0x021880177a80: 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7
  0x021880177a90: 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7
  0x021880177aa0: 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7
  0x021880177ab0: 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7
  0x021880177ac0: 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7 00 00 f7 f7
=>0x021880177ad0: 00 00 f7 f7[00]00 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
  0x021880177ae0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
  0x021880177af0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
  0x021880177b00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
  0x021880177b10: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
  0x021880177b20: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
Thread T4 created by T2 here:
    #0 0x7ff2bbdf3207 in __interceptor_pthread_create /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:207
    #1 0xdd54ed in _cgo_try_pthread_create (/tmp/go-build2991846278/b479/ipc.test+0xdd54ed)
    #2 0x7ff2924e89cf  (<unknown module>)
    #3 0x41b58ab2  (<unknown module>)

Thread T2 created by T0 here:
    #0 0x7ff2bbdf3207 in __interceptor_pthread_create /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:207
    #1 0xdd54ed in _cgo_try_pthread_create (/tmp/go-build2991846278/b479/ipc.test+0xdd54ed)
    #2 0x7ffc22979c9f  ([stack]+0x1fc9f)
    #3 0x7ffc22979cdf  ([stack]+0x1fcdf)
    #4 0x111fd9f  (/tmp/go-build2991846278/b479/ipc.test+0x111fd9f)

Component(s)

Go

zeroshade added a commit to zeroshade/arrow that referenced this issue Apr 25, 2023
kou added a commit that referenced this issue Apr 28, 2023
### Rationale for this change
Fixing crashes when using ASAN to run unit tests under Go1.20+, requires features that were only added in go1.20. For versions <=go.19, the code remains unchanged.

The only way to properly test these changes would be to increase the matrix of jobs for Go, but we already have quite a few jobs. @ assignUser Do you have any issues with adding go1.20 (or maybe just telling it to use "latest") as another set of Go jobs to the GHA config?
* Closes: #35337

Lead-authored-by: Matt Topol <zotthewizard@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 13.0.0 milestone Apr 28, 2023
@zeroshade zeroshade modified the milestones: 13.0.0, 12.0.0 Apr 28, 2023
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
### Rationale for this change
Fixing crashes when using ASAN to run unit tests under Go1.20+, requires features that were only added in go1.20. For versions <=go.19, the code remains unchanged.

The only way to properly test these changes would be to increase the matrix of jobs for Go, but we already have quite a few jobs. @ assignUser Do you have any issues with adding go1.20 (or maybe just telling it to use "latest") as another set of Go jobs to the GHA config?
* Closes: apache#35337

Lead-authored-by: Matt Topol <zotthewizard@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
### Rationale for this change
Fixing crashes when using ASAN to run unit tests under Go1.20+, requires features that were only added in go1.20. For versions <=go.19, the code remains unchanged.

The only way to properly test these changes would be to increase the matrix of jobs for Go, but we already have quite a few jobs. @ assignUser Do you have any issues with adding go1.20 (or maybe just telling it to use "latest") as another set of Go jobs to the GHA config?
* Closes: apache#35337

Lead-authored-by: Matt Topol <zotthewizard@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@raulcd raulcd modified the milestones: 13.0.0, 12.0.1 May 16, 2023
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
### Rationale for this change
Fixing crashes when using ASAN to run unit tests under Go1.20+, requires features that were only added in go1.20. For versions <=go.19, the code remains unchanged.

The only way to properly test these changes would be to increase the matrix of jobs for Go, but we already have quite a few jobs. @ assignUser Do you have any issues with adding go1.20 (or maybe just telling it to use "latest") as another set of Go jobs to the GHA config?
* Closes: apache#35337

Lead-authored-by: Matt Topol <zotthewizard@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
raulcd pushed a commit that referenced this issue May 30, 2023
### Rationale for this change
Fixing crashes when using ASAN to run unit tests under Go1.20+, requires features that were only added in go1.20. For versions <=go.19, the code remains unchanged.

The only way to properly test these changes would be to increase the matrix of jobs for Go, but we already have quite a few jobs. @ assignUser Do you have any issues with adding go1.20 (or maybe just telling it to use "latest") as another set of Go jobs to the GHA config?
* Closes: #35337

Lead-authored-by: Matt Topol <zotthewizard@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants