Re: unkillable process

From: Ville Herva (vherva@niksula.hut.fi)
Date: Sat Apr 01 2000 - 05:53:34 EST


On Fri, Mar 31, 2000 at 02:54:21PM +0300, [Oleg Drokin] claimed:
> Hello!
>
> I have unkillable process. It appeared some time ago, but I noticed it
> only today. Even worse, it started to eat 100% CPU after I
> tried to kill it.
> See sample session below.
> The box is dual PIII-450, 256M RAM. kernel is 2.2.14pre4, gcc 2.7.2.3
> compiled.
> gpm listens on a named pipe /dev/msmouse (not a tty!)
> Is anybody interested?

I had similar problems. Usually it was xmms that became unkillable, but
once it was enlightenment. It was stuck in unix domain socket read (see
ikd trace below).

After seeing the ikd trace, Mike Galbraight suggested a slight
modification to net/unix/af_unix.c::unix_stream_recvmsg():

original:
                        unix_data_wait(sk);
                        if (signal_pending(current))
                                return -ERESTARTSYS;

modified:
                        if (signal_pending(current))
                                return -ERESTARTSYS;
                        unix_data_wait(sk);

These unkillable processes seemed to occur every 1-3 weeks. With that
change, I haven't seen them in a month. Still can't say if that's indeed
the fix, but at least it did not break anything.

Perhaps there is something similar in the named pipe code? You could try
to get a ikd trace (see
ftp://ftp.kernel.org/pub/linux/kernel/people/andrea/ikd).

ikd trace:
=========================================================================
root@babbage:/root>ps ef `pidof xmms`
PID TTY STAT TIME COMMAND
3731 pts/3 RN 24:10 xmms HISTSIZE=1000 HOSTNAME=babbage.tky.hut.fi LOGNAM 3733 pts/3 ZN 0:01 [xmms <defunct>]
3733 pts/3 ZN 0:01 [xmms <defunct>]

[1]kdb> btp 3733
EBP EIP Function(args)
0xc6091f8c 0xc0118cba schedule+0x1e6( )
0xc6091fb0 0xc012023f do_exit+0x2cb( 0x0, 0x814e094, 0xc010a810, 0x0, 0xf)
0xc6091fbc 0xc0120254 sys_wait4( 0x0, 0xf, 0x40276a7c, 0x814e090,0x814e0b0)
0x814e094 0xc010a810 system_call
[1]kdb> btp 3731
EBP EIP Function(args)
0xc4879e9c 0xc0118cba schedule+0x1e6( )
0xc4879eb8 0xc01191f5 interruptible_sleep_on+0x5d( 0xc757eb58)
0xc4879ec8 0xc01a4755 unix_data_wait+0x2d( 0xc0ecfc80)
0xc4879f04 0xc01a4a87 unix_stream_recvmsg+0x17b( 0xc757eb3c, 0xc4879f70, 0x8, +0x0, 0xc4879f30)
0xc4879f44 0xc017c569 sock_recvmsg+0x35( 0xc757eb3c, 0xc4879f70, 0x8, 0x0)
0xc4879f8c 0xc017c66c sock_read+0x80( 0xc1443bc0, 0xbffff75c, 0x8, 0xc1443bd4)
0xc4879fbc 0xc012eb00 sys_read+0xd0( 0x13, 0xbffff75c, 0x8, 0x8, 0xbffff75c)
0xbffff72c 0xc010a810 system_call
[1]kdb>
[1]kdb> go
=========================================================================

-- v --

v@iki.fi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:07 EST