With current trunk I run into: ... Running /data/gdb_versions/devel/src/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp ... PASS: gdb.threads/non-ldr-exc-2.exp: successfully compiled posix threads test case PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=on: continue to breakpoint: break-here PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=on: thread 2 PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=on: single thread left PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=on: continue over exec PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: continue to breakpoint: break-here PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: single thread left PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: set scheduler-locking on ERROR: GDB process no longer exists UNRESOLVED: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: continue over exec PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=off: continue to breakpoint: break-here PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=off: single thread left PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=off,non-stop=off: continue over exec ... In more detail: ... (gdb) PASS: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: set scheduler-locking on continue^M Continuing.^M [New LWP 16332]^M process 16332 is executing new program: /data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/non-ldr-exc-2/non-ldr-exc-2^M gdb: ../nptl/pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.^M ERROR: GDB process no longer exists GDB process exited with wait status 16319 exp48 0 0 CHILDKILLED SIGABRT SIGABRT UNRESOLVED: gdb.threads/non-ldr-exc-2.exp: lock-sched=on,non-stop=off: continue over exec ...
Not reproducible with couple of individual test runs. Nothing triggers with -fsanitize=address. Nothing triggers with -fsanitize=thread.
This may have been me running into glibc PR23275. This is fixed in version 2.29, and openSUSE Leap 15.1 is using 2.26. I've filed a backport request: https://bugzilla.suse.com/show_bug.cgi?id=1166643 .
My theory is that this is not a gdb bug. So, marking resolved-invalid.