Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#2431 closed bug (Fixed)

deluged doesn't shutdown cleanly with hundreds of torrents

Reported by: rsully Owned by:
Priority: major Milestone: 2.x
Component: Unknown Version: 1.3.7
Keywords: shutdown, components, hang Cc:

Description

This happened once a couple months ago, and again today.

Issuing a pkill deluged does not shutdown deluged. Instead I get a log message like so:

[INFO    ] 11:39:25 daemon:187 Waiting for components to shutdown..

This is after a few weeks of deluged running non-stop, with hundreds of files.

Change History (8)

comment:1 Changed 10 years ago by rsully

Happening again today (haven't killed/restarted since the issue was created).

Bash:

user@ubuntu-deluge:~$ pkill deluge-web
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1792

[... snip: a bunch of preps over 5 minutes]

user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ killall deluged
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pgrep deluged
1792
user@ubuntu-deluge:~$ pgrep deluged
1792

Log:

[INFO    ] 20:59:33 daemon:187 Waiting for components to shutdown..

comment:2 Changed 10 years ago by Cas

  • Milestone changed from 1.3.7 to performance
  • Summary changed from deluged doesn't shutdown to deluged doesn't shutdown with torrents containing hundreds of files

When you say hundreds of files I assume you means torrents containing hundreds of files?

comment:3 Changed 10 years ago by rsully

Hundreds of torrents, where each torrent contains anywhere from 1 file to ~50 files.

Last edited 10 years ago by rsully (previous) (diff)

comment:4 Changed 10 years ago by Cas

  • Milestone changed from performance to 1.4.0
  • Resolution set to Fixed
  • Status changed from new to closed
  • Summary changed from deluged doesn't shutdown with torrents containing hundreds of files to deluged doesn't shutdown cleanly with hundreds of torrents

This should be solved in develop code so closing.

comment:5 Changed 10 years ago by rsully

Maybe related, I just experienced this on 1.3.6:

user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1746
user@ubuntu-deluge:~$ Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 188, in _shutdown
    d = component.shutdown()
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 392, in shutdown
    deferreds.append(component._component_shutdown())
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 202, in _component_shutdown
    d = self._component_stop()
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 155, in _component_stop
    d = maybeDeferred(self.stop)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/core/alertmanager.py", line 77, in stop
    dc.cancel()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 89, in cancel
    raise error.AlreadyCalled
twisted.internet.error.AlreadyCalled: Tried to cancel an already-called event.

comment:6 Changed 10 years ago by rsully

  • Version changed from 1.3.6 to 1.3.7

I am still experiencing this on 1.3.7. I am going to upgrade to 1.3.8. Is there any way to port the change from develop to 1.3.9 when that is released? Or should the change have been included in 1.3.7 and this needs to be reopened?

Over the course of ~5 minutes:

user@ubuntu-deluge:~$ pkill deluge-web
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ ls -la
[...]
-rw-rw-r--  1 user user  76463 Oct  4 16:45 deluged.log
-rw-rw-r--  1 user user    186 Sep 20 14:17 deluge-web.log
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ pkill deluged
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ pgrep deluged
1869
user@ubuntu-deluge:~$ tail deluged.log 
[...]
[INFO    ] 16:45:44 daemon:187 Waiting for components to shutdown..
user@ubuntu-deluge:~$ sudo reboot
user@ubuntu-deluge:~$ 
Broadcast message from user@ubuntu-deluge
	(/dev/pts/2) at 16:48 ...

The system is going down for reboot NOW!
Connection to 192.168.x.x closed by remote host.
Connection to 192.168.x.x closed.

comment:7 Changed 10 years ago by Cas

1.3-stable is an end-of-line branch with only minor fixes to problems that crop up, develop branch code is ongoing with major changes and will eventually be the next major release, i.e. 1.4

comment:8 Changed 7 years ago by Cas

  • Milestone changed from 2.0.x to 2.x

Milestone renamed

Note: See TracTickets for help on using tickets.