Opened 12 years ago

Closed 7 years ago

Last modified 7 years ago

#2776 closed Bug (fixed)

Resume information and preferences are lost at system crash

Reported by: tazagul Owned by: charles
Priority: Normal Milestone: 1.92
Component: libtransmission Version: 1.75
Severity: Normal Keywords:
Cc: tazagul@…, victory_at85@…

Description

When my system shuts down due to power failure (which can happen often), all of my resume information for the active torrents I am downloading is lost. Which means, the files I have checked to download and the priority information is lost and all reset to normal.

It does re-verify my data and does not lose any existing downloads, but I have to select all the files I want and do not want to download. It will also lose track of the location of the data if it is not in the default directory.

I am using Ubuntu 9.10-64bit with Transmission 1.75 (9117) fully up-to-date.

Change History (28)

comment:1 Changed 12 years ago by tazagul

  • Cc tazagul@… added

comment:2 Changed 12 years ago by livings124

  • Version changed from 1.75+ to 1.75

comment:3 Changed 12 years ago by livings124

  • Summary changed from Resume information and preferences are lost at system shutdown to Resume information and preferences are lost at system crash

comment:4 Changed 12 years ago by tazagul

After a new power outage shutdown (which I can do nothing about), I just checked the ~/.config/transmission/resume/ directory before restarting transmission. The five torrents I am downloading are listed there, but all the files are 0 length. If I shutdown transmission normally and check the same directory, the five torrents I am downloading range from about 38k to 170k.

comment:5 Changed 12 years ago by charles

  • Keywords needinfo added

I don't know how Transmission could zero out the resume files when the power shuts down. I think it's more likely that the disk is getting full at some point before the power goes out, and that causes the new .resume files to not be able to be written to.

Have there been any more power outages since then? If you were to look at the files in .resume and see that the files were nonzero, and just pulled the plug on the computer, are they nonzero when you reboot?

comment:6 Changed 12 years ago by charles

tazagul: ping

comment:7 Changed 12 years ago by bugmenot

I can confirm the same issue under Transmission 1.83. It doesn't happen with all of my torrents and it can happen while seeding them.

comment:8 Changed 12 years ago by livings124

bugmenot: Information based on the current release, 1.91, would be a lot more helpful.

comment:9 Changed 12 years ago by bugmenot

livings124: 1.90 was crashing on me so I downgraded to 1.83. I'll update to 1.91 as soon as I can but I really hope the power outages don't happen again and obviously won't try to reproduce them myself. I think that you should check the code and see if some values are not being correctly stored/flushed to the disk. Maybe I'll check it out if I have the time but I'm not at all familiar with the source.

comment:10 Changed 12 years ago by charles

bugmenot: what OS are you using?

comment:11 Changed 12 years ago by bugmenot

charles: I'm using Ubuntu 9.10 Karmic with Transmission installed from ppa:transmissionbt/ppa. I should note that my filesystem is EXT4.

comment:12 Changed 12 years ago by charles

Hm. bugmenot, could you be more specific about exactly what information was lost as a result of the system crash?

comment:13 Changed 12 years ago by bugmenot

charles: Let me clarify, it wasn't a system crash, the power was lost so the PC turned off immediately.

I'm not sure about exactly what information was lost. I can confirm that the location (of at least some) of the torrents was it (so it was reset to default and the torrent started downloading from scratch).

So I set the correct location for the torrents and then had to redownload some parts (even in completed ones). I think that this is related to the newly downloaded data.

comment:14 Changed 12 years ago by charles

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

I'm not able to reproduce this problem. Transmission 1.91 saves the stats and .resume files every two minutes, so even in the worst case you shouldn't lose more than two minutes' worth of changes.

I've repeated this test three times this morning and the results are consistent with that -- in none of the three tests did I lose more than two minutes' worth of changes.

Because of the tests' results, I'm going to close this ticket until someone can provide specifics about what they lost in 1.91 or higher. If someone has that information, please feel encouraged to reopen this ticket.

comment:15 Changed 12 years ago by bugmenot

I am using Transmission 1.91 now and have had two more power losses but this time the location of the torrents was preserved so I think that the problem has been fixed.

comment:16 Changed 12 years ago by tazagul

I went ahead and setup the 1.91 version of Transmission last week, instead of the 1.75 that is being used with Ubuntu 9.10. (I was still having problems with the 1.75 version.) I don't believe I have had any crashes yet with 1.91. If I have any problems I will create a new ticket under version 1.91. Thanks.

comment:17 Changed 12 years ago by tazagul

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 1.75 to 1.91

Ok, it is now 3 hours after my last comment when all seemed fine. My computer just rebooted (crashed) from a power outage after running for 2-3 days without a reboot at all. When I restarted transmission 1.91, it didn't lose any data that I can tell, but it lost all the settings information for the particular torrent I am downloading. This is the same scenario I had when I started the ticket 7 weeks ago. This particular torrent has many files and I only want to download some of them. When I restarted transmission, it went through a verification process and verified the data but reset all the download boxes to "download" and all the priorities to "Normal". I am using the download folder defined in my preferences. FYI, I am using fully up-to-date "Ubuntu 9.10 64bit" with "Transmission 1.91 (10268)".

comment:18 Changed 12 years ago by livings124

  • Version changed from 1.91 to 1.75

comment:19 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.92
  • Resolution set to fixed
  • Status changed from reopened to closed

Ahh, this blog post sheds some light on the story: http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/

that open() -> write() -> close() -> rename() process is exactly what Transmission is doing when saving .resume files.

The fsync() call advocated there has been added to trunk in r10343 and to 1.9x (for 1.92) in r10342.

comment:20 Changed 12 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

reopening for attribution

comment:21 Changed 12 years ago by charles

  • Component changed from Transmission to libtransmission

comment:22 Changed 12 years ago by charles

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

comment:23 Changed 12 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

reopened for attribution

comment:24 Changed 12 years ago by charles

  • Owner set to charles
  • Status changed from reopened to new

comment:25 Changed 12 years ago by charles

  • Keywords needinfo removed
  • Resolution set to fixed
  • Status changed from new to closed

comment:26 Changed 7 years ago by vijayshankar_85

  • Cc victory_at85@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

I am using Linux Mint with 2.82 transmission and face same problem, Computer shutdown due power cut, its happen many times before but last time I lost all active download and they start as a fresh one, even Transmission also start as I am using it first time with the caution that all sharing data eagle/illegal responsibility should be mine. I have lost over 1.5 GB data.

Please reply what went wrong ?

comment:27 Changed 7 years ago by x190

You need to get a UPS unit.

Last edited 7 years ago by x190 (previous) (diff)

comment:28 Changed 7 years ago by x190

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.