Crashes over and over; segmentation fault? hostname?

Support for the Debian/Ubuntu package, created by JCFP.
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
RT1000
Newbie
Newbie
Posts: 2
Joined: February 6th, 2012, 5:30 pm

Crashes over and over; segmentation fault? hostname?

Post by RT1000 »

Hello, I am running a server with SABNZBDplus, just downloaded it yesterday, so it should be the newest version... The following happens after awhile:
First it crashes, and is inaccessible from the browser interface. So i SSH back into the terminal and try to start it up as a daemon

Code: Select all

> sudo /etc/init.d/sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber
Segmentation fault
   ...fail!
I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.

Here's my sabnzbd.error.log:

Code: Select all

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread HTTPServer Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 75, in _start_http_thread
    self.httpserver.start()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1644, in start
    raise socket.error, msg
error: [Errno 99] Cannot assign requested address

Exception in thread CP WSGIServer Thread-12:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1295, in run
    conn.communicate()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1212, in communicate
    req.simple_response("408 Request Timeout")
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 612, in simple_response
    self.wfile.sendall("".join(buf))
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1126, in sendall
    return self._safe_call(False, super(SSL_fileobject, self).sendall, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1078, in _safe_call
    return call(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 748, in sendall
    bytes_sent = self.send(data)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1129, in send
    return self._safe_call(False, super(SSL_fileobject, self).send, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1108, in _safe_call
    raise FatalSSLAlert(*e.args)
FatalSSLAlert: [('SSL routines', 'SSL23_WRITE', 'ssl handshake failure')]

Exception in thread CP WSGIServer Thread-12:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1295, in run
    conn.communicate()
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1212, in communicate
    req.simple_response("408 Request Timeout")
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 612, in simple_response
    self.wfile.sendall("".join(buf))
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1126, in sendall
    return self._safe_call(False, super(SSL_fileobject, self).sendall, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1078, in _safe_call
    return call(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 748, in sendall
    bytes_sent = self.send(data)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1129, in send
    return self._safe_call(False, super(SSL_fileobject, self).send, *args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/wsgiserver/__init__.py", line 1108, in _safe_call
    raise FatalSSLAlert(*e.args)
FatalSSLAlert: [('SSL routines', 'SSL23_WRITE', 'ssl handshake failure')]
I was originally having some problems with SSL, so I turned that off and just went open access, but the problems persisted.

I see it says something about "cannot assign requested address". In sabnzbd.ini, I have the following options entered:
host =
port = 9089
https_port = 9091

I can't access it from :9091, so I just use :9089 and that's fine. I originally tried making host 0.0.0.0, but that resulted in the crashes. I took a look at the logfile and saw problems with assigning the address, so I blanked out the host to nothing, but now I'm getting segmentation faults and can't even start it up half the time. The times I can start it up, it crashes within a minute.

/etc/default/sabnzbd is as follows:

Code: Select all

# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.

# [required] user or uid of account to run the program as:
USER=******************

# [optional] full path to the configuration file of your choice;
#            otherwise, the default location (in $USER's home
#            directory) is used:
CONFIG=

# [optional] hostname/ip and port number to listen on:
HOST=
PORT=

# [optional] extra command line options, if any:
EXTRAOPTS=
Note: I am accessing this from a subdomain of mine, home.mydomain.com, might I put that into the host? I don't require 127.0.0.1 access, but I do need remote and/or LAN access.

Thanks!

Adding: running on Ubuntu 11.10, P4 2.8GHz, 2GB memory, basic server
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Crashes over and over; segmentation fault? hostname?

Post by shypike »

It means that SABnzbd cannot resolve the hostname to an IP address.
Which hostname are you using?
RT1000
Newbie
Newbie
Posts: 2
Joined: February 6th, 2012, 5:30 pm

Re: Crashes over and over; segmentation fault? hostname?

Post by RT1000 »

(editing the file located at /etc/default/sabnzbdplus:)

I've tried
*blanking out the host field
*0.0.0.0
*LAN IP (192.168.XX)
*WAN IP (66.83.XX)
*my subdomain (points to same 66.83.XX).

When I try to start it, 50% of the time it'll start, then crash before I can even load the web interface, and the other 50% it returns:

Code: Select all


$ sudo /etc/init.d/sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber
Segmentation fault
   ...fail!
I'm guessing it's a bad stick of RAM. I won't be able to replace that for about a month, so I'll check back in here when I can do that, unless you have any other ideas to try.

Also I might add, sabnzbdplus works PERFECTLY on my local PC, I would just rather have on my remote, always connected machine with its quick internet tube.

Thanks!
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Crashes over and over; segmentation fault? hostname?

Post by jcfp »

RT1000 wrote:I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.
They aren't indeed, because they happen only in compiled code. Sab itself doesn't have any of that, but does use other libraries that do, most notably cheetah, openssl, and the python executable itself. The only one you could easily eliminate (for testing purposes) is openssl, by removing the python-openssl package from your system. That would kill ssl and https support in sab (at least until that package is reinstalled), but if it stops crashing you'd know where the issue is.
User avatar
sander
Release Testers
Release Testers
Posts: 9265
Joined: January 22nd, 2008, 2:22 pm

Re: Crashes over and over; segmentation fault? hostname?

Post by sander »

jcfp wrote:
RT1000 wrote:I don't know much about python, but I saw elsewhere on the forums that Segmentation Faults are not common.
They aren't indeed, because they happen only in compiled code. Sab itself doesn't have any of that, but does use other libraries that do, most notably cheetah, openssl, and the python executable itself. The only one you could easily eliminate (for testing purposes) is openssl, by removing the python-openssl package from your system. That would kill ssl and https support in sab (at least until that package is reinstalled), but if it stops crashing you'd know where the issue is.
jcfp, are you saying it's probably a bug/error in the compiled code? I would say problematic RAM is a more probable cause; with bad RAM anything can happen, like segmentation faults. I would first run memtest86 to test for bad RAM before anything else.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Crashes over and over; segmentation fault? hostname?

Post by jcfp »

Bad hardware sure is a possible cause, except that program startup doesn't exactly use lots of memory. With 2GB available, and sab using <=1% of that, what are the odds of crashing like this all the time as a result of memory failure?
Post Reply