From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SI5FDDXfNmQVnwAASxT56A (envelope-from ) for ; Wed, 12 Apr 2023 18:41:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QLd1CzXfNmQQoAAAG6o9tA (envelope-from ) for ; Wed, 12 Apr 2023 18:41:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9075DE675 for ; Wed, 12 Apr 2023 18:41:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmdWj-0007fn-JX; Wed, 12 Apr 2023 12:40:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmdWh-0007f4-Gc for guix-devel@gnu.org; Wed, 12 Apr 2023 12:40:55 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmdWf-0000ZU-Gq for guix-devel@gnu.org; Wed, 12 Apr 2023 12:40:55 -0400 Received: by mail-ej1-x634.google.com with SMTP id qb20so29982183ejc.6 for ; Wed, 12 Apr 2023 09:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681317650; x=1683909650; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7L6xCacXirVjTZcFI2omep13KrCx20eRwM5GVeobaYU=; b=Ft3o7Z33Gtcpv6N7O3Mh7exJgFQZpPsHUXAHqdNofh9zhDkUm4KwwgVwhjmLN7qA1a vewCAlwm5WZSztuYSQAmDZs4kfOBcO4tRGwNmQ/UXNEhmfNYXBM51DmDKpDipPzvVY/9 aRNxIxW4qoIFCB+FnWvrdZOIKkumaOHSCqsp0rgyr/WBRJBs2WnXdrFkCsC50TM0ckw6 uspnhgZUtCnstvrpoUTm81ommqZsq6MbkAWE6BqUPl8s7JUHpKq5tCf9eNFWxdtY2ahZ NuXN9t6OrwkHcndAOC+A75aA+LS0apgca7sw20Te3ETOSXfrUKueoKtoEi2xkkouxQ+z TAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681317650; x=1683909650; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7L6xCacXirVjTZcFI2omep13KrCx20eRwM5GVeobaYU=; b=ayYo7W4Bit310KftR/Uqvey2QsGaS2ns8XfdBvoyHpLHvd9O+xT7Ehd29MejGXQ+2g WDDuaSz/qdwiXDuodKtCsh4b7RZ0flNLtBD5Su9M/eNgkmbgbXmuYI7CGZ9+p2KYqz/d POjKBeFY4hHyT9k2Th09HrUOesYbalD/uGbyyB2T1cglJS4d9nB5VrMidkaYs0U0e1Ug zR3iTlzLkghMRFJytOruXWj/GdTJyKYxP9XpZJ6srQep5vBIgFbwiQY68LeFpwOyjduD PqmY/rvtmSLK5vsRH8IJnG9BEa3RL54fhgBbgoiEnr+i9Xrv/RDPznJgewR7k8+xavlM wybg== X-Gm-Message-State: AAQBX9eExXgMzppsuQs2393l7XYVePJnKdLh2DRJ1Kbq8REGkhifDq5L hoiiBLMAsyby18wXWIN8VeSAijzzlRjDDOJya3tEqEE2 X-Google-Smtp-Source: AKy350Y4eiEMLV12SFIv0V4XyoUCo7yPweTl+3J6YYnD+lfGycKyU08vXIa5p/TsCyROnlDk/wOOaKWkcEjkYUVJr3U= X-Received: by 2002:a17:906:3c10:b0:94a:957b:f911 with SMTP id h16-20020a1709063c1000b0094a957bf911mr3598017ejg.13.1681317650358; Wed, 12 Apr 2023 09:40:50 -0700 (PDT) MIME-Version: 1.0 From: Vladilen Kozin Date: Wed, 12 Apr 2023 17:40:39 +0100 Message-ID: Subject: herd stop hangs To: guix-devel@gnu.org Content-Type: multipart/alternative; boundary="0000000000004de63a05f9264514" Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=vladilen.kozin@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681317685; a=rsa-sha256; cv=none; b=BVnRi8rYh1sH1cMnExKQIEb1mJl5JGqqQTh94Geutfg5pnE39Ln7Z9yR/68k+zPhcTzdaJ kOYhAwAx0PoIFgU5b32hNeW4OAjm51qA1y3NtHkrTqranoZyBJ4nTRkp/ezjeqq9WoPKvk V8SwvRjaifocMN1Equur4m1g6rowbC2n2q3srseR3LaBF3OvZqaNIMYQm1D8G54IypP+aN EbEj0ES0oXCsC0CLrpA15vtafJgRFsQyykWWdyoxYPDt3fimopXH8tUnZ1AGxynfi2uDe/ xt/rpd6kkW+fK2xwp761/Qk+fToGetunExupx9Xle8o7TFqwfIZ3kIRkY2Q0ig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Ft3o7Z33; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681317685; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7L6xCacXirVjTZcFI2omep13KrCx20eRwM5GVeobaYU=; b=FvUxBr0ya94m1AaEbMDnhshKdn7gb9+PcNB153viJzSAEZDuHbcy9lOtBFgtS4uGd0onS6 aDbwtmeSpmMit7ImLYxXD4IsINismrQiEqP20UBameR0NQ0Lg930eJrjmJMIjsay118CIQ v0ljxxow2W1Ere1FEwDNhN2ZUwRJSTukPuzVktjPpSrCkETpeEvx0KQZ8EJmQ54G+icMsp ZxeBLad2xuSxqEOG6HN0oFKMpWiJeYkr7cBOE68pO1GFZGs98TEbX8UNEQIN6msm3pW5iQ wG+ahO2/1429zrJAUw+WQWq6DGqpIMeTZTRP1fK0OUjQdVzVJ7WMDiu1+hG8FA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.45 X-Spam-Score: -6.45 X-Migadu-Queue-Id: 9075DE675 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=Ft3o7Z33; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: LeiCoTfV57QR --0000000000004de63a05f9264514 Content-Type: text/plain; charset="UTF-8" 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 --0000000000004de63a05f9264514 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

I wrote a shepherd service that runs a java application i= n a semi standard fashion

(start=C2=A0
=C2=A0 #~(make-forkexec-constructor .= ..
=C2=A0 =C2=A0 #:user ..=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 #= :group ..
=C2=A0 =C2=A0 #:environment-variables ...
(stop
=C2=A0 #~(make-kill-des= tructor)

$ sudo herd start my-service
starts without a hitch, but
<= div class=3D"gmail_default" style=3D"font-family:arial,sans-serif">
$ sud= o stop my-service
simply hangs for the default 5sec until Shepherd SIGKILLs i= t (as per /var/log/messages) and even after that console where I run the he= rd stop command doesn't get released until I manually CTRL-C it.
<= div class=3D"gmail_default" style=3D"font-family:arial,sans-serif">
Been = driving me nuts, cause Java handles SIGTERM but just in case I even added s= hutdownHook to my app that should explicitly execute on SIGTERM and other s= uch 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 a= pp 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 pk= ill ... ha? Could this give a clue as to why sudo herd stop won't work?=
W= hat is going on here? Any ideas? I'm completely lost at this point.=C2= =A0
--
Bes= t regards
Vlad Kozin
--0000000000004de63a05f9264514--