Category set to default for re-added orphaned jobs

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.
Post Reply
Ezitelthen
Newbie
Newbie
Posts: 4
Joined: August 25th, 2011, 6:30 am

Category set to default for re-added orphaned jobs

Post by Ezitelthen »

When a job gets orphaned and I add it back to the queue, the category is set to default, even if it was something like tv or movies. When the job is verifying/repairing/extracting the category can't be changed back to the original so the download ends up in the wrong/default directory and no post-process scripts are started.

Using SabNZBd+ version 0.6.8, installed trough PPA on Ubuntu 10.04.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Category set to default for re-added orphaned jobs

Post by shypike »

You'll have to come up with a specific scenario, because I cannot reproduce your problem.
Why do the items become orphans in the first place?
Ezitelthen
Newbie
Newbie
Posts: 4
Joined: August 25th, 2011, 6:30 am

Re: Category set to default for re-added orphaned jobs

Post by Ezitelthen »

There were 12 6Gb jobs that were missing parts, as soon as the first job started downloading missing parts, the second job started to verify. That went on and on until all jobs were in the post processing queue, alternating turns for verify/repair/download missing parts/extract etc. Then Ubuntu crashed. When I rebooted, the 12 jobs were in the list of orphaned jobs and on re-adding them they did not have a category. But they were all in the History section of the queue, verifying etc, so I could not change the category back.

ps. I think that when a job is missing parts, the next job should not start verifying as soon as the first job starts downloading missing parts. Shouldn't it wait until the first job is completed/failed?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Category set to default for re-added orphaned jobs

Post by shypike »

I was asking about why orphans exist at all, to check if that was part of a specific scenario.
Of course a system crash is a very likely reason for orphans.
It could be that, because of the crash, the disk state of the queue items wasn't complete.
The category is saved to disk very early in the creation of a queue entry, so it surprises me that it isn't preserved.
I'll see if there are some anomalies in the handling of job attributes, but I expect some rare condition to be the cause.
Also if due to the crash the attribute file is lost, then that would explain the default categories.

As to your last remark. SABnzbd is streamlined to make the most of download and post-processing performance,
so halting the PP queue for items that need more files, is not a good idea.
Ezitelthen
Newbie
Newbie
Posts: 4
Joined: August 25th, 2011, 6:30 am

Re: Category set to default for re-added orphaned jobs

Post by Ezitelthen »

OK thank you for your explanation. This was the first time this happened to me, had orphaned jobs before but never noticed the missing category, so it might be a rare coincidence. All the downloads were finished to the point of verifying so the category should've been set for sure.

On the second thing, does sabnzb process one item at the time when verifying/repairing/extracting? So that alternating them should not have a negative effect on overall CPU usage and processing time?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Category set to default for re-added orphaned jobs

Post by shypike »

Ezitelthen wrote:On the second thing, does sabnzb process one item at the time when verifying/repairing/extracting? So that alternating them should not have a negative effect on overall CPU usage and processing time?
The PP queue does one job at a time (and a job requiring extra files is considered finished).
However, halting the queue to download more files means wasting time that could be spent on post-processing.
Other than that post processing is sequential because running two verifications/repairs/unpacks
simultaneously makes no sense due to the amount of CPU and disk channel capacity required.
Ezitelthen
Newbie
Newbie
Posts: 4
Joined: August 25th, 2011, 6:30 am

Re: Category set to default for re-added orphaned jobs

Post by Ezitelthen »

Thanks for the explanation.
rethier
Newbie
Newbie
Posts: 4
Joined: March 27th, 2010, 7:54 am

Re: Category set to default for re-added orphaned jobs

Post by rethier »

0.6.8
WinXP installer
I believe problem was occurring in previous version as well and I thought the upgrade to 0.6.8 would fix but no luck.

I've added additional categories for post processing ease. For example the default MOVIES category is where the file will be placed automatically, then I'll re-sort into say MOVIES-COMEDY or MOVIES-DRAMA.

Due to past memory leak issues w/ SAB a long time ago, I had setup a daily scheduled task to shutdown then a few mins later restart SAB.

Each time this shutdown/restart takes place (daily at the scheduled time or manually which I just confirmed), all the categories are reset to MOVIES except for the active one being downloaded.

I can reproduce consistently.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Category set to default for re-added orphaned jobs

Post by shypike »

What kind of shutdown do you use?
rethier
Newbie
Newbie
Posts: 4
Joined: March 27th, 2010, 7:54 am

Re: Category set to default for re-added orphaned jobs

Post by rethier »

My scheduled task command is "taskkill /F /IM SABnzbd.exe"

I just tried using the SHUTDOWN link from inside SAB and the categories were all maintained.

So it's that above command that is the culprit.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Category set to default for re-added orphaned jobs

Post by shypike »

That way of stopping is almost a guarantee for problems.
You should either use SABnzbd's scheduler to plan a restart or use wget to send it a shutdown command.
wget http://localhost:8080/sabnzbd/api?mode= ... key=BLABLA
Post Reply