Page 1 of 1

What is causing deluged to crash?

Posted: Sat Nov 23, 2013 7:07 pm
by ricksebak
Deluged frequently crashes, sometimes multiple times within a few minutes. It's not really reproducable on demand, but I seem to notice it more when a torrent is actively downloading, especially if the torrent is well seeded and moving quickly (or it might just be that I only pay attention to it when I'm actively using it).

I have the log level set to Error, and after each crash I find this in the log:

Code: Select all

14:01:41 ERROR    config:387 No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/config.py", line 385, in load
    self.__config.update(json.loads(data[start:end]))
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Can anyone tell me what caused that? Or does anyone have suggestions on how I might get a more useful error? Thanks in advance.


deluge-web: 1.3.5
libtorrent: 0.15.10.0
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise

Re: What is causing deluge-web to crash?

Posted: Sat Nov 23, 2013 8:16 pm
by Cas
Are you sure it is deluge-web that is crashing and not deluged?

That error is a problem with a config file being loaded.

Re: What is causing deluge-web to crash?

Posted: Sat Nov 23, 2013 8:45 pm
by ricksebak
Thanks for responding. Yeah, deluged is crashing, not deluge-web. Sorry about the confusion.

If there is a problem with a config file, which file and which part of the file is causing deluged to crash? Is there any kind of syntax checker for the config file?

Re: What is causing deluged to crash?

Posted: Sat Nov 23, 2013 11:25 pm
by Cas
deluged crashing is known and many many threads in the forum about it... update to libtorrent 0.16 (see this PPA)... the config error is unrelated but you could try a fresh config to see if it resolves that

also update Deluge to 1.3.6

Re: What is causing deluged to crash?

Posted: Fri Feb 07, 2014 5:47 am
by lildadou
Update libtorrent is a great solution!

Re: What is causing deluged to crash?

Posted: Sat Jan 17, 2015 6:14 pm
by iadmiredeluge
:~# aptitude show deluged
Package: deluged
New: yes
State: installed
Automatically installed: no
Version: 1.3.6-0ubuntu3
Priority: optional
Section: universe/net
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 117 k
Depends: python:any, deluge-common (= 1.3.6-0ubuntu3), python-libtorrent (>= 0.16.0), adduser, lsb-base (>= 3.2-14)
Description: bittorrent client written in Python/PyGTK (daemon)
Deluge is a
scroll down for full-featured, multi-platform, multi-interface BitTorrent client using libtorrent-rasterbar in its back end
scroll down for full-featured, multi-platform, multi-interface BitTorrent client using libtorrent-rasterbar in its back end
nomore.png (504.91 KiB) Viewed 10150 times
full-featured, multi-platform, multi-interface BitTorrent client using libtorrent-rasterbar in its back end and featuring multiple user-interfaces: GTK+, web and console.

It has been designed using the client-server model with a daemon process that handles all the bittorrent activity. The Deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any
platform.

You may want to install this package to run the daemon application on a remote server and connect to it from any user-interface. See: <URL:http://dev.deluge-torrent.org/wiki/UserGuide/ThinClient>
Homepage: http://www.deluge-torrent.org/

:~# cat /etc/issue
Ubuntu 14.04.1 LTS \n \l

Code: Select all

[ERROR   ] 17:37:26 config:387 Expecting property name: line 68 column 1 (char 1926)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/config.py", line 385, in load
    self.__config.update(json.loads(data[start:end]))
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 68 column 1 (char 1926)
^C
What is funny is that it is always different, while trying to see any sort of debug.log:

Code: Select all

:~# deluged -d -c /home/void/.config/deluge -l /home/void/.deluged.log -L debug

^C^CUnhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 295, in addCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 285, in on_depends_started
    return self.components[name]._component_start()
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 124, in _component_start
    d = maybeDeferred(self.start)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 139, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 209, in start
    self.load_state()
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 650, in load_state
    resume_data=resume_data.get(torrent_state.torrent_id))
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 364, in add
    "state", state.torrent_id + ".torrent"))
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 291, in get_torrent_info_from_file
    torrent_info = lt.torrent_info(lt.bdecode(_file.read()))
exceptions.KeyboardInterrupt:
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 295, in addCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 285, in on_depends_started
    return self.components[name]._component_start()
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 124, in _component_start
    d = maybeDeferred(self.start)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 139, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 209, in start
    self.load_state()
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 650, in load_state
    resume_data=resume_data.get(torrent_state.torrent_id))
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 364, in add
    "state", state.torrent_id + ".torrent"))
  File "/usr/lib/python2.7/dist-packages/deluge/core/torrentmanager.py", line 289, in get_torrent_info_from_file
    log.debug("Attempting to create torrent_info from %s", filepath)
  File "/usr/lib/python2.7/logging/__init__.py", line 1140, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1270, in _log
    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
  File "/usr/lib/python2.7/logging/__init__.py", line 1244, in makeRecord
    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
  File "/usr/lib/python2.7/logging/__init__.py", line 248, in __init__
    self.name = name
exceptions.KeyboardInterrupt:
^C^C^C^C^C^C^C^CUnhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 171, in __init__
    reactor.run()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 580, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
At this point i'm done researching it by myself. Random crashes persistence through years of deluge existence is killing me and unfortunately i would better refuse using p2p at all, once and forever, rather than keep digging in this ****, especially python ****... <- Since 1.3.11 works with this config, but starts ignoring port ranges.