Bug#532342: timeout: does not exit until timeout when launched in a cgi

Francesco Potorti` Potorti at isti.cnr.it
Mon Jun 8 16:49:47 UTC 2009


Package: timeout
Version: 1.18-3
Severity: normal
File: /usr/bin/timeout

I have a cgi which ends like this:

/usr/bin/timeout 60 /usr/bin/octave --quiet --norc --no-history cgi.m

as a safety net against the octave process going astray.  It used to
work until some time back.

Now it just sits there without exiting, even after the Octave process
has finished.  This is what I get with 'ps ufaxww' as soon as the script
is launched:

www-data  2078  0.0  0.1 157148  6796 ?        S    18:40   0:00  \_ /usr/sbin/apache2 -k start
www-data  2094  0.0  0.0  17304  1376 ?        S    18:41   0:00      \_ /bin/bash /usr/lib/cgi-bin/damatfrc.cgi
www-data  2096  0.0  0.0   3644   396 ?        Ss   18:41   0:00          \_ /usr/bin/timeout 60 /usr/bin/octave --quiet --norc --no-history /home/www/wnet/software/damatfrc/damatfrc.m cgi
www-data  2097 64.0  0.8 213604 35380 ?        R    18:41   0:00              \_ /usr/bin/octave --quiet --norc --no-history /home/www/wnet/software/damatfrc/damatfrc.m cgi
www-data  2098  0.0  0.0   3644   144 ?        S    18:41   0:00              \_ /usr/bin/timeout 60 /usr/bin/octave --quiet --norc --no-history /home/www/wnet/software/damatfrc/damatfrc.m cgi

and this is what I get some seconds later, when the Octave script has exited:

www-data  2078  0.0  0.1 157148  6796 ?        S    18:40   0:00  \_ /usr/sbin/apache2 -k start
www-data  2094  0.0  0.0      0     0 ?        Z    18:41   0:00      \_ [damatfrc.cgi] <defunct>
www-data  2098  0.0  0.0   3644   144 ?        S    18:41   0:00 /usr/bin/timeout 60 /usr/bin/octave --quiet --norc --no-history /home/www/wnet/software/damatfrc/damatfrc.m cgi

The Firefox client sits there waiting for about one minute after the
page rendering is finished, with the circling pointer never stopping.

Clearly there is a bug, but I do not know where is the culprit.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=it_IT at euro (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages timeout depends on:
ii  libc6                         2.9-12     GNU C Library: Shared libraries

timeout recommends no packages.

timeout suggests no packages.

-- no debconf information





More information about the forensics-devel mailing list