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

testatomic sometime segfaults on Ubuntu arm64 builders #5748

Closed
seb128 opened this issue Jun 3, 2022 · 1 comment
Closed

testatomic sometime segfaults on Ubuntu arm64 builders #5748

seb128 opened this issue Jun 3, 2022 · 1 comment

Comments

@seb128
Copy link

seb128 commented Jun 3, 2022

On the current Ubuntu Kinetic serie, the 2.0.22 build fails on our arm64 builders due a segfault in testatomic. The error is not consistent, tweaking the build to call it under gdb it sometime work and next try success on the same machine

Build log https://launchpadlibrarian.net/605075249/buildlog_ubuntu-kinetic-arm64.libsdl2_2.0.22+dfsg-4ubuntu3.6_BUILDING.txt.gz

INFO: 
spin lock---------------------------------------

INFO: AtomicLock                   lock=1
INFO: AtomicUnlock                 lock=0
INFO: 
atomic -----------------------------------------

INFO: AtomicSet(10)        tfret=TRUE val=10
INFO: AtomicAdd(10)        tfret=TRUE val=20
INFO: AtomicIncRef()       tfret=TRUE val=1
INFO: AtomicIncRef()       tfret=TRUE val=2
INFO: AtomicDecRef()       tfret=TRUE val=1
INFO: AtomicDecRef()       tfret=TRUE val=0
INFO: AtomicCAS()          tfret=TRUE val=10
INFO: AtomicCAS()          tfret=TRUE val=20
INFO: 
epic test---------------------------------------

INFO: Size asserted to be >= 32-bit
INFO: Check static initializer
INFO: Test negative values
INFO: Verify maximum value
INFO: Test compare and exchange
INFO: Test Add
INFO: Test Add (Negative values)
INFO: Reset before count down test
INFO: Counting down from 2147483647, Expect 47 remaining
INFO: Thread subtracting 100 10737418 times
[New Thread 0xfffff6b8f060 (LWP 28956)]
INFO: Thread subtracting 100 10737418 times
[New Thread 0xfffff637f060 (LWP 28957)]
[Thread 0xfffff6b8f060 (LWP 28956) exited]
INFO: Finished in 0.938000 sec
INFO: Atomic 47 Non-Atomic 105733847
INFO: 
FIFO test---------------------------------------

INFO: Mode: LockFree
INFO: Starting 4 readers
[Thread 0xfffff637f060 (LWP 28957) exited]
[New Thread 0xfffff5b6f060 (LWP 28958)]
[New Thread 0xfffff535f060 (LWP 28959)]
[New Thread 0xfffff4b4f060 (LWP 28960)]
[New Thread 0xfffff433f060 (LWP 28961)]
INFO: Starting 4 writers
[New Thread 0xfffff3b2f060 (LWP 28962)]
[New Thread 0xfffff331f060 (LWP 28963)]
[New Thread 0xfffff2b0f060 (LWP 28964)]
[New Thread 0xfffff22ff060 (LWP 28965)]
[New Thread 0xfffff1aef060 (LWP 28966)]
[Thread 0xfffff331f060 (LWP 28963) exited]
[Thread 0xfffff22ff060 (LWP 28965) exited]
[Thread 0xfffff2b0f060 (LWP 28964) exited]
INFO: Finished in 2.452000 sec
INFO: 
INFO: Writer 0 wrote 1000000 events, had 2124 waits
INFO: Writer 1 wrote 1000000 events, had 2172 waits
INFO: Writer 2 wrote 1000000 events, had 2179 waits
INFO: Writer 3 wrote 1000000 events, had 2151 waits
INFO: Writers wrote 4000000 total events
INFO: 
INFO: Reader 0 read 1000625 events, had 2276 waits
INFO:   { 251107, 247128, 247428, 254962 }
INFO: Reader 1 read 1003625 events, had 2273 waits
INFO:   { 255642, 247382, 250705, 249896 }
INFO: Reader 2 read 1020974 events, had 2351 waits
INFO:   { 254639, 256773, 252382, 257180 }
INFO: Reader 3 read 974776 events, had 2228 waits
INFO:   { 238612, 248717, 249485, 237962 }
INFO: Readers read 4000000 total events
[Thread 0xfffff1aef060 (LWP 28966) exited]
[Thread 0xfffff3b2f060 (LWP 28962) exited]
[Thread 0xfffff433f060 (LWP 28961) exited]
[Thread 0xfffff4b4f060 (LWP 28960) exited]
[Thread 0xfffff535f060 (LWP 28959) exited]

Thread 1 "testatomic" received signal SIGSEGV, Segmentation fault.
__run_exit_handlers (status=0, listp=0xfffff7e0c730 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:90
90	./stdlib/exit.c: No such file or directory.

Thread 4 (Thread 0xfffff5b6f060 (LWP 28958) "FIFOWatcher"):
#0  0x0000fffff7d21928 in __GI___clock_nanosleep (clock_id=<optimized out>, clock_id@entry=0, flags=flags@entry=0, req=req@entry=0xfffff5b6e618, rem=rem@entry=0xfffff5b6e628) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x0000fffff7d26aec in __GI___nanosleep (req=req@entry=0xfffff5b6e618, rem=rem@entry=0xfffff5b6e628) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x0000fffff7f2eb0c in SDL_Delay_REAL (ms=<optimized out>) at ./src/timer/unix/SDL_systimer.c:220
#3  0x0000fffff7e49fac in SDL_AtomicLock_REAL (lock=0xffffffffec28) at ./src/atomic/SDL_spinlock.c:171
#4  0x0000aaaaaaaab818 in FIFO_Watcher (_data=0xffffffffaaa8) at ../../test/testatomic.c:574
#5  0x0000fffff7f23254 in SDL_RunThread (thread=0xaaaaaaad0400) at ./src/thread/SDL_thread.c:275
#6  RunThread (data=0xaaaaaaad0400) at ./src/thread/pthread/SDL_systhread.c:77
#7  0x0000fffff7ced5c8 in start_thread (arg=0x0) at ./nptl/pthread_create.c:442
#8  0x0000fffff7d55d1c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79

Thread 1 (Thread 0xfffff7c64460 (LWP 28954) "testatomic"):
#0  __run_exit_handlers (status=0, listp=0xfffff7e0c730 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:90
#1  0x0000fffff7cacf0c in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#2  0x0000fffff7c97400 in __libc_start_call_main (main=main@entry=0xaaaaaaaaad40 <main>, argc=argc@entry=1, argv=argv@entry=0xffffffffee98) at ../sysdeps/nptl/libc_start_call_main.h:74
#3  0x0000fffff7c974cc in __libc_start_main_impl (main=0xaaaaaaaaad40 <main>, argc=1, argv=0xffffffffee98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:392
#4  0x0000aaaaaaaab270 in _start ()
@slouken slouken closed this as completed in 345efdc Jun 3, 2022
@slouken
Copy link
Collaborator

slouken commented Jun 3, 2022

Good catch, thanks!

sezero pushed a commit to sezero/SDL that referenced this issue Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants