Logfiles + threading

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
g00fy
Newbie
Newbie
Posts: 13
Joined: December 3rd, 2008, 3:28 am

Logfiles + threading

Post by g00fy »

I was just checking the error-log, and I saw that a lot of threads seems to write to the same file at once. Because sometimes I get an "ERROR:..." statement amidst a HTTP-request and so on.

Also another issue I think is that there is no date/time stamp before each line. That would really come in handy for debugging.


Greetings,
Steven
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Logfiles + threading

Post by switch »

Where is the error log you are talking about? on the connections page?

The sabnzbd.log provides detailed logging with proper date and timestamping such as:
2008-12-04 15:36:37,615::DEBUG::[articlecache] cache_size -> 0

Can you give an example of the error message you are seeing?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Logfiles + threading

Post by shypike »

He has a sabnzbd.error.log file.
That's only created when compiled versions (Windows or OSX) get traceback errors.
So a clear indication of a bug in SABnzbd.
g00fy
Newbie
Newbie
Posts: 13
Joined: December 3rd, 2008, 3:28 am

Re: Logfiles + threading

Post by g00fy »

An example of what I have in the error log file:

Code: Select all

INFO:root:--------------------------------
INFO:root:SABnzbd.py-0.4.5 (rev=1750)
INFO:root:Platform = posix
INFO:root:Python-version = 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)]
INFO:root:[sabnzbd] Loading data for rss_data.sab from /Users/me/.sabnzbd/cache/rss_data.sab
INFO:root:[sabnzbd] Loading data for bytes7.sab from /Users/me/.sabnzbd/cache/bytes7.sab
INFO:root:[sabnzbd] Loading data for queue7.sab from /Users/me/.sabnzbd/cache/queue7.sab
INFO:root:[sabnzbd] Loading data for watched_data.sab from /Users/me/.sabnzbd/cache/watched_data.sab
INFO:root:All processes started
INFO:root:_yenc module... found!
INFO:root:celementtree module... found!
INFO:root:par2 binary... found (/Applications/SABnzbd.app/Contents/Resources/osx/par2/par2)
INFO:root:unrar binary... found (/Applications/SABnzbd.app/Contents/Resources/osx/unrar/unrar)
INFO:root:unzip binary... found (/usr/bin/unzip)
INFO:root:nice binary... found (/usr/bin/nice)
INFO:root:ionice binary... NOT found!
INFO:root:pyOpenSSL... found (True)
INFO:root:Web dir is /Applications/SABnzbd.app/Contents/Resources/interfaces/Default
INFO:root:Starting SABnzbd.py-0.4.5
INFO:root:[nzbqueue] Saving queue
INFO:root:[sabnzbd] Saving data for queue7.sab in /Users/me/.sabnzbd/cache/queue7.sab
INFO:root:[sabnzbd] Saving data for bytes7.sab in /Users/me/.sabnzbd/cache/bytes7.sab
INFO:root:[sabnzbd] Saving data for rss_data.sab in /Users/me/.sabnzbd/cache/rss_data.sab
INFO:root:[sabnzbd] Saving data for watched_data.sab in /Users/me/.sabnzbd/cache/watched_data.sab
INFO:root:[sabnzbd.misc] Dirscanner starting up
INFO:root:[sabnzbd.misc] URLGrabber starting up
INFO:root:Starting web-interface on localhost:8080
INFO:root:Lauching browser with http://localhost:8080/sabnzbd
INFO:root:[sabnzbd] Saving data for rss_data.sab in /Users/me/.sabnzbd/cache/rss_data.sab
INFO:root:[sabnzbd] Saving data for rss_data.sab in /Users/me/.sabnzbd/cache/rss_data.sab
As you can see, there is no timestamping here...

And in the old error-log file:

Code: Select all

::1 - - [25/Nov/2008:10:53:11] "GET /sabnzbd/connections/ HTTP/1.1" 200 - "" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102
920 Firefox/3.0.4"
::1 - - [25/Nov/2008:10:53:12] "GET /sabnzbd/static/stylesheets/dERROR:root:[newswrapper] Failed to connect: (60, 'Operation timed out') 2@newsserver:119
WARNING:root:[downloader] Thread 3@newsserver:119: timed out
As you can see from this example, there is some half-half timestamping for the browser queries, but what is more important here is that I think the threads are all writing to the same file because it's just so mixed up... The "920..." line is the start of the line, it's not a result of a wrong copy/paste!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Logfiles + threading

Post by shypike »

This behaves different from what we see in Windows and Linux.
I will contact our OSX specialist about this.
g00fy
Newbie
Newbie
Posts: 13
Joined: December 3rd, 2008, 3:28 am

Re: Logfiles + threading

Post by g00fy »

Wouldn't it be better to save the HTTP-requests in a sabnzbd.http.log file? They are not errors after all methinks?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Logfiles + threading

Post by shypike »

It does so on Windows and Linux.
I have sent your issue to rAf, the creator of the OSX binaries.
rAf
Moderator
Moderator
Posts: 546
Joined: April 28th, 2008, 2:35 pm
Location: France
Contact:

Re: Logfiles + threading

Post by rAf »

I'll take a look at this
g00fy
Newbie
Newbie
Posts: 13
Joined: December 3rd, 2008, 3:28 am

Re: Logfiles + threading

Post by g00fy »

Isn't the base code all the same? As far as I understand python is the same on every platform, just the calling binary can be different?
rAf
Moderator
Moderator
Posts: 546
Joined: April 28th, 2008, 2:35 pm
Location: France
Contact:

Re: Logfiles + threading

Post by rAf »

Base code is the same for all, but you always have some specific platform code to handle systems's differences.
Anyway, I've submitted a patch on svn. Hope we could include it on next release.
Post Reply