Don't you love it when clang test suite fails because of pthread_create bad address or something and the stack trace points to glibc :akkoderp:

So it's like is clang breaking (scary) or it's glibc (scarier)

Though it only happens with clang-built-clang (and not with gcc-built-clang) so my guess is that it's clang that is broken but

Okay it seems to not happen when I set LIBCLANG_NOTHREADS so probably something happens during thread creation

Also, if I single-step through it with gdb then the problem's gone...

But it still happens if I just press continue through all the breakpoints

So, race condition?

@koakuma have you tried running it non-single-step but one thread at a time? Iirc scheduler-locking is the keyword to look for and that will obviously require some manual action when the thread you are running starts to wait on some other thread (e.g. break on futex(FUTEX_WAIT) and then manually switch to some other thread that's not doing that)

@robryk With scheduler-locking set to on, I don't see any difference (crashes if breakpoint is not set)

@koakuma wait, it doesn't crash with scheduler locking and breakpoint set? That shouldn't make any difference, so if so I'm wrong somewhere and I don't know where.

@robryk It's more like that scheduler-locking does not make any difference at all

Only setting breakpoints work

Follow

@koakuma hm~ so it might be broken/broken for early enough stuff on sparc64. (Or I'm wrong about how it works.)

/me goes to read docs

@koakuma

Documentation claims that I recall correctly how it works but also says that it does so "on some OSes" and doesn't say what happens on other OSes: sourceware.org/gdb/current/onl

So I guess it can quietly not work?

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.