Hi all.
I've picked up a new problem somewhere along the line, possibly during my upgrade to FreeBSD9. Or maybe it's the clearing out of gtk dependencies since switching over to an install from ports rather than building my own Deluge from Git.
Whenever files are moved by Deluge on completion to another dir specified in a label, or when files are deleted from within Deluge, it crashes and I have to restart the daemon. Weirdest thing is that files moving from Downloading location to default Completed location do not have this effect.
Any pointers on what could cause this? And how to fix it?
FreeBSD 9.0-RELEASE #0
libtorrent-rasterbar-0.15.9
py27-libtorrent-rasterbar-0.15.9
deluge-1.3.3,1
Thanks for any help.
Moving/Deleting files crashes Deluged
Re: Moving/Deleting files crashes Deluged
Hard crashes like that are potentially libtorrent related. Do you have an errors in logs? If you can repeat, it would best to get a backtrace.
Re: Moving/Deleting files crashes Deluged
Sorry for the delay getting back - I've been trying to catch it crashing .
There is nothing in the logs, and I turned on the full debug mode too.
The only thing I can see going on is a message coming up on the cmd line saying "Fatal Python error: PyEval_RestoreThread: NULL tstate" as it crashed just now.
There is nothing in the logs, and I turned on the full debug mode too.
The only thing I can see going on is a message coming up on the cmd line saying "Fatal Python error: PyEval_RestoreThread: NULL tstate" as it crashed just now.
Re: Moving/Deleting files crashes Deluged
Just to clarify is it deluge-gtk crashing or deluged?
You will need to run which ever one is crashing in gdb and get a backtrace .
You will need to run which ever one is crashing in gdb and get a backtrace .
Re: Moving/Deleting files crashes Deluged
It's deluged crashing, running headless in FreeBSD9, installed from ports.
I'm almost prepared to put money on it being the unchecked "Enable GUI and gtk dep (GUI files always installed)" option that's doing it. Probably cos of some gnome filesystem doohickey.
I'm almost prepared to put money on it being the unchecked "Enable GUI and gtk dep (GUI files always installed)" option that's doing it. Probably cos of some gnome filesystem doohickey.
Re: Moving/Deleting files crashes Deluged
I've not had a chance to run deluged in gdb yet - learning curve climbing required and I've just been too busy with real life to think about starting to work out how to do it.
One thing I have noticed is that when a torrent completes and the label rules move it out to another dir, the torrent goes into ERROR mode and says it can't find the file it just moved. It's still looking in the uncompleted download folder.
One thing I have noticed is that when a torrent completes and the label rules move it out to another dir, the torrent goes into ERROR mode and says it can't find the file it just moved. It's still looking in the uncompleted download folder.
Re: Moving/Deleting files crashes Deluged
Its actually quite straightforward to run deluged in gdb:.Spadge wrote:I've not had a chance to run deluged in gdb yet
Code: Select all
gdb --args python /usr/bin/deluged -d
(gdb) run
#After crash
(gdb) bt
That's weird.Spadge wrote: One thing I have noticed is that when a torrent completes and the label rules move it out to another dir, the torrent goes into ERROR mode and says it can't find the file it just moved. It's still looking in the uncompleted download folder.
Re: Moving/Deleting files crashes Deluged
After much battling with gdb and python, I've finally managed to get deluged to run in gdb.
Easiest way?
$ service deluged start
$ gdb python `cat /var/run/deluged/pid`
(gdb) c
Now I just need to wait for it to crash with the usual "Fatal Python error: PyEval_RestoreThread: NULL tstate"
Easiest way?
$ service deluged start
$ gdb python `cat /var/run/deluged/pid`
(gdb) c
Now I just need to wait for it to crash with the usual "Fatal Python error: PyEval_RestoreThread: NULL tstate"
Re: Moving/Deleting files crashes Deluged
And finally, the moment you have all been waiting for ...
Thanks
Code: Select all
(gdb) c
Continuing.
Fatal Python error: PyEval_RestoreThread: NULL tstate
Program received signal SIGABRT, Aborted.
[Switching to Thread 2d007400 (LWP 102317/python2.7)]
0x000000002cbf034c in thr_kill () from /lib/libc.so.7
(gdb) bt
#0 0x000000002cbf034c in thr_kill () from /lib/libc.so.7
#1 0x000000002cc894cc in abort () from /lib/libc.so.7
#2 0x000000000049f01e in Py_FatalError ()
#3 0x000000000047aee9 in PyEval_RestoreThread ()
#4 0x0000000032e3def8 in allow_threading<libtorrent::big_number (libtorrent::torrent_handle::*)() const, libtorrent::big_number>::operator()<libtorrent::torrent_handle> () from /usr/local/lib/python2.7/site-packages/libtorrent.so
#5 0x0000000032e3dd03 in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<allow_threading<libtorrent::big_number (libtorrent::torrent_handle::*)() const, libtorrent::big_number>, boost::python::default_call_policies, boost::mpl::vector2<libtorrent::big_number, libtorrent::torrent_handle&> > >::operator() () from /usr/local/lib/python2.7/site-packages/libtorrent.so
#6 0x0000000033e8ad3b in boost::python::objects::function::call ()
from /usr/local/lib/libboost_python.so
#7 0x0000000033e8cffa in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke ()
from /usr/local/lib/libboost_python.so
#8 0x0000000033e930de in boost::function0<void>::operator() ()
from /usr/local/lib/libboost_python.so
#9 0x0000000033e92e65 in boost::python::handle_exception_impl ()
from /usr/local/lib/libboost_python.so
#10 0x0000000033e8ccaf in function_call ()
from /usr/local/lib/libboost_python.so
#11 0x000000000041d4f9 in PyObject_Call ()
#12 0x000000000047e03c in PyEval_EvalFrameEx ()
#13 0x000000000047b9a1 in PyEval_EvalCodeEx ()
#14 0x00000000004d4fdb in PyFunction_SetClosure ()
#15 0x000000000041d4f9 in PyObject_Call ()
#16 0x000000000048010a in PyEval_EvalFrameEx ()
#17 0x0000000000482552 in _PyEval_SliceIndex ()
#18 0x000000000047de28 in PyEval_EvalFrameEx ()
#19 0x0000000000482552 in _PyEval_SliceIndex ()
#20 0x000000000047de28 in PyEval_EvalFrameEx ()
#21 0x000000000047b9a1 in PyEval_EvalCodeEx ()
#22 0x00000000004825c8 in _PyEval_SliceIndex ()
#23 0x000000000047de28 in PyEval_EvalFrameEx ()
#24 0x000000000047b9a1 in PyEval_EvalCodeEx ()
#25 0x00000000004d4fdb in PyFunction_SetClosure ()
#26 0x000000000041d4f9 in PyObject_Call ()
---Type <return> to continue, or q <return> to quit---
#27 0x0000000000420be3 in PyMethod_New ()
#28 0x000000000041d4f9 in PyObject_Call ()
#29 0x000000000045dda6 in _PyObject_SlotCompare ()
#30 0x0000000000455e54 in _PyType_Lookup ()
#31 0x000000000041d4f9 in PyObject_Call ()
#32 0x000000000047e03c in PyEval_EvalFrameEx ()
#33 0x000000000047b9a1 in PyEval_EvalCodeEx ()
#34 0x00000000004825c8 in _PyEval_SliceIndex ()
#35 0x000000000047de28 in PyEval_EvalFrameEx ()
#36 0x000000000047b9a1 in PyEval_EvalCodeEx ()
#37 0x000000000047b1b6 in PyEval_EvalCode ()
#38 0x000000000049fe9e in PyRun_FileExFlags ()
#39 0x000000000049f8a0 in PyRun_SimpleFileExFlags ()
#40 0x000000000041490f in Py_Main ()
#41 0x0000000000413e6f in main ()
(gdb)
Re: Moving/Deleting files crashes Deluged
Also, last bits from the deluged server logs:
Code: Select all
[ERROR ] 19:01:01 rpcserver:303 Exception calling RPC request: '[i]lengthy hash[/i]'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.4-py2.7.egg/deluge/core/rpcserver.py", line 298, in dispatch
ret = self.factory.methods[method](*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.4-py2.7.egg/deluge/core/core.py", line 435, in get_torrents_status
status_dict[torrent_id] = self.get_torrent_status(torrent_id, keys, diff)
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.4-py2.7.egg/deluge/core/core.py", line 417, in get_torrent_status
status = self.torrentmanager[torrent_id].get_status(keys, diff)
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.4-py2.7.egg/deluge/core/torrentmanager.py", line 277, in __getitem__
return self.torrents[torrent_id]
KeyError: '[i]same lengthy hash as above[/i]'