hmailserver freezing after upgrading to 5.2.1

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-24 17:14

Recently upgraded to version 5.2.1 (on Server 2003). We upgraded 5.1.2 first (to 5.2), then did the upgrade from 5.2 to 5.2.1. We are now having alot of problems with the queue filling up and the server freezing (resolved by restarting). When we try to stop the service through the hmailserver console (ie. under the Server tab), we get the following error:

Image



This error was similar (but not the same) to the one here: http://www.hmailserver.com/forum/viewto ... 0x80010105 so I double-checked everything suggested without success. There was never a resolution posted, so I don't know if that would have been helpful.

My hmailserver logs don't seem to indicate a specific issue (mail just queues up when this happens). The error logs has some dnsresolver errors, but I believe this just happens when the server has to be rebooted.

EDIT: just added more information about upgrade path

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-24 19:23

What is shown in the log if you send a message after the queue is filled up?
How often does the queue fill up?
If you restart the service, is the messages sent then?

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-24 20:33

What is shown in the log if you send a message after the queue is filled up?
It just says 'queued' (this log was taken the first day it happened). Is that enough information? I kept a log from that day, if you need more information let me know (it hasn't happened today yet).

"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "SENT: 220 mydomain.com ESMTP"
16000000[nl]250 AUTH LOGIN"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "RECEIVED: EHLO ASSP-nospam"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "SENT: 250-mydomain.com[nl]250-SIZE 16000000[nl]250 AUTH LOGIN"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "RECEIVED: MAIL FROM: <Adriana.Quiceno@oma.org>"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "RECEIVED: RCPT TO: <not-spammmaster@mydomain.com>"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.426" "127.0.0.1" "RECEIVED: DATA"
"SMTPD" 6400 11107 "2009-09-16 08:42:24.442" "127.0.0.1" "SENT: 354 OK, send."
"SMTPD" 5320 11107 "2009-09-16 08:42:24.473" "127.0.0.1" "SENT: 250 Queued (0.031 seconds)"
How often does the queue fill up?
It seems to happen once or twice a day.
If you restart the service, is the messages sent then?


Yes. But usually if you try to restart the service it gives you that HResult error and freezes everything up, forcing me to reboot the server itself. After rebooting, the queue empties right away.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-24 20:48

Without debug logging enabled, it's not really possible to say what's going on. :-\

If you restart the hMailServer service using the control panel and then restart hMailServer Administrator, you should not have to restart Windows. If you still need to restart Windows after doing this, Windows installation is broken in some way.

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-24 20:53

I'll turn on debugging, since it definitely will recur at some point. Also, I've always been able to restart hmailserver service from windows even after the error. My co-worker tells me he wasn't able to, so I'm going to assume he might not have been telling the truth and go from there, unless I experience the same thing.

I will repost when it happens again! Thanks for your help!

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-24 20:55

The interesting part in the log to see what happens after hMailServer has queued the message. Typically a delivery should start directly after this, if not all delivery threads are already busy.

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-24 22:24

Hey Martin, I took a look through yesterday's log (it froze yesterday too), which had DEBUG turned on. I've managed to cut it down to about 12MB (covering about 10 minutes, before and after the freezing), but it's still too big to post here. The server gets shut down at 11:21:51 and restarts at 11:26:27. Do you want me to email it to you or make it available from a download site?

Unfortunately I was away yesterday, so I'm assuming (from what I've been told) that the 'freezeup' followed the usual queue-fill-up, he got that error I described trying to stop the service, and then rebooted the server when it did not respond.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-24 23:48

Just email it to me at martin@hmailserver.com. If you zip it, I guess it will be fairly small.

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-25 11:52

Sent the file this morning :)

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-26 11:54

In your log, I see that hMailServer starts an external virus scanner:

Code: Select all

CustomVirusScanner::Scan()
What should typically happen after this is that the scanner is executed, and hMailServer reports the result. A result line current

Code: Select all

CustomVirusScanner::Scan() - "C:\Program Files\yourscanner.exe" /switches D:\path\to\datadir\{930FA237-A2C0-4838-AFAB-9D9A90779620}.eml - Returned 0
Before the reboot, I see the first line (scan started) several times. I don't see any scan result lines though. After the reboot, I see both scan start and scan completed lines. If hMailServer starts a virus scanner and that scanner does not complete, hMailServer will just sit and wait (which appears to be what's happening in your case), and the queue will get filled up. The thread information in the log confirms this. The second column is the thread ID, and threads which starts the virus scanner does not produce any more output after the scan start. If it's possible, you could try to temporarily disable the virus scanner. An alternative is to wait for the problem to occur again, and then check the task manager to see if there's multiple instances of the scanner executable running.

The other problem you mentioned was that the server 'freezes'. Is this a separate problem, or does 'freezes' mean that the queue delivery stops?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: hmailserver freezing after upgrading to 5.2.1

Post by ^DooM^ » 2009-09-26 11:59

Is there a reason why hMail sits and waits for a virus scan rather than timing out after a set time?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-26 12:12

I would love to have answered yes to that, but no. It should obviously give up after a certain amount of time but it's very persistent... It's in the "things-to-fix-in-5.4-list" though. In 5.4, an error will probably be reported if the scanner times out and the message delivery rescheduled for later delivery.

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-28 14:39

Yeah, looks like we have to kill the antivirus (Kaspersky) every time it queues up like that then--since the queue empties right away after we do that. We may have to try with a different antivirus and see what happens, since no one else seems to be complaining.

The freeze-up/error only seems to happen if we stop the service through hmailserver console after it has a huge queue. You can't do anything in the hmailserver admin console after this happens and the mail can no longer be sent/received, but the rest of the server programs are fine. Since the log I sent you was a day that the server 'froze', it must be related to the antivirus scan too.

The 'timeout' change you're suggesting for 5.4 would be perfect to prevent this, so I'll eagerly wait for it. Happily you roll out the updates quickly :)

Thanks as usual!

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: hmailserver freezing after upgrading to 5.2.1

Post by martin » 2009-09-28 17:57

Well, the timeout problem would not really be a good solution to your problem. It would be a ugly workaround. I suggest you contact the anti virus vendor, tell them what parameter you're using and ask them if they can tell you why it locks up. It could be that there's some bug in it which occur if you launch many scanners at the same time. Maybe the Kasperskys scanner does not support many simultaneous processes. :-\

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: hmailserver freezing after upgrading to 5.2.1

Post by entropicsinkhole » 2009-09-28 22:05

Sounds like a plan! Thanks!

Post Reply