Bug 247927

Summary: Deluge do not start
Product: [Fedora] Fedora Reporter: Jean-François Martin <lokthare>
Component: delugeAssignee: Peter Gordon <peter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.5.2-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-25 05:16:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 244087    
Attachments:
Description Flags
Result of the shell none

Description Jean-François Martin 2007-07-12 02:05:50 UTC
Description of problem:
Since i have update Deluge from updates-testing, it do not start.

Version-Release number of selected component (if applicable):
0.5.2-1

How reproducible:
It is happened every time.

Steps to Reproduce:
1. launch Deluge from the menu or enter deluge in the shell
  
Actual results:
Deluge do not start

Expected results:
The launch of Deluge

Comment 1 Jean-François Martin 2007-07-12 02:05:51 UTC
Created attachment 159026 [details]
Result of the shell

Comment 2 Peter Gordon 2007-07-12 02:45:19 UTC
Hello; and thank you for the bug report.

Your backtrace looks nearly identical to one I had posted on the forums:
http://forum.deluge-torrent.org/viewtopic.php?f=7&t=169

Please remove your $HOME/.config/deluge/persistent.state file (e.g., "rm
/home/username/.config/deluge/persistent.state" from a terminal, or similar) and
see if that works around the issue. (Removing this file should be harmless, as
it contains only some torrent-specific activity data that will be automatically
regenerated by Deluge the next time the torrent in question is active.)

If you're curious of the details, I've hunted this down to the following cause:
This is an unfortunate incompatibility introduced by upstream which hurts
because it uses the Python pickle module to store various activity data across
session, which stores a hardcoded module name in the configuration files it
writes. With Deluge 0.5 and earlier, this was a submodule within the global
'deluge' module. This has changed in 0.5.1+, which means that there is no module
registered with the pickle loader to handle the usage of the activity data. 

Please let me know if this fixes your issue; and, if so, I will add some
upgrading-specific documentation to the package. Unfortunately, arbitrarily
removing files in a user's home directory is not feasible as a package scriptlet
for various reasons, so it cannot be an automatic feature.

Thanks.

Comment 3 Jean-François Martin 2007-07-12 02:57:46 UTC
Hello

I have remove $HOME/.config/deluge/persistent.state file and now i can launch
Deluge.

If it is not possible to remove the file with package, maybe it is possible with
a patch?

Thanks.

Comment 4 Peter Gordon 2007-07-12 03:15:43 UTC
Hmm. I think patching the inital startup script might do the job. I'll see what
I can devise...

Thanks!

Comment 5 Jean-François Martin 2007-07-12 03:38:32 UTC
Maybe it's could be good to have something like :

...
try:
    #pickle module loading
except PersistentStateError
    #remove $HOME/.config/deluge/persistent.state file and try again

Comment 6 Peter Gordon 2007-07-12 07:02:45 UTC
Hmm. I delved through it a bit more deeply and found that you can keep the
persistence data so long as the the old module name is replaced. (In fact, this
is probably the preferred method, so that the running data of the user is kept
across the upgrade and he or she does not need to restart any torrents they had
open, etc.)

E.g., a simple "sed -i -e 's/^(ideluge.deluge/(ideluge.core/g' persistent.state"
should take care of it. That shouldn't be too hard with file.readline() and
re.sub() kung-fu so I'll whip up a patch for this first thing tomorrow. :)

Comment 7 Peter Gordon 2007-07-13 23:23:12 UTC
Okey dokey. After some mucking with the re module a bit, I've got a 55-line
patch that should take care of fixing this issue. I'm updating my F-7 virtual
machine now and will test it there. Once that's done successfully I'll commit it
as an update. (Should be another few hours....man I really need to update this
VM far more often. T_T)

Comment 8 Fedora Update System 2007-07-16 16:53:30 UTC
deluge-0.5.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2007-07-25 05:16:00 UTC
deluge-0.5.2-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.