PC shutdown doesn't work always

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: PC shutdown doesn't work always

Post by switch »

There could possibly be a program running that is stopping the shutdown. Maybe we should use the -f flag to force the shutdown.

Edit: looks like we currently do try and force a shutdown.
You are not running sabnzbd as a service or anything are you?
Last edited by switch on June 13th, 2008, 1:44 pm, edited 1 time in total.
Peter_Pan
Newbie
Newbie
Posts: 21
Joined: May 4th, 2008, 7:01 am

Re: PC shutdown doesn't work always

Post by Peter_Pan »

Nope, I do not have other apps running other than the ones XP loads.
I am not running sabnzbd as a service.

cherrypy doesnt shut down when it happens.
Dunno if that gives you a clue.

Should I be able to see something in even viewer about the system trying to shut down?
Nothing is there.

BTW:
I just tried on my laptop where I just recently installed SP3.
Now my laptop doesnt work either.
Must be SP3 then ?

Just tried with a reinstall - which you said wouldnt work.
And it didnt  ;D
Last edited by Peter_Pan on June 14th, 2008, 5:14 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: PC shutdown doesn't work always

Post by shypike »

cherrypy doesn't shut down when it happens.
CherryPy shutdown is logged in cherrypy.log, not in the regular log file.

Last advice I can give you is to use Steve Gibson's wizmo utility (http://www.grc.com/wizmo/wizmo.htm)
and call it with this script:

Code: Select all

@echo off
echo Shutdown was here >c:\temp\shutdown.log
wizmo quiet shutdown!
Don't forget the exclamation mark.
Put this script in the script folder and set it for end-of-queue.
Check the shutdown.log file to see whether it was called at all.
This way we will know whether it's an end-of-queue problem or
a shutdown problem. You may need to put shutdown.log somewhere else.

BTW there must be dozens of alternative utilities for this.
Peter_Pan
Newbie
Newbie
Posts: 21
Joined: May 4th, 2008, 7:01 am

Re: PC shutdown doesn't work always

Post by Peter_Pan »

I know about cherrypy.log and nothing is in there about a shutdown.

And I can browse the 'server' when sabnzbd is supposed to have been shut down.
Seems like everything shuts down except cherrypy.

I will try Steve's wizmo.
Thx.
Last edited by Peter_Pan on June 14th, 2008, 6:15 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: PC shutdown doesn't work always

Post by shypike »

After some testing, what I see is.

CherryPy does not sign off in the log file, this because SABnzbd terminates
without specifically stopping CherryPy, but this is OK.
If you use the Smpl or Plush skins, you will be tempted to think that SABnzbd
still works, this is because these skins have a life of their own. They also are not
notified that SABnzbd has actually stopped.
On Vista I see a 10 second delay between SABnzbd stopping and the OS actually
going down, I guess that's just the OS doing its thing.

BTW: the shutdown method that SABnzbd uses, is rather blunt.
Maybe we should use the Windows built-in shutdown command line utility.
That will show a 30 sec warning before actually shutting down and can be cancelled.
Peter_Pan
Newbie
Newbie
Posts: 21
Joined: May 4th, 2008, 7:01 am

Re: PC shutdown doesn't work always

Post by Peter_Pan »

I have no idea about how to test if cherrypy has shut down or not.

Im using the default skin, and I can browse the pages, change settings, clear the log and even send myself a test email.

But if you say so, it must be true...  ??? ;D

EDIT:
Ok... its because the sabnzdb process doesnt quit.
When I change a setting, sabnzbd wakes up and starts processing again:

Shutting down...
2008-06-14 19:28:47,019::INFO::[postproc] Queue has finished, launching: (None)



2008-06-14 19:28:47,289::INFO::[nzbqueue] Saving queue
2008-06-14 19:28:47,299::INFO::[sabnzbd] Saving data for queue7.sab in D:\Auto\cache\queue7.sab
2008-06-14 19:28:47,299::INFO::[sabnzbd] Saving data for bytes7.sab in D:\Auto\cache\bytes7.sab
2008-06-14 19:28:47,299::INFO::[sabnzbd] Saving data for rss_data.sab in D:\Auto\cache\rss_data.sab
2008-06-14 19:28:47,309::DEBUG::Stopping scheduler



Starting up...
2008-06-14 19:30:48,354::DEBUG::username ->
2008-06-14 19:30:48,354::DEBUG::password -> ******
2008-06-14 19:30:48,354::DEBUG::check_new_rel -> 1
2008-06-14 19:30:48,354::DEBUG::replace_spaces -> 0
etc...

But maybe thats by design?
If the PC is set to shut down anyway there is no need to shut down sabnzbd?

-----

Ok, enough of this!

I can live without knowing whats wrong. No biggie!

Keep up the good work!
Last edited by Peter_Pan on June 14th, 2008, 12:50 pm, edited 1 time in total.
Peter_Pan
Newbie
Newbie
Posts: 21
Joined: May 4th, 2008, 7:01 am

Re: PC shutdown doesn't work always

Post by Peter_Pan »

We are still looking into these reported problems

* End-of-queue shutdown/standby/hibernate does not always work


Look no further!
Works here in RC3  ;D ;D

I didnt have this line in RC2:
"2008-06-18 19:36:32,717::INFO::All processes stopped"
Last edited by Peter_Pan on June 18th, 2008, 12:41 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: PC shutdown doesn't work always

Post by shypike »

The line is new, to have a proper message marking end-of-processes.
So I will be happy when it works all of the time  :D
Post Reply