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

Bug#396835: tetex-bin postinst take unlimited amount of time and ram (kpsewhich took 600M and 14h)



Hi,

Frank Küster <frank@debian.org> wrote:

> tetex-bin's postinst script is already being run.  Does anybody know
> whether it is expected that a maintainer script does not look like being
> a child of "apt-get", as is the case here for tetex-bin?
              ^^^^^^^
               dpkg

This can happen if:

  1) dpkg was killed (therefore, it couldn't use waitpid(2) for the
     child process running
     '/bin/sh -e $path_to/tetex-bin.postinst configure', which resulted
     in the child process being "adopted" by init).

  2) tetex-bin's postinst was still running when the 'ps axf' command
     was run.

You can verify that easily:

,----[ a ]
| #! /bin/sh
| 
| ./b
`----

,----[ b ]
| #! /bin/sh
| 
| sleep 50
`----

Run './a' and 'ps -e --forest' before the 50 seconds are elapsed. You get:

 5181 pts/2    00:00:00                  |   \_ zsh
 5778 pts/2    00:00:00                  |       \_ a
 5779 pts/2    00:00:00                  |           \_ b
 5780 pts/2    00:00:00                  |               \_ sleep

Now, run 'kill 5778' and 'ps -e --forest' before the 50 seconds are
elapsed. You get:

 5779 pts/2    00:00:00 b
 5780 pts/2    00:00:00  \_ sleep

where b's parent process is init.

-- 
Florent



Reply to: