tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

stopfork trick (was: radiusd: Error detected by libpthread: Invalid mutex.)

> You can do the stopfork trick with sysctl in the proc tree and then attach
> to the child before it dumps.
Can you elaborate how this is done?

I gdb'd radiusd, set a breakpoint on main and let it run.
When it hit the breakpoint, I looked up the debugged radiusd's PID and did
        sysctl -w proc.XXXX.stopfork=1
and let gdb continue. The main process exited, but I would expect to find a
child in ps output. Or are these stopped childs hidden from ps? If yes, how
do I learn their PID to attach to them?
Or what am I doing wrong?

Home | Main Index | Thread Index | Old Index