SABnzbd 0.4.0RC2
Ubuntu Linux 8.04 Hardy Heron 64bit
Default Skin
Issue: When you exit your session by either restarting or rebooting (haven't tried a Log Out yet) without using the Shutdown feature in SABnzbd, cache files are orphaned in the cache directory and never cleaned up. In looking at the debug log, it appears that SABnzbd actually crashes (which would explain why the files are orphaned).
Impact: This ends up leaving old cruft data behind unknown to the user.
Debug Log:
Code: Select all
2008-06-14 22:56:45,500::INFO::[articlecache] Flushing <Article: article=1208236217.45999.24@news-europe.giganews.com, bytes=397388, partnum=24, art_id=SABnzbd_article_JLqH_g> to disk
2008-06-14 22:56:45,500::DEBUG::[articlecache] cache_size -> 0
2008-06-14 22:56:45,501::INFO::[sabnzbd] Saving data for SABnzbd_article_JLqH_g in /data/sabnzbd/cache/SABnzbd_article_JLqH_g
2008-06-14 22:56:48,402::DEBUG::[downloader] bps: 577820.795647
2008-06-14 22:56:48,402::ERROR::[sabnzbd] Error accessing BPSMETER?
Traceback (most recent call last):
File "/home/onebinary/src/SABnzbd-0.4.0RC2/sabnzbd/__init__.py", line 1014, in update_bytes
BPSMETER.update(bytes)
File "/home/onebinary/src/SABnzbd-0.4.0RC2/sabnzbd/downloader.py", line 116, in update
logging.debug("[%s] bps: %s", __NAME__, self.bps)
File "/usr/lib/python2.5/logging/__init__.py", line 1327, in debug
apply(root.debug, (msg,)+args, kwargs)
File "/usr/lib/python2.5/logging/__init__.py", line 971, in debug
apply(self._log, (DEBUG, msg, args), kwargs)
File "/usr/lib/python2.5/logging/__init__.py", line 1101, in _log
self.handle(record)
File "/usr/lib/python2.5/logging/__init__.py", line 1111, in handle
self.callHandlers(record)
File "/usr/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
hdlr.handle(record)
File "/usr/lib/python2.5/logging/__init__.py", line 655, in handle
self.emit(record)
File "/usr/lib/python2.5/logging/__init__.py", line 757, in emit
self.handleError(record)
File "/usr/lib/python2.5/logging/__init__.py", line 706, in handleError
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
File "/usr/lib/python2.5/traceback.py", line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File "/usr/lib/python2.5/traceback.py", line 13, in _print
file.write(str+terminator)
IOError: [Errno 32] Broken pipe
2008-06-14 22:56:53,341::WARNING::[sabnzbd] Signal 15 caught, saving and exiting...
2008-06-14 22:59:40,528::INFO::--------------------------------
2008-06-14 22:59:40,551::INFO::SABnzbd.py-0.4.0RC2 (rev=1180)Further Discussion: Maybe it would be wise to develop some type of garbage collection for the cache directory? Leaving cruft data, even after a crash, is never fun.

