Opened 12 months ago

#3180 new bug

Terminating deluge leaves it in an inconsistent state

Reported by: NavinF Owned by:
Priority: critical Milestone: needs verified
Component: Core Version: 1.3.15
Keywords: Cc:

Description

If I start deluged, terminate it (SIGTERM or SIGKILL) before it has a chance to load all the torrents, and then start deluged again, half my torrents are in the error state:

[ERROR   ] 02:27:01 torrentmanager:1147 on_alert_fastresume_rejected: video.mkv fast resume rejected. check resume(): missing or invalid 'file sizes' entry

Resuming or rechecking the torrents that are in an error state doesn't work, but that might be a separate bug:

[ERROR   ] 06:28:19 torrent:468 Restart deluge to clear this torrent error

This bug is easiest to reproduce if you terminate deluged during startup, but I'm pretty sure I've ran into this bug even when it was just seeding.

I'm guessing that changes to ~/.config/deluge are not done atomically?

I've seen some related tickets such as #3011 which acknowledges that terminating deluged doesn't work. I don't think that registering a shutdown callback like WM_ENDSESSION fixes this bug because processes OOM, VMs get terminated, and servers lose power IRL. A torrent's state should never change to "error" unless there was an IO error involving that specific torrent.

Change History (0)

Note: See TracTickets for help on using tickets.