Deleting item from queue orphans some associated cache files

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
onebinary
Release Testers
Release Testers
Posts: 28
Joined: May 30th, 2008, 4:08 am

Deleting item from queue orphans some associated cache files

Post by onebinary »

Environment Info:
SABnzbd 0.4.0RC2
Ubuntu Linux 8.04 Hardy Heron 64bit
Default Skin

Issue: When you delete an item from the queue, some cache files get orphaned in the cache directory and are never cleaned up, even upon using the Shutdown feature.

Steps to Reproduce:
- (On Linux) start SABnzbd with an empty queue and a clean cache directory (just the 3 .sab files).
- Begin a download, preferrably something large that has large files (a download split into 50MB rar files is a good choice).
- Let the download run for a few minutes so that you build up some cache files.
- Hit the Del button in the interface to delete the item from the queue.
- Look at your cache directory, there should be some SABnzbd_article_* files left.
- Use the Shutdown feature in the UI.
- Look at cache directory again and you should (hopefully) see the orphaned cache files.

Cache directory output:
The first listing is after deleting from the queue.  The second listing is after shutdown:

Code: Select all

onebinary@home:/data/sabnzbd/cache$ ls -ltr
total 1308
-rw-r--r-- 1 onebinary users       1599 2008-06-14 23:48 rss_data.sab
-rw-r--r-- 1 onebinary users         11 2008-06-14 23:48 bytes7.sab
-rw-r--r-- 1 onebinary users      36802 2008-06-14 23:49 queue7.sab
-rw------- 1 onebinary onebinary 640000 2008-06-14 23:49 SABnzbd_article_zoFYyO
-rw------- 1 onebinary onebinary 640000 2008-06-14 23:49 SABnzbd_article_nAu5j9
onebinary@home:/data/sabnzbd/cache$ ls -ltr
total 1308
-rw------- 1 onebinary onebinary 640000 2008-06-14 23:49 SABnzbd_article_zoFYyO
-rw------- 1 onebinary onebinary 640000 2008-06-14 23:49 SABnzbd_article_nAu5j9
-rw-r--r-- 1 onebinary users       1599 2008-06-14 23:50 rss_data.sab
-rw-r--r-- 1 onebinary users      36802 2008-06-14 23:50 queue7.sab
-rw-r--r-- 1 onebinary users         11 2008-06-14 23:50 bytes7.sab
Debug Log: I can't seem to find a specific log entry that documents when the item was removed from the queue.  I'm assuming that the queue save line I'm snipping from was when the deletion occurred?

Code: Select all

2008-06-14 23:49:54,273::INFO::[nzbqueue] Saving queue
2008-06-14 23:49:54,273::INFO::[sabnzbd] Saving data for queue7.sab in /data/sabnzbd/cache/queue7.sab
2008-06-14 23:49:54,511::DEBUG::[downloader] bps: 412705.660981
2008-06-14 23:49:55,449::INFO::[downloader] Thread [email protected]:8080: part8of24.GthhcK&[email protected] done
2008-06-14 23:49:55,449::INFO::[decoder] Decoding <Article: article=part8of24.GthhcK&[email protected], bytes=661200, partnum=8, art_id=None>
2008-06-14 23:49:55,455::INFO::[articlecache] <Article: article=part8of24.GthhcK&[email protected], bytes=661200, partnum=8, art_id=None> would be discarded
2008-06-14 23:49:55,456::INFO::[articlecache] <Article: article=part8of24.GthhcK&[email protected], bytes=661200, partnum=8, art_id=None> would be discarded
2008-06-14 23:49:55,456::INFO::[articlecache] Flushing <Article: article=part8of24.GthhcK&[email protected], bytes=661200, partnum=8, art_id=SABnzbd_article_zoFYyO> to disk
2008-06-14 23:49:55,456::DEBUG::[articlecache] cache_size -> 0
2008-06-14 23:49:55,456::INFO::[sabnzbd] Saving data for SABnzbd_article_zoFYyO in /data/sabnzbd/cache/SABnzbd_article_zoFYyO
2008-06-14 23:49:55,458::DEBUG::[nzbqueue] Discarding article part8of24.GthhcK&[email protected], no longer in queue
2008-06-14 23:49:55,713::INFO::[downloader] Thread [email protected]:8080: part9of24.GthhcK&[email protected] done
2008-06-14 23:49:55,714::INFO::[decoder] Decoding <Article: article=part9of24.GthhcK&[email protected], bytes=661932, partnum=9, art_id=None>
2008-06-14 23:49:55,720::INFO::[articlecache] <Article: article=part9of24.GthhcK&[email protected], bytes=661932, partnum=9, art_id=None> would be discarded
2008-06-14 23:49:55,720::INFO::[articlecache] <Article: article=part9of24.GthhcK&[email protected], bytes=661932, partnum=9, art_id=None> would be discarded
2008-06-14 23:49:55,720::INFO::[articlecache] Flushing <Article: article=part9of24.GthhcK&[email protected], bytes=661932, partnum=9, art_id=SABnzbd_article_nAu5j9> to disk
2008-06-14 23:49:55,721::DEBUG::[articlecache] cache_size -> 0
2008-06-14 23:49:55,721::INFO::[sabnzbd] Saving data for SABnzbd_article_nAu5j9 in /data/sabnzbd/cache/SABnzbd_article_nAu5j9
2008-06-14 23:49:55,722::DEBUG::[nzbqueue] Discarding article part9of24.GthhcK&[email protected], no longer in queue
2008-06-14 23:49:59,713::DEBUG::[downloader] bps: 215339.668769
2008-06-14 23:50:04,713::DEBUG::[downloader] bps: 86540.0499296
2008-06-14 23:50:10,713::DEBUG::[downloader] bps: 28982.154419
2008-06-14 23:50:16,713::DEBUG::[downloader] bps: 9706.07143143
2008-06-14 23:50:20,967::INFO::SABnzbd shutting down...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Deleting item from queue orphans some associated cache files

Post by shypike »

This is on the to-do list for a later release.

As we are preparing for 0.4.0Final, fixing this would introduce too much risk.
And this "feature" is in all SABnzbd releases.
Mr. Wilby
Newbie
Newbie
Posts: 4
Joined: March 21st, 2009, 3:40 am

Re: Deleting item from queue orphans some associated cache files

Post by Mr. Wilby »

Did this ever get fixed?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Deleting item from queue orphans some associated cache files

Post by shypike »

No, planned for after release 0.5.0 (which isn't out yet).
It will get more priority, since it is a real problem.
Post Reply