[vox-tech] sshd not reaping my login shell
Ken Bloom
kbloom at gmail.com
Fri Oct 2 11:21:44 PDT 2009
When I ssh from little-cat-a to cat-in-the-hat, exiting the login shell
on cat-in-the-hat doesn't end my ssh connection. After running ps on
cat-in-the-hat, I noticed that the login shell in question was still
sitting around as a zombie process, meaning that sshd isn't reaping the
shell.
Here's an strace of the problem (from sshd on cat-in-the-hat), attaching
to the sshd process (as root) after I am already logged in. You can see
that sshd is changing the signal mask an awful lot (blocking and
unblocking SIGCHLD), and it appears sshd isn't responding to SIGCHLD.
(It's definitley not calling waitpid to reap the shell.)
Anybody seen this before? Anybody know how to fix it? Anybody know where
to report a bug?
ii openssh-server 1:5.1p1-7 secure shell server, an rshd
replacement
[bloom at cat-in-the-hat ~]$ sudo strace -p 8124
[sudo] password for bloom:
Process 8124 attached - interrupt to quit
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "?m\3\270^\316,\314\0v\375\240\36\rG\263\203`f\210\210\264\340
\366\3\341\366\230_X\5\276"..., 16384) = 48
select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(10, "e", 1) = 1
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
-echo ...}) = 0
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "e", 16384) = 1
select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, "X\263\2A\350\235\233\355,\3149\223\364\221\265Ut\346\225h\275
\215z\234Z\3039\31\356x[\27"..., 48) = 48
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "\233`\205l\271\25\217\245\311j\307\2614\267t\226D\212\275h&q
\314+\262\23\25\321\302\261D\235"..., 16384) = 48
select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(10, "x", 1) = 1
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
-echo ...}) = 0
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "x", 16384) = 1
select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, "\206\331V\270\377\4\356\34rA\211c\336\200-e\264M\205\244\263
\250Qg$\227\307\205\270\36\201t"..., 48) = 48
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "<\326\326|\204\343[G\22\230\211\231\2\240\324xs~\257\35\250TT
\212,>\1\376U\231\374\264"..., 16384) = 48
select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(10, "i", 1) = 1
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
-echo ...}) = 0
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "i", 16384) = 1
select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, "\320\230 \245\237\230[\261\33\16K1\207\270\241\270\310\\tkU
\231\n\347\232H2*LENf"..., 48) = 48
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "\236\347\243\35\22\235\241v\247k\246<\r\305a\271\335V\305&\30
\324-=\204\256\4`@\302`\333"..., 16384) = 48
select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(10, "t", 1) = 1
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
-echo ...}) = 0
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "t", 16384) = 1
select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, ")(\353\317\2G(<\374e\346\253\277&R\214\37719\\\306\341\241d\5
\247\237\3059\35B}"..., 48) = 48
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "i2xeL\20\215\266~s\264\264/fIZe\314v\304\216E\323GO\236\34\331
\364\250[l"..., 16384) = 48
select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(10, "\r", 1) = 1
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "\r\n", 16384) = 2
select(13, [3 6 8 9 12], [3], NULL, NULL) = 2 (in [12], out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, "logout\r\n", 16384) = 8
write(3, "v\216`<\244\240\264\32D\331\240\212R\250-+\346\325\237b\255
\351{{y\327D4(\250\371\313"..., 48) = 48
select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, "\261\10\331\20fV\225\231\351=\2111\34\225G\366r\222+a\335\264
\244\266\r\17\2424^\311\0027"..., 48) = 48
select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(12, 0x7fff72ac4d40, 16384) = -1 EIO (Input/output error)
close(12) = 0
select(13, [3 6 8 9], [3], NULL, NULL) = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
write(3, "\217\254\305\327\4\235N\266r\214\6h\341\256hg\362\227kNa\322
\376\33\306\363i\233\243\260x\311", 32) = 32
select(13, [3 6 8 9], [], NULL, NULL) = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
read(3, "", 16384) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
close(10) = 0
shutdown(8, 2 /* send and receive */) = 0
close(8) = 0
close(8) = -1 EBADF (Bad file descriptor)
close(8) = -1 EBADF (Bad file descriptor)
shutdown(9, 2 /* send and receive */) = 0
close(9) = 0
close(9) = -1 EBADF (Bad file descriptor)
close(9) = -1 EBADF (Bad file descriptor)
brk(0x7fc905223000) = 0x7fc905223000
write(5, "\0\0\0\17\34", 5) = 5
write(5, "\0\0\0\n/dev/pts/1", 14) = 14
close(13) = 0
shutdown(3, 2 /* send and receive */) = 0
close(3) = 0
write(5, "\0\0\0\1=", 5) = 5
exit_group(0) = ?
Process 8124 detached
--
More information about the vox-tech
mailing list