Red Hat Bugzilla – Bug 253950
Enabling UPnP causes seg fault
Last modified: 2007-11-30 17:12:14 EST
Description of problem: Using the default settings, deluge works great. However,
when I enable the UPnP checkbox and restart deluge, it segfaults before painting
Version-Release number of selected component (if applicable): 0.5.3-1.fc7.x86_64
How reproducible: Always
Steps to Reproduce:
1. Check UPnP checkbox
2. Restart deluge
3. Segmentation fault
Actual results: No worky
Expected results: Worky
Additional info: Here's the output at the command line, if it is any help.
no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Scanning plugin dir /usr/share/deluge/plugins
Initialising plugin TorrentNotification
Initialising plugin NetworkHealth
Initialising plugin NetworkGraph
Initialising plugin RSS
Initialising plugin TorrentSearch
Initialising plugin TorrentCreator
Initialising plugin DesiredRatio
Initialising plugin BlocklistImport
My Fedora 7 system is fully up to date. I even rebuilt the RPM package but it
still seg faulted with UPnP on. I would like UPnP functionality so I don't have
to adjust my server/router. My server/router is fully configured for UPnP and it
works great with Windows clients and other Linux programs that use UPnP.
FYI the latest version of deluge is 0.5.4.1 while the Fedora repo contains
0.5.3. The changelog indicates that there are UPnP fixes.
I downloaded the 0.5.4.1 tarball, compiled, and installed it. It still seg
faults with UPnP enabled. I guess the project team needs to be informed of this...
Thanks for your bug report; I'm going to push 0.5.4.1 within the next day or so
and will look into this further with that codebase.
I've found from my brief local testing so far that the TorrentPieces plugin
often causes segfaults (though magically and frustratingly, it does not when run
through a debugger...); do you have this enabled? If so, does it still crash
when it is not?
I do not have any plugins enabled. I don't even see TorrentPieces in my list of
Hmm. I recently pushed 0.5.5 RC1 (0.5.4.1.95) into the updates-testing
repository. Would you please try this and tell me if it segfaults?
Also, does removing your $HOME/.config/deluge directory help? (Alternatively,
just move or rename it so that your preferences/etc. are not discarded.)
I updated to deluge-0.5.4.1.95-1.fc7.x86_64 but it still seg faults the same
way. I have already deleted my .config/deluge directory and tried again but it
still seg faults.
It only seg faults when UPnP is enabled.
Are you not seeing this seg fault? It's simple. Open preferences, click the
"Enable UPnP" checkbox, restart deluge. Bam-o seg fault.
If I have any spare time to give I might run it through gdb and see what's
causing it, but are you not able to see any seg fault?
Well, I've been running Deluge with UPnP enabled for as long as I can remember
without any noticeable problems.
However, I do not know for certain if my router in fact supports UPnP, so maybe
what's happening is that it's having an error when reading the response sent
back. (Though, it seems as if it does, since enabling UPnP tends to increase my
upstream speed somewhat..) I'll see if I can setup a virtual machine or similar
to emulate this but at the moment, having the UPnP option enabled appears to
cause no breakages for me. :(
I am using a Fedora 6 install for my router. I turned off the upnpd service and
tried deluge again. Still seg faults. That rules out any communication failures.
If no one else is able to reproduce the issue I will drag myself to gdb it.
Created attachment 201621 [details]
OK, I have done some basic debugging. I have attached logs of running gdb with
a backtrace, a strace, and catchsegv. It seems to be involved with epolling
and/or futexes, which I have very little experience with.
P.S. I am not alone. This has been posted on the deluge bug tracker.
I'm afraid I've as of yet been unable to reproduce the error. :(
The polling/futex stuff in that backtrace looks very much like a
libtorrent-internal threading bug, which propagates its way back to Deluge.
I'll poke at this some more tomorrow.
Whooo! 0.5.6 seems to have the bug fix!
I will try a torrent out to make sure UPnP is really working, and at that time I
will close the bug if all looks well.
P.S. 0.5.6.2 is now out. Pretty fast release for some fixes.
Good to hear, Michael. Thanks for the notice.
The point-two release is in testing now, while 0.5.6 is stable. I'll push the
update to stable in about a week or so assuming no major bugs.