Synology bug - will not open web page

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
coops
Newbie
Newbie
Posts: 3
Joined: June 7th, 2017, 6:45 am

Synology bug - will not open web page

Post by coops »

Sabnzbd is great - but I thought i'd mention an intermittent bug that seems to have arrived since vers 2, and is still an occasional problem with the latest 2.0.1-26 - on a Synology 412+ running DSM 6.1 ( DSM 6.1.1-15101 Update 4, the latest).

Sometimes, but not always, after turning on the Synology I get the following error message when trying to view Sabnzbd :-

The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/volume1/@appstore/sabnzbd/share/SABnzbd/cherrypy/_cprequest.py", line 670, in respond
response.body = self.handler()
File "/volume1/@appstore/sabnzbd/share/SABnzbd/cherrypy/lib/encoding.py", line 220, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/volume1/@appstore/sabnzbd/share/SABnzbd/cherrypy/_cpdispatch.py", line 60, in __call__
return self.callable(*self.args, **self.kwargs)
File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/interface.py", line 358, in index
bytespersec_list = BPSMeter.do.get_bps_list()
File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/bpsmeter.py", line 322, in get_bps_list
self.add_empty_time()
File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/bpsmeter.py", line 285, in add_empty_time
self.bps_list.extend([0] * nr_diffs)
MemoryError



NOTE - ALSO..... stopping and then restarting Sabnzbd fixes the issue - it is then accessible entirely as usual. ALSO - on my iPad I have an 'whatsab' installed, & when the error is 'active' ( ie before stopping & restarting) I WAS able to send an NZB file to Sabnzbd, which seemed to start downloading ( looking at the info on the whatsab app).... & further, AFTER sending this nzb to Sab, I was then able to access Sabnzbd as usual from the Synology DSM webpage.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Synology bug - will not open web page

Post by sander »

Code: Select all

self.bps_list.extend([0] * nr_diffs)
MemoryError
So ... that extend() is consuming too much memory?

Can we emulate that?

Code: Select all

>>> mylist = [1,2]
>>> mylist.extend([0] * 10 )
>>> mylist
[1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]



>>> import sys
>>> mylist.extend([0] * sys.maxint  )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

Yes, there it is!

So nr_diffs is too big?

Code: Select all

>>> mylist.extend([0] * 2147483647  )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError
>>> mylist.extend([0] * 214748364  )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError
>>>
>>> mylist.extend([0] * 21474836  )
>>>
So: 21.474.836 is OK on my machine, and 214.748.364 (10 times bigger) is too big. Thus nr_diffs is somewhere in that region? Looks big to me.

Relevant code:

Code: Select all

    def add_empty_time(self):
        nr_diffs = int(time.time() - self.speed_log_time)
        if nr_diffs > 1:
            self.bps_list.extend([0] * nr_diffs)
On each webpage login and F5-refresh, the nr_diffs is higher than before:

Code: Select all

2017-06-07 15:52:47,185::INFO::[bpsmeter:284] SJ: nr_diffs is 101
2017-06-07 15:53:36,468::INFO::[bpsmeter:284] SJ: nr_diffs is 150
2017-06-07 15:53:42,281::INFO::[bpsmeter:284] SJ: nr_diffs is 156
2017-06-07 15:54:41,435::INFO::[bpsmeter:284] SJ: nr_diffs is 215
2017-06-07 15:58:15,769::INFO::[bpsmeter:284] SJ: nr_diffs is 429
2017-06-07 15:58:25,356::INFO::[bpsmeter:284] SJ: nr_diffs is 439
2017-06-07 15:58:26,752::INFO::[bpsmeter:284] SJ: nr_diffs is 440
2017-06-07 15:58:30,812::INFO::[bpsmeter:284] SJ: nr_diffs is 444
2017-06-07 16:04:12,003::INFO::[bpsmeter:284] SJ: nr_diffs is 785
2017-06-07 16:07:17,552::INFO::[bpsmeter:284] SJ: nr_diffs is 971
2017-06-07 16:12:35,562::INFO::[bpsmeter:284] SJ: nr_diffs is 1289

User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology bug - will not open web page

Post by safihre »

This is a nice bug, I like it :D
Because it's my fault: I never thought of a situation like this could happen when the last BPS measurement was very long ago, so long that it could cause problems.

Let me fix this!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology bug - will not open web page

Post by safihre »

Fixed it.
Will be in 2.0.1 Final.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Cpuroast
Release Testers
Release Testers
Posts: 69
Joined: December 15th, 2010, 11:19 pm

Re: Synology bug - will not open web page

Post by Cpuroast »

I assume you mean 2.1.0 Final as 2.0.1 is already out and about :)
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Synology bug - will not open web page

Post by safihre »

Oh yes :D Sorry, 2.1.0
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
coops
Newbie
Newbie
Posts: 3
Joined: June 7th, 2017, 6:45 am

Re: Synology bug - will not open web page

Post by coops »

ok - thanks!

Glad to have found a 'nice bug' !

Learnt and made an app for myself in Swift... so a bug with an easily identifiable and fixable bug is 'nice' i suppose ;-)
Post Reply