http://bugs.winehq.org/show_bug.cgi?id=8025
Sebastian indigo176@blinkenshell.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |indigo176@blinkenshell.org
--- Comment #71 from Sebastian indigo176@blinkenshell.org 2011-02-04 09:12:47 CST --- It seems like ptrace in wineserver is responsible for this hang. When the hang occurs, inside suspend_for_ptrace() (server/ptrace.c), it goes something like this:
#1 ptrace(PTRACE_ATTACH, ...) returns success #2 wait4() inside of wait4_thread() blocks forever instead of returning on the stop signal #3 the watchdog in wait4_thread() times out and wait4_thread() returns failure #4 because wait4_thread failed, resume_after_ptrace() will be executed immediately #5 ptrace(PTRACE_DETACH, ...) inside of resume_after_ptrace() returns ESRCH (failure)
After this, the thread is still stopped and Counter-Strike hangs. Running "pkill -CONT hl.exe" resumes the game without a crash.
Also: Trying to attach hl.exe in gdb, during the hang, gives "ptrace: operation not permitted". After sending CONT to hl.exe, attaching is possible again.
I'd really like to trace this further, but I don't know where to look next. I have no idea why ptrace/wait hangs like this.