Page 1 of 1

Random crashes of daemon

Posted: Wed Dec 02, 2015 1:13 pm
by kanzie
Im running the latest version and have been plagued with crashes almost on a daily basis. This also affected me on previous version and I tried setting it up in supervisor to restart it when crashing but figured finding out the reason for the crashes is better.

Deluge version 1.3.12
libtorrent: 0.15.10.0
Raspbian 7
Label plugin
I think I used Deluge Team PPA or github for installing

The crash happens automatically when Im not using the software but just letting it run. It seems to be related to downloading, meaning when Im not downloading anything it is not as privy to crashing. It is not 100% always crashing when downloading however.

One crash log I saved show:
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 215, in __call__
d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
result = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/deluge/core/alertmanager.py", line 73, in update
self.handle_alerts()
File "/usr/lib/python2.7/dist-packages/deluge/core/alertmanager.py", line 123, in handle_alerts
log.debug("%s: %s", alert_type, alert.message())
exceptions.RuntimeError: basic_string::_S_create

Ill add more crash logs next time it dies on me.

Re: Random crashes of daemon

Posted: Wed Dec 02, 2015 5:27 pm
by kanzie
ran it without daemon mode to see what message it would crash with. It gave me:

"pure virtual method called
terminate called without an active exception
Aborted"

nothing in log about crashing. It is running in info-mode now, switching to debug and starting over.

Re: Random crashes of daemon

Posted: Wed Dec 02, 2015 6:53 pm
by Cas
I don't know what the exact issue is but it's clearly a libtorrent problem. libtorrent 0.15 is unsupported now so you really need to be using the latest version anyway. It's not the latest version but you could try 0.16.18 from wheezy-backports: https://packages.debian.org/search?keyw ... -rasterbar

The only other option is to build libtorrent from source which can take a long time on an RPi unless you try cross-compiling on a desktop machine.

Re: Random crashes of daemon

Posted: Fri Dec 04, 2015 12:22 pm
by Cas
I saw your post in IRC, did you update python-libtorrent as well?

Re: Random crashes of daemon

Posted: Mon Dec 07, 2015 11:17 am
by kanzie
Yeah everything should be updated to the latest versions now. Built using instructions here http://dev.deluge-torrent.org/wiki/Building/libtorrent and everything went fine.
Running deluge 1.3.12
libtorrent 1.0.7.0

Still having crashes quite frequently, latest one when running not as daemon (only way to get any info at all as to why it crashes) says:
terminate called after throwing an instance of 'boost::bad_weak_ptr'
what(): tr1::bad_weak_ptr
Aborted

But mostly it just says segmentation fault.

Re: Random crashes of daemon

Posted: Mon Dec 07, 2015 1:36 pm
by Cas

Re: Random crashes of daemon

Posted: Tue Dec 08, 2015 7:07 am
by kanzie
(gdb) handle SIGILL nostop
Signal Stop Print Pass to program Description
SIGILL No Yes Yes Illegal instruction
(gdb) run
Starting program: /usr/bin/python /usr/bin/deluged -d -c /home/pi/.config/deluge/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
[New Thread 0x75f1d470 (LWP 775)]
[New Thread 0x7571d470 (LWP 776)]
[New Thread 0x74dff470 (LWP 785)]
[New Thread 0x745de470 (LWP 798)]
[Thread 0x745de470 (LWP 798) exited]
terminate called after throwing an instance of 'boost::bad_weak_ptr'
what(): tr1::bad_weak_ptr

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7571d470 (LWP 776)]
0x76df68dc in raise () from /lib/arm-linux-gnueabihf/libc.so.6

Re: Random crashes of daemon

Posted: Tue Dec 08, 2015 11:39 am
by Cas
Did you run `thread apply all backtrace` in gdb to get the full backtrace? Please report these findings to libtorrent: https://github.com/arvidn/libtorrent/issues

Re: Random crashes of daemon

Posted: Wed Dec 09, 2015 2:12 pm
by kanzie
result with thread apply all backtrace:

Code: Select all

Program received signal SIGILL, Illegal instruction.
[New Thread 0x75f1d470 (LWP 11124)]
[New Thread 0x7571d470 (LWP 11125)]
[New Thread 0x74dff470 (LWP 11134)]
[New Thread 0x745de470 (LWP 11147)]
[Thread 0x745de470 (LWP 11147) exited]
terminate called after throwing an instance of 'boost::bad_weak_ptr'
  what():  tr1::bad_weak_ptr

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7571d470 (LWP 11125)]
0x76df68dc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) thread apply all backtrace

Thread 4 (Thread 0x74dff470 (LWP 11134)):
#0  0x76faa504 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x761088d0 in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service::thread_info&, boost::asio::detail::op_queue<boost::asio::detail::task_io_service_operation>&, boost::system::error_code const&) ()
   from /usr/local/lib/libtorrent-rasterbar.so.8
