unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* herd stop hangs
@ 2023-04-12 16:40 Vladilen Kozin
  2023-04-12 20:05 ` Attila Lendvai
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vladilen Kozin @ 2023-04-12 16:40 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

Hello.

I wrote a shepherd service that runs a java application in a semi standard
fashion

(start
  #~(make-forkexec-constructor ...
    #:user ..
    #:group ..
    #:environment-variables ...
(stop
  #~(make-kill-destructor)

$ sudo herd start my-service
starts without a hitch, but

$ sudo stop my-service
simply hangs for the default 5sec until Shepherd SIGKILLs it (as per
/var/log/messages) and even after that console where I run the herd stop
command doesn't get released until I manually CTRL-C it.

Been driving me nuts, cause Java handles SIGTERM but just in case I even
added shutdownHook to my app that should explicitly execute on SIGTERM and
other such signals. Testing it on OSX e.g. works just fine. But stop
wouldn't work on guix. I then decided to try everything manually:

$ start my java app from the console

In another console
$ sudo pkill -TERM pid

and nada ... it's like signal isn't even delivered.
$ sudo pkill -KILL pid

Eh ... still nothing
$ sudo kill -s SIGTERM pid
gets delivered

Ha? kill vs pkill ... ha? Could this give a clue as to why sudo herd stop
won't work?
What is going on here? Any ideas? I'm completely lost at this point.
-- 
Best regards
Vlad Kozin

[-- Attachment #2: Type: text/html, Size: 3952 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-17 14:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 16:40 herd stop hangs Vladilen Kozin
2023-04-12 20:05 ` Attila Lendvai
2023-04-12 22:04   ` Vlad Kozin
2023-04-13  3:59 ` Ivan Sokolov
2023-04-13 20:04 ` Ludovic Courtès
2023-04-13 21:02   ` Vlad Kozin
2023-04-17 13:41     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).