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

Bug#270136: aparted_server.pid handling is not robust

Package: partman
Severity: normal
Tags: d-i

Many times I have seen partman get confused about whether parted_server
was running, and hang or otherwise misbehave. This is always caused by
some other bug, but the bad handling of the pid file in partman
exerbates it.

For example, the most recent partman breakage is that libparted is not
loaded by anna. So parted_server fails to run at all. (This bug has been
fixed.) Normally this would result in partman putting up an error and
exiting, but due to the pid file handling, it results in an error and
then partman hanging.

Look at how the pid file is written:


    parted_server &
    echo $! >/var/run/parted_server.pid


    write_line "QUIT"

    rm /var/run/parted_server.pid

The init.d code is buggy because even if parted_server fails to run or
crashes, a pid file will still be written.

The finish.d code is buggy because even if parted_server fails to stop
the pid file will be removed (and I've seen this result in two
parted_servers running, due to other bugs that made it not stop).

I think it would be much better if parted_server was a good daemon and
managed writing and unlinking its own pid file. This would eliminate both
these points of failure and make partman more robust.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=en_US, LC_CTYPE=en_US

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: