Re: [AMaViS-user] Waiting for the process XXXXX to terminate

This is a discussion on Re: [AMaViS-user] Waiting for the process XXXXX to terminate within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Sven, > I'm currently getting the message "Waiting for the process > XXXXX to terminate" upon issueing ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-03-2005
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Waiting for the process XXXXX to terminate

Sven,

> I'm currently getting the message "Waiting for the process
> XXXXX to terminate" upon issueing an 'amavisd stop'
> command. Unfortunately, it waits forever until it gets
> kill -9'ed.
>
> What changed? The libc in the amavis chroot got exchanged
> (while amavis was running), ...


> Mark, can you add a 30 (or 300) second timeout that will
> do a hard kill and bailout in that for(;;) loop?


Ok, can't hurt to add a bigger hammer to the loop.
I'll add the following to 2.3.3, thanks for the suggestion:

--- amavisd.orig Wed Jun 29 12:26:11 2005
+++ amavisd Wed Aug 3 16:23:26 2005
@@ -8791,7 +8791,14 @@
kill('TERM',$amavisd_pid) or die "Can't SIGTERM amavisd[$amavisd_pid]: $!";
- my($delay) = 1; # seconds
- for (;;) {
- sleep($delay); $delay = 5;
+ my($waited) = 0; my($sigkill_sent) = 0; my($delay) = 1; # seconds
+ for (;;) { # wait for the old running daemon to go away
+ sleep($delay); $waited += $delay; $delay = 5;
last if !kill(0,$amavisd_pid); # is the old daemon still there?
- print STDERR "Waiting for the process $amavisd_pid to terminate\n";
+ if ($waited < 60 || $sigkill_sent) {
+ print STDERR "Waiting for the process $amavisd_pid to terminate\n";
+ } else { # use stronger hammer
+ print STDERR "Sending SIGKILL to amavisd[$amavisd_pid]\n";
+ kill('KILL',$amavisd_pid)
+ or warn "Can't SIGKILL amavisd[$amavisd_pid]: $!";
+ $sigkill_sent = 1;
+ }
}

Mark


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:29 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0