Bug#402837: conf.pl (squirrelmail-configure) can eat 100% cpu

2006-12-13 Thread Thijs Kinkhorst
forwarded 402837 http://sf.net/support/tracker.php?aid=1614758
thanks

On Tue, 2006-12-12 at 23:55 +0100, Philippe Teuwen wrote:
 When /etc/squirrelmail/conf.pl is disconnected abruptly, it does not die
 but spawns infinitely calls to clear via clear_screen().
 I got 600 forks/s and 100% CPU for hours because the admin of one of
 my vservers closed his ssh session abruptly :-(

Thank you for your detailed report. I've filed it upstream; I'm afraid
its too late to get it fixed in etch though.


Thijs


signature.asc
Description: This is a digitally signed message part


Bug#402837: conf.pl (squirrelmail-configure) can eat 100% cpu

2006-12-12 Thread Philippe Teuwen
Package: squirrelmail
Version: 1.4.9a-1
Severity: normal

Hi,

When /etc/squirrelmail/conf.pl is disconnected abruptly, it does not die
but spawns infinitely calls to clear via clear_screen().
I got 600 forks/s and 100% CPU for hours because the admin of one of
my vservers closed his ssh session abruptly :-(

My guess is that in the loop of the script to display the menu,
it clears the screen (so the fork to call clear) and waits for 
input but with disconnected IO, there is no wait on input and
the process loops as crazy.

To reproduce the bug:
Simply connect remotely to a server, launch /etc/squirrelmail/conf.pl
and close the xterm running the ssh session.
This leaves the perl script running alone as explained.
Reconnect and watch your cpu ;-)

To fix the bug:
Either trap the IO disconnection event to quit nicely or at least 
test for it in the loop but find a way to avoid looping without pause.

Phil

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]