Bug 253950 - Enabling UPnP causes seg fault
Enabling UPnP causes seg fault
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: deluge (Show other bugs)
7
All Linux
low Severity high
: ---
: ---
Assigned To: Peter Gordon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-23 00:49 EDT by Michael Cronenworth
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 0.5.6-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 02:59:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
deluge-0.5.4.1-logs.tar.bz2 (37.91 KB, application/x-bzip-compressed-tar)
2007-09-20 22:36 EDT, Michael Cronenworth
no flags Details

  None (edit)
Description Michael Cronenworth 2007-08-23 00:49:37 EDT
Description of problem: Using the default settings, deluge works great. However,
when I enable the UPnP checkbox and restart deluge, it segfaults before painting
the window.


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.
$ deluge
no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Applying preferences
Pickling state...
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
Applying preferences
Starting DHT...
Showing window
Segmentation fault

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.
Comment 1 Michael Cronenworth 2007-08-23 01:09:26 EDT
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.
http://dev.deluge-torrent.org/browser/tags/deluge-0.5.4.1/ChangeLog

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...
Comment 2 Peter Gordon 2007-08-23 01:24:21 EDT
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?
Comment 3 Michael Cronenworth 2007-08-23 01:35:35 EDT
I do not have any plugins enabled. I don't even see TorrentPieces in my list of
plugins.
Comment 4 Peter Gordon 2007-09-08 15:20:14 EDT
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.)

Thanks.
Comment 5 Michael Cronenworth 2007-09-08 16:34:12 EDT
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?
Comment 6 Peter Gordon 2007-09-08 17:17:46 EDT
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. :(
Comment 7 Michael Cronenworth 2007-09-08 18:15:26 EDT
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.
Comment 8 Michael Cronenworth 2007-09-20 22:36:20 EDT
Created attachment 201621 [details]
deluge-0.5.4.1-logs.tar.bz2

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.
http://dev.deluge-torrent.org/ticket/494
Comment 9 Peter Gordon 2007-10-07 04:03:28 EDT
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.

Comment 10 Michael Cronenworth 2007-11-13 17:52:38 EST
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.
Comment 11 Peter Gordon 2007-11-13 18:15:36 EST
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.

Note You need to log in before you can comment on or make changes to this bug.