#2  0x7610b090 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /usr/local/lib/libtorrent-rasterbar.so.8
#3  0x7610ba44 in boost::asio::io_service::run() () from /usr/local/lib/libtorrent-rasterbar.so.8
#4  0x760ffdf4 in boost_asio_detail_posix_thread_function () from /usr/local/lib/libtorrent-rasterbar.so.8
#5  0x76fa5c00 in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#6  0x76e95728 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#7  0x76e95728 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x7571d470 (LWP 11125)):
#0  0x76df68dc in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x76dfa65c in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x73640110 in ?? ()
Cannot access memory at address 0x3e8
#3  0x73640110 in ?? ()
Cannot access memory at address 0x3e8
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x75f1d470 (LWP 11124)):
#0  0x76faa504 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0x761312fc in ?? () from /usr/local/lib/libtorrent-rasterbar.so.8
#2  0x761312fc in ?? () from /usr/local/lib/libtorrent-rasterbar.so.8
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x76ff6000 (LWP 11119)):
#0  0x76e88830 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x00101758 in poll_poll (self=0x6d5398, args=<optimized out>) at ../Modules/selectmodule.c:522
#2  0x00069a58 in PyCFunction_Call (func=0x7360abe8, arg=<optimized out>, kw=<optimized out>) at ../Objects/methodobject.c:116
#3  0x00152390 in call_function (oparg=<optimized out>, pp_stack=0x7effe7d0) at ../Python/ceval.c:4021
#4  PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#5  0x00152994 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=0x7effe870, func=0x6f9670) at ../Python/ceval.c:4107
#6  call_function (oparg=<optimized out>, pp_stack=0x7effe870) at ../Python/ceval.c:4042
#7  PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#8  0x00152994 in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=0x7effe910, func=0x6acf30) at ../Python/ceval.c:4107
#9  call_function (oparg=<optimized out>, pp_stack=0x7effe910) at ../Python/ceval.c:4042
#10 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#11 0x00158c08 in PyEval_EvalCodeEx (co=0x6820b0, globals=<optimized out>, locals=<optimized out>, args=0x6eab50, argcount=1, kws=0x7443f4, kwcount=0, defs=
    0x6a5d9c, defcount=1, closure=0x0) at ../Python/ceval.c:3253
#12 0x001527b4 in fast_function (nk=<optimized out>, na=1, n=1, pp_stack=0x7effea18, func=0x6acef0) at ../Python/ceval.c:4117
#13 call_function (oparg=<optimized out>, pp_stack=0x7effea18) at ../Python/ceval.c:4042
#14 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#15 0x00158c08 in PyEval_EvalCodeEx (co=0x76786608, globals=<optimized out>, locals=<optimized out>, args=0x0, argcount=3, kws=0x0, kwcount=0, defs=
    0x6fe26c, defcount=3, closure=0x0) at ../Python/ceval.c:3253
#16 0x0016b3a0 in function_call (func=0x722a30, arg=0x6fe760, kw=<optimized out>) at ../Objects/funcobject.c:526
#17 0x0006a1ac in PyObject_Call (func=0x722a30, arg=<optimized out>, kw=<optimized out>) at ../Objects/abstract.c:2529
#18 0x0007d6c0 in instancemethod_call.7673 (func=0x722a30, arg=0x6fe760, kw=0x0) at ../Objects/classobject.c:2602
#19 0x0006a1ac in PyObject_Call (func=0x6fe440, arg=<optimized out>, kw=<optimized out>) at ../Objects/abstract.c:2529
#20 0x0007c3bc in slot_tp_init.24730 (self=<optimized out>, args=0x76831058, kwds=0x0) at ../Objects/typeobject.c:5677
#21 0x000c2830 in type_call.24388 (type=0x44b530, args=0x76831058, kwds=0x0) at ../Objects/typeobject.c:737
#22 0x0006a1ac in PyObject_Call (func=0x44b530, arg=<optimized out>, kw=<optimized out>) at ../Objects/abstract.c:2529
#23 0x001528ac in do_call (nk=<optimized out>, na=2, pp_stack=0x7effee18, func=0x44b530) at ../Python/ceval.c:4239
#24 call_function (oparg=<optimized out>, pp_stack=0x7effee18) at ../Python/ceval.c:4044
#25 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#26 0x00158c08 in PyEval_EvalCodeEx (co=0x76d087b8, globals=<optimized out>, locals=<optimized out>, args=0x27d050, argcount=0, kws=0x2e57f0, kwcount=0,
    defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253
#27 0x001527b4 in fast_function (nk=<optimized out>, na=0, n=0, pp_stack=0x7effef20, func=0x7678a3b0) at ../Python/ceval.c:4117
#28 call_function (oparg=<optimized out>, pp_stack=0x7effef20) at ../Python/ceval.c:4042
#29 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:2666
#30 0x00158c08 in PyEval_EvalCodeEx (co=0x76ce28d8, globals=<optimized out>, locals=<optimized out>, args=0x29ec98, argcount=0, kws=0x0, kwcount=0, defs=
    0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253
#31 0x0016b30c in PyEval_EvalCode (locals=0x76d94660, globals=0x76d94660, co=0x76ce28d8) at ../Python/ceval.c:667
#32 run_mod (mod=<optimized out>, filename=<optimized out>, globals=0x76d94660, locals=<optimized out>, flags=0x7efff12c, arena=0x2d7208)
    at ../Python/pythonrun.c:1365
#33 0x0016ba10 in PyRun_FileExFlags (fp=0x2e56a0, filename=<optimized out>, start=<optimized out>, globals=0x76d94660, locals=0x76d94660, closeit=1, flags=
    0x7efff12c) at ../Python/pythonrun.c:1351
#34 0x0016bc00 in PyRun_SimpleFileExFlags (fp=0x2e56a0, filename=0x7efff3e3 "/usr/bin/deluged -d -c /home/pi/.config/deluge/", closeit=1, flags=0x7efff12c)
    at ../Python/pythonrun.c:943
#35 0x0016cfd0 in Py_Main (argc=<optimized out>, argv=0x7efff2a4) at ../Modules/main.c:639
#36 0x76de181c in __libc_start_main () from /lib/arm-linux-gnueabihf/libc.so.6
#37 0x000208dc in _start ()