sabznbd v1.1.1 segfaults on startup (Arch Linux)

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
nicoulaj
Newbie
Newbie
Posts: 4
Joined: January 8th, 2017, 7:11 am

sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by nicoulaj »

My sabnzbd service (from sabnzbd 1.1.1 package on Arch Linux) fails to start after recent updates:

Code: Select all

● sabnzbd.service - SABnzbd binary newsreader
   Loaded: loaded (/usr/lib/systemd/system/sabnzbd.service; disabled; vendor preset: disabled)
   Active: failed (Result: core-dump) since Sun 2017-01-08 11:58:20 CET; 1s ago
  Process: 12884 ExecStart=/opt/sabnzbd/SABnzbd.py -l0 -f /opt/sabnzbd/sabnzbd.ini (code=dumped, signal=SEGV)
 Main PID: 12884 (code=dumped, signal=SEGV)
      CPU: 350ms

janv. 08 11:58:19 storm systemd[1]: Started SABnzbd binary newsreader.
janv. 08 11:58:20 storm systemd[1]: sabnzbd.service: Main process exited, code=dumped, status=11/SEGV
janv. 08 11:58:20 storm systemd[1]: sabnzbd.service: Unit entered failed state.
janv. 08 11:58:20 storm systemd[1]: sabnzbd.service: Failed with result 'core-dump'.
I tried some obvious things without success:
- delete all *.pyc files
- rebuild package
- rebuild all dependencies

I rebuilt the python2 package with debug symbols and here is the full backtrace from the core dump: http://pastebin.com/raw/MQAHAfHE

So it looks that the segmentation fault happens while loading the dbus module (/usr/lib/python2.7/site-packages/_dbus_bindings.so).

Am I the only one getting this ? Any idea what could cause this and how this investigate ?
User avatar
sander
Release Testers
Release Testers
Posts: 8830
Joined: January 22nd, 2008, 2:22 pm

Re: sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by sander »

What happens when you run sabnzbd / sabnzbdplus / SABnzbd.py (I don't know the name on Arch) from the commandline? Up until where does it work? Can you post the sabnzbd.log (set to +Debug) from program start up till crash?
nicoulaj
Newbie
Newbie
Posts: 4
Joined: January 8th, 2017, 7:11 am

Re: sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by nicoulaj »

Same result, SIGSEGV with same core dump and empty sabnzbd.log:

Code: Select all

$ LANG=C sabnzbd                   
/usr/bin/sabnzbd: line 3: 11596 Segmentation fault      (core dumped) python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by jcfp »

nicoulaj wrote:So it looks that the segmentation fault happens while loading the dbus module (/usr/lib/python2.7/site-packages/_dbus_bindings.so).

Am I the only one getting this ? Any idea what could cause this and how this investigate ?
Check for recent changes/updates to whatever package provides dbus and/or the dbus module? The sab package you linked hasn't been modified since mid november.
nicoulaj
Newbie
Newbie
Posts: 4
Joined: January 8th, 2017, 7:11 am

Re: sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by nicoulaj »

Yes, it is definitely not due to a sabnzbd update, but another package/conf.

I tried a few more tests:
* removed the "import dbus" in powersup.py => crashes similarly with libavahi.so from pybonjour.py
* removed the "LoadLibrary" in pybonjour.py => crashes similarly with libdnss.so from zconfig.py, so it looks like it fails to load any native lib
* created some simple python scripts with just "import dbus" and "import ctypes; ctypes.cdll.LoadLibrary('libavahi-client.so.3')" => works OK
* replaced the whole SABnzbd.py script with just "import dbus" => works OK (started via systemd or called directly)

It seems something else in the sabnzbd modules initalization is causing the issue...
I guess next step is to run it in trace mode...
nicoulaj
Newbie
Newbie
Posts: 4
Joined: January 8th, 2017, 7:11 am

Re: sabznbd v1.1.1 segfaults on startup (Arch Linux)

Post by nicoulaj »

I ran sabnzbd with traces (python -m trace -t), the full log is here: https://drive.google.com/uc?id=0BypLM6B ... t=download

It ends like this:

Code: Select all

powersup.py(112): try:
powersup.py(113):     import dbus
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
 --- modulename: __init__, funcname: <module>
__init__.py(10): """
__init__.py(39):            'Bus', 'SystemBus', 'SessionBus', 'StarterBus',
__init__.py(42):            'Interface',
__init__.py(45):            'get_default_main_loop', 'set_default_main_loop',
__init__.py(47):            'validate_interface_name', 'validate_member_name',
__init__.py(48):            'validate_bus_name', 'validate_object_path',
__init__.py(49):            'validate_error_name',
__init__.py(51):            'BUS_DAEMON_NAME', 'BUS_DAEMON_PATH', 'BUS_DAEMON_IFACE',
__init__.py(52):            'LOCAL_PATH', 'LOCAL_IFACE', 'PEER_IFACE',
__init__.py(53):            'INTROSPECTABLE_IFACE', 'PROPERTIES_IFACE',
__init__.py(55):            'ObjectPath', 'ByteArray', 'Signature', 'Byte', 'Boolean',
__init__.py(56):            'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64',
__init__.py(57):            'Double', 'String', 'Array', 'Struct', 'Dictionary',
__init__.py(60):            'DBusException',
__init__.py(61):            'MissingErrorHandlerException', 'MissingReplyHandlerException',
__init__.py(62):            'ValidationException', 'IntrospectionParserException',
__init__.py(63):            'UnknownMethodException', 'NameExistsException',
__init__.py(66):            'service', 'mainloop', 'lowlevel'
__init__.py(69): from dbus._compat import is_py2
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
 --- modulename: _compat, funcname: <module>
_compat.py(3): import sys
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
_compat.py(7): is_py3 = (sys.version_info[0] == 3)
_compat.py(8): is_py2 = not is_py3
__init__.py(70): if is_py2:
__init__.py(71):     __all__.append('UTF8String')
__init__.py(73): __docformat__ = 'restructuredtext'
__init__.py(76): import dbus.exceptions as exceptions
 --- modulename: __init__, funcname: find_module
__init__.py(28):         root, base, target = fullname.partition(self.root_name + '.')
__init__.py(29):         if root:
__init__.py(30):             return
 --- modulename: __init__, funcname: find_module
__init__.py(185):         if fullname in self.known_modules:
__init__.py(187):         return None
 --- modulename: exceptions, funcname: <module>
exceptions.py(1): """D-Bus exceptions."""
exceptions.py(28):            'NameExistsException')
exceptions.py(30): from dbus._compat import is_py3
exceptions.py(33): class DBusException(Exception):
 --- modulename: exceptions, funcname: DBusException
exceptions.py(33): class DBusException(Exception):
exceptions.py(35):     include_tr/usr/bin/sabnzbd: line 3: 28340 Segmentation fault      (core dumped) python2 -m trace -t /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"
Not sure this really helps...
Post Reply