guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

herd stop hangs


From: Vladilen Kozin
Subject: herd stop hangs
Date: Wed, 12 Apr 2023 17:40:39 +0100

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]