Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379939 - net-misc/tor - service reload warning
Summary: net-misc/tor - service reload warning
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-20 09:51 UTC by Tomas Psika
Modified: 2011-08-23 12:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Suppress daemon stop warning (0.2.1.30-suppress_daemon_stop_warning.patch,333 bytes, patch)
2011-08-20 09:52 UTC, Tomas Psika
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Psika 2011-08-20 09:51:49 UTC
Running stable gentoo, =net-misc/tor-0.2.1.30.

/etc/init.d/tor script does server reloading wrong.

# start-stop-daemon --stop --signal HUP --pidfile /var/run/tor/tor.pid
start-stop-daemon: 1 process refused to stop

Patch against /etc/init.d/tor included, resolves the issue. Running without --stop argument is fine and HUP signal is sent successfully.

# start-stop-daemon --signal HUP --pidfile /var/run/tor/tor.pid
# echo $?
0
# tail -n 2 /var/log/tor/tor.log
Aug 20 11:34:52.348 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Aug 20 11:34:52.348 [notice] Tor 0.2.1.30 opening log file.

There is a cron daily task which rotates tor logs daily (/etc/logrotate.d/tor) and reloads tor server. Cron sends email warnings then!


Reproducible: Always

Steps to Reproduce:
1. start tor server
2. rc-service tor reload

Actual Results:  
 * Tor configuration (/etc/tor/torrc) is valid.
 * Reloading Tor configuration ...
 * start-stop-daemon: 1 process refused to stop

Expected Results:  
 * Tor configuration (/etc/tor/torrc) is valid.
 * Reloading Tor configuration ...
Comment 1 Tomas Psika 2011-08-20 09:52:55 UTC
Created attachment 283997 [details, diff]
Suppress daemon stop warning
Comment 2 Anthony Basile gentoo-dev 2011-08-23 11:59:58 UTC
With --stop it actually does receive the HUP and reload.  Luckily the --stop fails and so it "works" but this is less than ideal.

I'll put it in without a rev bump since it is not a show stopper bug, and those who have the current init still have something that works, albeit in a poor way.  The next release is coming out soon and will definitely have it.

Thanks for catching that.
Comment 3 Anthony Basile gentoo-dev 2011-08-23 12:28:23 UTC
Its in the tree.  Can people please test.  I know its an obvious fix, but because it does effect tor-0.2.1.30.ebuild which is marked stable, I want to make sure I'm not breaking anything.

Reopen if there is any badness whatsoever.  Thanks again Tomas.