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

Strange non dying of gzip on amd64



Hi,

while working with apt-ftparchive on amd64 it repeadatly
deadlocks. After some debugging here is what I found happens:

apt-ftparchive calls gzip with stdout to a pipe
apt-ftparchive reads some data from the pipe till it has enough
apt-ftparchive sends SIGINT
apt-ftparchive reads blocking from the pipe to flush it

and now everything hangs with gzip not dying. At that point the FDs of
both programs are as follows:

/proc/31752/fd: (apt-ftparchive)
total 9
lrwx------  1 katie debadmin 64 May  1 17:10 0 -> /dev/pts/7
lrwx------  1 katie debadmin 64 May  1 17:10 1 -> /dev/pts/7
lrwx------  1 katie debadmin 64 May  1 17:06 2 -> /dev/pts/7
l-wx------  1 katie debadmin 64 May  1 17:10 3 -> /dev/null
lrwx------  1 katie debadmin 64 May  1 17:10 4 -> /org/amd64.debian.net/database/packages-amd64.db
lr-x------  1 katie debadmin 64 May  1 17:10 5 -> /org/amd64.debian.net/database/dists/unstable_main_binary-amd64.list
lr-x------  1 katie debadmin 64 May  1 17:10 6 -> /org/amd64.debian.net/ftp/debian/pool/main/a/abc2ps/abc2ps_1.3.3-3_amd64.deb
lr-x------  1 katie debadmin 64 May  1 17:10 8 -> pipe:[1792790]

/proc/31793/fd: (gzip)
total 3
lr-x------  1 katie debadmin 64 May  1 17:10 0 -> /org/amd64.debian.net/ftp/debian/pool/main/a/abc2ps/abc2ps_1.3.3-3_amd64.deb
l-wx------  1 katie debadmin 64 May  1 17:10 1 -> pipe:[1792790]
lrwx------  1 katie debadmin 64 May  1 17:06 2 -> /dev/null


And gzip has the following backtrace:

(gdb) bt
#0  0x00002aaaaaf442fd in __lll_mutex_lock_wait () from /lib/libc.so.6
#1  0x00002aaaab0a2550 in _IO_stdfile_1_lock () from /lib/libc.so.6
#2  0x0000000000000421 in ?? ()
#3  0x00002aaaaaedc9c6 in save_for_backup () from /lib/libc.so.6
#4  0x0000000700000008 in ?? ()
#5  0x0000000800000008 in ?? ()
#6  0x0000000800000008 in ?? ()
#7  0x0000000800000008 in ?? ()
#8  0x0000000800000008 in ?? ()
#9  0x00002aaaaaab30fa in do_lookup_versioned () from /lib64/ld-linux-x86-64.so.2
#10 0x00002aaaaaedbfce in _IO_flush_all_internal () from /lib/libc.so.6
#11 0x00002aaaaaedc1fb in _IO_cleanup () from /lib/libc.so.6
#12 0x00002aaaaae98d97 in exit () from /lib/libc.so.6
#13 0x0000000000404fe4 in do_exit (exitcode=1) at gzip.c:1833
#14 <signal handler called>
#15 0x00002aaaaaedbe81 in _IO_flush_all_lockp () from /lib/libc.so.6
#16 0x00002aaaaaedbfce in _IO_flush_all_internal () from /lib/libc.so.6
#17 0x00002aaaaaedc1fb in _IO_cleanup () from /lib/libc.so.6
#18 0x00002aaaaae98d97 in exit () from /lib/libc.so.6
#19 0x0000000000404fe4 in do_exit (exitcode=0) at gzip.c:1833
#20 0x0000000000402b6a in main (argc=2, argv=0x7ffffffffc88) at gzip.c:640
(gdb) 


The exact same happens if apt-ftparchive closes the pipe first, then
sends SIGINT and then calls waitpid. gzip never dies. [sidenote: kill
-9 on gzip makes it continue]


So we are know wondering if this could be a glibc problem or a kernel
problem. Kernel is a 2.6.11.6 with vserver (apt-ftparchive inside
vserver) and libc6 is 2.3.2.ds1-21.

$ cat /proc/version
Linux version 2.6.11.6-vs195-farm1.0 (joerg@vorlon) (gcc-Version 3.3.5 (Debian 1:3.3.5-12)) #1 SMP Sat Apr 2 12:53:04 CEST 2005


Any help is welcome.

MfG
        Goswin



Reply to: