[Shepherd] loses track of Tor

  • Done
  • quality assurance status badge
Details
3 participants
  • Attila Lendvai
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Tobias Geerinckx-Rice
Severity
important
T
T
Tobias Geerinckx-Rice wrote on 10 Jun 2020 17:20
(address . bug-guix@gnu.org)
87v9jzq76m.fsf@nckx
All,

Toggle snippet (13 lines)
~ λ while :; do sudo herd restart tor; done
Service tor is not running.
Service tor has been started.
Service tor has been stopped.
Service tor could not be started.
Service tor is not running.
Service tor could not be started.
^C
~ λ pgrep tor
22926
23004

This has (this year) happened to nginx in tight edit.conf/restart
loops too, but I can't say if the two are at all related.

Here's the output of ‘herd status’ but it's not very useful to me:

Toggle snippet (30 lines)
λ sudo herd status
Started:
+ dovecot
+ file-system-/dev/pts
+ file-system-/dev/shm
+ file-system-/gnu/store
+ file-systems
+ guix-daemon
+ loopback
+ mcron
+ networking
+ nginx
+ root
+ root-file-system
+ smtpd
+ ssh-daemon
+ syslogd
+ term-tty1
+ udev
+ urandom-seed
+ user-file-systems
+ user-processes
+ virtual-terminal
Stopped:
- tor
One-shot:
* host-name
* user-homes

He looks guilty:

Toggle snippet (4 lines)
λ sudo cat /var/run/tor/tor.pid
cat: /var/run/tor/tor.pid: No such file or directory

From ps auxwww:

Toggle snippet (9 lines)
~ λ head -n6 /gnu/store/5ivhkbd0pzhnnmk38yn7cygcyd02kkk5-torrc
### These lines were generated from your system configuration:
User tor
DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
Log notice syslog
### End of automatically generated lines.

No contradictory lines added.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXuD6IQAKCRANsP+IT1Vt
eQedAP9vnibaH14h2+oarcF0SSwPnB4FhrWINmEPy/nPFKGmbQEAnFneLqmT+2xH
XLqS9zVAT6F+S2VQjgoGzkZCEcXQAgY=
=rThD
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 11 Jun 2020 12:50
control message for bug #41791
(address . control@debbugs.gnu.org)
87lfktc1vb.fsf@gnu.org
severity 41791 important
quit
L
L
Ludovic Courtès wrote on 12 Jun 2020 00:11
Re: bug#41791: [Shepherd] loses track of Tor
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 41791-done@debbugs.gnu.org)
87tuzh8d7a.fsf@gnu.org
Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

Toggle quote (12 lines)
> ~ λ while :; do sudo herd restart tor; done
> Service tor is not running.
> Service tor has been started.
> Service tor has been stopped.
> Service tor could not be started.
> Service tor is not running.
> Service tor could not be started.
> ^C
> ~ λ pgrep tor
> 22926
> 23004

Oops, this one is fixed by b6b95685d0b478698d648f13afd927b1e1700d99.
It’s a regression introduced when switching to the Shepherd 0.8.1.

Toggle quote (3 lines)
> This has (this year) happened to nginx in tight edit.conf/restart
> loops too, but I can't say if the two are at all related.

The nginx issue may be different. The Shepherd 0.8.0 included fixes
that should help for multi-process services like nginx. Let me know if
it happens again.

Thanks for reporting the issue… and apologies for grumpily pushing you
to do so on IRC. It’s a positive outcome at any rate!

Ludo’.
Closed
T
T
Tobias Geerinckx-Rice wrote on 12 Jun 2020 14:03
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41791-done@debbugs.gnu.org)
87imfwtrse.fsf@nckx
Ludovic Courtès ???
Toggle quote (3 lines)
> Oops, this one is fixed by
> b6b95685d0b478698d648f13afd927b1e1700d99.

Impressive fanservice as always.

Toggle quote (6 lines)
> The nginx issue may be different. The Shepherd 0.8.0 included
> fixes
> that should help for multi-process services like nginx. Let me
> know if
> it happens again.

I will. It's possible that it hasn't happened since 0.8.0.

Toggle quote (4 lines)
> Thanks for reporting the issue… and apologies for grumpily
> pushing you
> to do so on IRC. It’s a positive outcome at any rate!

The day I get to berate anyone for being grumpy will be a strange
day in hell.

Thanks!

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXuNvEQAKCRANsP+IT1Vt
eSjtAQDf8HrQYiJexQfVXN6ZN0z7c9f651s+cFHXSCyExpZjzQD/XhHXEVTqlnV5
POOjtMwTN8S8wyjXmOiIBBlov18PFgg=
=0tYR
-----END PGP SIGNATURE-----

Closed
T
T
Tobias Geerinckx-Rice wrote on 28 Nov 2021 13:35
(no subject)
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
87pmqka20k.fsf@nckx
unarchive 41791
reopen 41791
T
T
Tobias Geerinckx-Rice wrote on 28 Nov 2021 13:39
[Shepherd] loses track of Tor
(address . 41791@debbugs.gnu.org)
87lf18a1w7.fsf@nckx
All,

Unfortunately, this bug seems to have recropped up:

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYaN46A0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15AgoA/3/m+LN4AsoSIG6xsrDA94+9QFIr0RUNWeVSnWM2
r8R9AQC62Yi3BffgcTdSDSl8IPwUTyv+8v2eCOjTQdkSDtl9DQ==
=qNzY
-----END PGP SIGNATURE-----

A
A
Attila Lendvai wrote on 28 Feb 2022 20:09
(name . 41791@debbugs.gnu.org)(address . 41791@debbugs.gnu.org)
42_q6IorfVW5S1kg0NfIGb5dUyJDfTvUujqkjChmoq3iAb6hX6119Ux-aCkLeMchqf4H8NoibKwiBRCQK733ELJgOkzECoyDEqdfSMtd9rg=@lendvai.name
i'm not sure this is related, but it's certainly a bug in MAKE-KILL-DESTRUCTOR
that it doesn't wait for the process to quit after sending it a signal, and thus
may restart the service while the previous instance is still running.

it's also not sending it a kill -9 after a timeout if the process is not
responsive.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“[Design] Patterns mean "I have run out of language."”
— Rich Hickey
L
L
Ludovic Courtès wrote on 12 Jan 2023 15:14
Re: bug#41791: [Shepherd] loses track of Tor
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 41791-done@debbugs.gnu.org)
87k01rhmc5.fsf@gnu.org
Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

Toggle quote (12 lines)
> ~ λ while :; do sudo herd restart tor; done
> Service tor is not running.
> Service tor has been started.
> Service tor has been stopped.
> Service tor could not be started.
> Service tor is not running.
> Service tor could not be started.
> ^C
> ~ λ pgrep tor
> 22926
> 23004

I don’t see that happening with the Shepherd 0.9.3. I believe this was
fixed by making ‘stop’ synchronous:


Closing!

Ludo’.
Closed
?