@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)
@koakuma unless I totally forgot how scheduler-locking works this narrows down everything to one kind of race condition: where you need some other thread to take action early enough or the main thread dies. (Iirc doing what you've done means that only the main thread runs.)