Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#193 closed bug (Fixed)

Uploaded data amount increases when pausing/changin queue order

Reported by: anonymous Owned by: andar
Priority: minor Milestone:
Component: Core Version:
Keywords: upload, ratio Cc:


There is a bug in that increases the amount of uploaded data (and thereby the share ratio) when a torrent is paused or the order in the queue is changed (it does not appear however when the method of sorting is changed).

To reproduce:

Take a torrent having uploaded a fair amount of data during this session (preferably at least 10% of the total uploaded amount, that way it is more visible). When this torrent is paused or its queue order is changed (by moving it either up or down by one place or by queuing it to the top/bottom), the amount of uploaded data will increase by the amount already uploaded during this session. Also, when you change the queue order, every torrent that also changes queue order by this act will undergo the same increase.


In, the function pickle_state, which is supposed to write the statistics of the torrent in a file in case of a crash or upon closing, saves the amount of uploaded data to torrent.uploaded_memory. The problem is that this function is also called when changing queue order (by the functions queue_top, queue_up, queue_down and queue_bottom) and upon pausing (by set_user_pause), so that any of these actions transforms the amount U of uploaded data into U+x where x is the amount of data uploaded during the current session, so that after n of the actions, your uploaded data amounts to U+n*x; the solution is to either disable pickle_state in these cases (what I have done on my own client as a quick fix, I do not mind the higher vulnerability against crashed that much if it keeps my ratio safe) or to modify the function so as to only save to an external variable that will be restored upon starting Deluge.

Also, so far I have only seen reports of this problem on systems running linux (Ubuntu 8.04 to be more precise, see and, but I suppose that this could also happen under other operating systems (I did not test this though, so I might be wrong).

Change History (3)

comment:1 Changed 16 years ago by andar

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed in svn a while ago.

comment:2 Changed 16 years ago by ethanay

is this fixed in 5.9?

I can confirm that certain torrents with a minimum share ratio or session upload falsely add or multiply the share ratio on pause/resume. So for 175mb file where in reality i've only uploaded ~20mb so far, suddenly Deluge is reporting at that have uploaded 1.5gb of data! crazy.

otherwise, love deluge -- good client :)

running ubuntu hardy 8.04 w/latest, deluge is current version in repositories.

comment:3 Changed 16 years ago by andar


Note: See TracTickets for help on using tickets.