From unknown Fri Jun 13 09:56:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36510 <36510@debbugs.gnu.org> To: bug#36510 <36510@debbugs.gnu.org> Subject: Status: confusing mcron logging Reply-To: bug#36510 <36510@debbugs.gnu.org> Date: Fri, 13 Jun 2025 16:56:59 +0000 retitle 36510 confusing mcron logging reassign 36510 guix submitter 36510 Robert Vollmert severity 36510 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 05 09:36:03 2019 Received: (at submit) by debbugs.gnu.org; 5 Jul 2019 13:36:03 +0000 Received: from localhost ([127.0.0.1]:52520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjONe-0001Nh-Js for submit@debbugs.gnu.org; Fri, 05 Jul 2019 09:36:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:33193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjONb-0001NG-3W for submit@debbugs.gnu.org; Fri, 05 Jul 2019 09:36:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39183) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjONY-0002yh-U7 for bug-guix@gnu.org; Fri, 05 Jul 2019 09:35:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjONU-0001ja-Q1 for bug-guix@gnu.org; Fri, 05 Jul 2019 09:35:54 -0400 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]:9894) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hjONT-00015G-MC for bug-guix@gnu.org; Fri, 05 Jul 2019 09:35:52 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 6F26E50984 for ; Fri, 5 Jul 2019 15:35:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id bd6eR5pnCBQG for ; Fri, 5 Jul 2019 15:35:36 +0200 (CEST) From: Robert Vollmert Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: confusing mcron logging Message-Id: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> Date: Fri, 5 Jul 2019 15:35:35 +0200 To: bug-guix@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:67c:2050:104:0:1:25:1 X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) I have two mcron jobs on my system, certbot renewal and a handwritten and currently buggy guile job. This is an excerpt from /var/log/mcron.log: >>>>> Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Cert not yet due for renewal Keeping the existing certificate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Certificate not yet due for renewal; no action taken. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Acquiring or renewing certificate: garp.vllmrt.net Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Cert not yet due for renewal Keeping the existing certificate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Certificate not yet due for renewal; no action taken. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Acquiring or renewing certificate: garp.vllmrt.net Backtrace: 9 (apply-smob/1 #) In ice-9/boot-9.scm: 829:9 8 (catch mcron-error # ?) In mcron/scripts/mcron.scm: 99:7 7 (_) In mcron/base.scm: 234:12 6 (_ #) In srfi/srfi-1.scm: 640:9 5 (for-each # (#< user: #(?>)) In mcron/base.scm: 186:10 4 (run-job #< user: #("root" "x" 0 0 "System adminis?>) In ice-9/eval.scm: 293:34 3 (_ #(#(#))) 182:19 2 (proc #(#(#))) 142:16 1 (compile-top-call _ (7 . get-string-all) ((10 (# . #) ?))) In unknown file: 0 (%resolve-variable (7 . get-string-all) #) ERROR: In procedure %resolve-variable: Unbound variable: get-string-all Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Cert not yet due for renewal Keeping the existing certificate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Certificate not yet due for renewal; no action taken. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Acquiring or renewing certificate: garp.vllmrt.net Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Cert not yet due for renewal Keeping the existing certificate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Certificate not yet due for renewal; no action taken. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - Acquiring or renewing certificate: garp.vllmrt.net <<<<< It=E2=80=99s impossible to tell what output is from which job; which = jobs succeeded or didn=E2=80=99t; when they ran. Suggestions: - mcron should log the timestamp and a job id of every job when it = starts - mcron should log the timestamp and status and job id of every job when = it finishes - job output should be prefixed by some job id From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 05 16:38:10 2019 Received: (at 36510) by debbugs.gnu.org; 5 Jul 2019 20:38:10 +0000 Received: from localhost ([127.0.0.1]:53842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjUyA-0000EW-Ep for submit@debbugs.gnu.org; Fri, 05 Jul 2019 16:38:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjUy7-0000E5-RO for 36510@debbugs.gnu.org; Fri, 05 Jul 2019 16:38:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjUxz-0005oU-SZ; Fri, 05 Jul 2019 16:38:00 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50240 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hjUxz-0003be-AT; Fri, 05 Jul 2019 16:37:59 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Robert Vollmert Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Messidor an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 05 Jul 2019 22:37:57 +0200 In-Reply-To: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> (Robert Vollmert's message of "Fri, 5 Jul 2019 15:35:35 +0200") Message-ID: <87r274jjyy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Robert Vollmert skribis: > Suggestions: > - mcron should log the timestamp and a job id of every job when it starts > - mcron should log the timestamp and status and job id of every job when = it finishes > - job output should be prefixed by some job id +1! +3 even. :-) Something that can help debugging to some extent (but is definitely no substitute for what you suggest above!) is =E2=80=98sudo herd schedule mcro= n=E2=80=99. I use that to manually run jobs that appear not to work as expected. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 05 16:49:33 2019 Received: (at 36510) by debbugs.gnu.org; 5 Jul 2019 20:49:33 +0000 Received: from localhost ([127.0.0.1]:53855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjV99-0000Yd-4T for submit@debbugs.gnu.org; Fri, 05 Jul 2019 16:49:31 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:51054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjV97-0000YQ-8N for 36510@debbugs.gnu.org; Fri, 05 Jul 2019 16:49:29 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id C25134FC62; Fri, 5 Jul 2019 22:49:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id 3QUZywfbc0tb; Fri, 5 Jul 2019 22:48:58 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#36510: confusing mcron logging From: Robert Vollmert In-Reply-To: <87r274jjyy.fsf@gnu.org> Date: Fri, 5 Jul 2019 22:48:57 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4E575636-A350-48C0-A20F-6DE7AEB2D5AF@vllmrt.net> References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <87r274jjyy.fsf@gnu.org> To: =?utf-8?Q?Ludovic_Court=C3=A8s?= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > On 5. Jul 2019, at 22:37, Ludovic Court=C3=A8s wrote: > Something that can help debugging to some extent (but is definitely no > substitute for what you suggest above!) is =E2=80=98sudo herd schedule = mcron=E2=80=99. > I use that to manually run jobs that appear not to work as expected. That only works for non-guile jobs though as far as I understand, where 'herd schedule mcron' prints a store path. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36430 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 20:53:13 2021 Received: (at 36510) by debbugs.gnu.org; 18 Aug 2021 00:53:13 +0000 Received: from localhost ([127.0.0.1]:54434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG9pQ-0001l1-Tv for submit@debbugs.gnu.org; Tue, 17 Aug 2021 20:53:13 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]:38824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG9pO-0001kn-FJ for 36510@debbugs.gnu.org; Tue, 17 Aug 2021 20:53:12 -0400 Received: by mail-qv1-f51.google.com with SMTP id bl13so810187qvb.5 for <36510@debbugs.gnu.org>; Tue, 17 Aug 2021 17:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=S7/OmuDUZYnWlrmvIklcDcn1sNY4/0y/l2wtDvVqZXg=; b=IKPpUDxYkM0mgLmQCsYDFDVLZZMBx63pGcYZho2lgUjm9A70dH45hfCnhokqrNfu9p NXFAGa11WKUZvkUnOVJ6qxEjDH/IUuVsrf5cnmsIL3AIu0gIzS0CGRlebBmb52l/AfRr rQfZzS6zkE1NVStZgtP12j676jCry1498ggUMyFghvNxgaOk/l0qn9yjq3X7q9709ETX gguTeK+DiqWe4IVmf2aQ27stMq+6y04vQy/0LLnQc/mPIE/MfccHLWCn4ksvqQm+9tbU lGdbh9dnhzm92XM9S8UZDmhhXzcssTB8zjabYGoTKDxB6pl414cP682eY3NAGC0jhALL qf0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=S7/OmuDUZYnWlrmvIklcDcn1sNY4/0y/l2wtDvVqZXg=; b=ugbpUlfKHtECcsA4dq4URIRCHoVDBpKtd1ERa3Ts2OrwCnKfiWkNZi79A5I0+U6kuO JE1/vzZAZRYwFMFrUBlaIh0mSbqEv7kwJ8y1DzjSOhrMp9XFjWzk0zwkaC4/nQ2UcPtv /VYAV6ubjx8i9lLz97JBMOLhXSNQ1EALLimzQSUJa2MaiAnhpErRbYln3Yk8Q3VczpvS HLk2T+1QBGVu2/EG/wVbglXdzyaTA4c4RWi5cbIgHtf4+hq2lrTVN6SmQlqyHZ28DPdr ve1wrMrLOw2CZCbBKr9hzNWtvrgh5VvXHwuo7JnVsEmuMq+gse+R3Mn8EfHoNw+jVYAj 11sw== X-Gm-Message-State: AOAM531esjYZfDuDvNG4AFbwCsscGmaujQAYwMBeSgergSZhEJRD5uyG c0bhBVnI5Pd7KPfsw6lxabPNUqnZl1w= X-Google-Smtp-Source: ABdhPJwxJGkGgzMMtjLLqGX2qVRyiF+9XqL6PFy9O4F5O/62xQRL3yoD/4Dtz0eOv5Jdj16pAA7hGw== X-Received: by 2002:ad4:4e04:: with SMTP id dl4mr6316935qvb.18.1629247984679; Tue, 17 Aug 2021 17:53:04 -0700 (PDT) Received: from hurd (dsl-236-123-187.b2b2c.ca. [207.236.123.187]) by smtp.gmail.com with ESMTPSA id m19sm1815287qtx.84.2021.08.17.17.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 17:53:04 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <87r274jjyy.fsf@gnu.org> Date: Tue, 17 Aug 2021 20:53:03 -0400 In-Reply-To: <87r274jjyy.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 05 Jul 2019 22:37:57 +0200") Message-ID: <87mtpfy3o0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org, Robert Vollmert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Robert and Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Robert Vollmert skribis: > >> Suggestions: >> - mcron should log the timestamp and a job id of every job when it starts >> - mcron should log the timestamp and status and job id of every job when= it finishes >> - job output should be prefixed by some job id > > +1! +3 even. :-) I've sent a patch upstream that implements all of the above [0]. I've been using it on my system, it works well so far! I'm also keeping this work in a public Notabug git repo [1]. Hopefully it gets merged and Guix System can reap the benefits :-). Thanks for the suggestions! Maxim [0] https://lists.gnu.org/archive/html/bug-mcron/2021-08/msg00005.html [1] https://notabug.org/apteryx/mcron From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 08:32:45 2021 Received: (at 36510) by debbugs.gnu.org; 24 Aug 2021 12:32:45 +0000 Received: from localhost ([127.0.0.1]:43407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIVbe-0007tv-1p for submit@debbugs.gnu.org; Tue, 24 Aug 2021 08:32:45 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:43702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIVbZ-0007tY-Iz for 36510@debbugs.gnu.org; Tue, 24 Aug 2021 08:32:41 -0400 Received: by mail-qk1-f177.google.com with SMTP id ay33so11361396qkb.10 for <36510@debbugs.gnu.org>; Tue, 24 Aug 2021 05:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7AjLFOIdSZmmF3x/APrqsbk4Z9Y80jxD4LftoYNksZA=; b=XfRTnrsrrF2qDvtLZ7aRDubxR3DPu+ARYyRcqCXiXcCL5kTLP4BCYLvyEMQOVF1BV4 fgxFYdJpOebKJ1LZLE/J3IqMKMnnFCUl4Dlg5jJ5CvpNB2uaPHTZwB4qsCuPnIkmGZUg 1ngYl8B8a5S63aQrqFc6ZSvHHrNEa9+7tZ9E8M20RjkipSSAWviKWnCPE2nCYeJsTkfu E1j/Kkq4L12BOUCYRPs0F7VEZ2lBo0B24g5TYzNI4y8kIA+DY4IIanRAtrvlrVUSIgH9 0EqVWCegRa1QPk3y3w74pcu9VAA2J+qLQvN44Kecg2sIms/QX/sysxBn4PvFj4wcbAwm Z9KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7AjLFOIdSZmmF3x/APrqsbk4Z9Y80jxD4LftoYNksZA=; b=rzBWuBE/+9xXKuo/xiIycU0H7kT+WhftpwBmDv1oZpIFIpMdPDbeahc+LyUc7Rr3zB vcr75YLHBbdXSBVOYvN4gtDz2GFYI3Qmxjlhim205XRtK9WMJOd7m03KiKCMCyof6DNg 41sDK/dPsDeXJjjzF6gYhU7XevfMiR/7ljHNIJYmFRtolKRSzZze1Pie+09NvhfpHov/ tJLcXHcbY8YPKo01uRmoqiHB+WTtk2nC4P3xuo5n9CvAGAXhaUqgmyfsUZK5ywqDDpoz 28rVc33NrzBHQLykKJZBK7YML1hlMY9biho+om3xWMSVBmQo4gFW3/xqRQd021aUj40z T+7w== X-Gm-Message-State: AOAM531372MCbjVU//4+ZfcxO1QFbB3Xc6AE+F3Ve1LOrX31jIhpho5v PdRr98L9cKyfT2k3d3LOLTk= X-Google-Smtp-Source: ABdhPJxwHvXL1w8biPuPCr3V2bOVxc+lqOd1LftpcuSzaN2vTocmU157ONlWyoxTQvTB0JEga2YdBw== X-Received: by 2002:a05:620a:1094:: with SMTP id g20mr27220123qkk.428.1629808352093; Tue, 24 Aug 2021 05:32:32 -0700 (PDT) Received: from hurd (dsl-10-129-227.b2b2c.ca. [72.10.129.227]) by smtp.gmail.com with ESMTPSA id h4sm10292126qkp.86.2021.08.24.05.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 05:32:31 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <87r274jjyy.fsf@gnu.org> <87mtpfy3o0.fsf@gmail.com> Date: Tue, 24 Aug 2021 08:32:30 -0400 In-Reply-To: <87mtpfy3o0.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 17 Aug 2021 20:53:03 -0400") Message-ID: <87sfyzrpk1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org, Robert Vollmert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, I sent a v3 of the output annotation patch [0], which no longer blocks reading the output of long-running child processes. I've reconfigured my system with it, so far so good. [0] https://lists.gnu.org/archive/html/bug-mcron/2021-08/msg00008.html From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 05:50:05 2021 Received: (at 36510) by debbugs.gnu.org; 30 Aug 2021 09:50:05 +0000 Received: from localhost ([127.0.0.1]:58198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKdvV-0003Zm-9H for submit@debbugs.gnu.org; Mon, 30 Aug 2021 05:50:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKdvP-0003ZV-NF for 36510@debbugs.gnu.org; Mon, 30 Aug 2021 05:49:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40320) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKdvI-0002mJ-Tp; Mon, 30 Aug 2021 05:49:48 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=45086 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKdvI-0007s0-Kg; Mon, 30 Aug 2021 05:49:48 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <87r274jjyy.fsf@gnu.org> <87mtpfy3o0.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 Fructidor an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 30 Aug 2021 11:49:47 +0200 In-Reply-To: <87mtpfy3o0.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 17 Aug 2021 20:53:03 -0400") Message-ID: <87eeabdzyc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org, Robert Vollmert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Maxim, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Robert Vollmert skribis: >> >>> Suggestions: >>> - mcron should log the timestamp and a job id of every job when it star= ts >>> - mcron should log the timestamp and status and job id of every job whe= n it finishes >>> - job output should be prefixed by some job id >> >> +1! +3 even. :-) > > I've sent a patch upstream that implements all of the above [0]. I've > been using it on my system, it works well so far! I'm also keeping this > work in a public Notabug git repo [1]. That=E2=80=99s a much welcome improvement, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 04 11:09:11 2022 Received: (at 36510) by debbugs.gnu.org; 4 Jan 2022 16:09:11 +0000 Received: from localhost ([127.0.0.1]:38543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4mN4-00062w-Is for submit@debbugs.gnu.org; Tue, 04 Jan 2022 11:09:11 -0500 Received: from rdmp.org ([52.19.174.175]:49848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4jl9-0000qP-3i for 36510@debbugs.gnu.org; Tue, 04 Jan 2022 08:21:51 -0500 Received: from [127.0.0.1] (helo=[IPv6:::1]) by rdmp.org with esmtp (Exim 4.94) (envelope-from ) id 1n4jl3-0003az-5I; Tue, 04 Jan 2022 13:21:45 +0000 Message-ID: <0b026b7cd95151875bf47958fc70b52764816d71.camel@rdmp.org> Subject: Re: [PATCH v3] base: Annotate output with job information. From: Dale Mellor To: 36510@debbugs.gnu.org, Maxim Cournoyer Date: Tue, 04 Jan 2022 13:21:44 +0000 Organization: DM Bespoke Computer Solutions Ltd Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, sorry for the delay but I've had a bit of time over Christmas to look things over. I've given this a lot of consideration. I am happy to drop compatibility with guile-2.2 and older; I think we can make a minor version bump for this break with legacy. Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.9 SPF_HELO_SOFTFAIL SPF: HELO does not match SPF record (softfail) X-Debbugs-Envelope-To: 36510 X-Mailman-Approved-At: Tue, 04 Jan 2022 11:09:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: mcron-lsfnyl@rdmp.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) Hi, sorry for the delay but I've had a bit of time over Christmas to look things over. I've given this a lot of consideration. I am happy to drop compatibility with guile-2.2 and older; I think we can make a minor version bump for this break with legacy. Does this belong in mcron? The mcron source code is currently 3,000 lines, to which you are bringing over 500 new ones to make a facility which is geared towards debugging in the GUIX system (I am all-in on GUIX myself, but mcron is a generic GNU program with use-cases outside of this system). I wonder if this is the best place: perhaps it is shepherd, which is responsible for the /var/log/mcron.log file, to be responsible for the amended logging messages? And then again, isn't this exactly what syslogd does anyway? Most likely timings will be more accurate if they are generated in mcron. In your use-case, of debugging the system, I would think that more specialized messages placed directly in the cron jobs themselves would be a better aid to your work, as you can target them to the problem at hand. And you could send those to syslogd if you wanted. The output is a little unpredictable. The script (which is admittedly somewhat pathological) (job '(next-second '(0 30)) '(begin (display "test: ") (system "date"))) produces 2022-01-04T11:24:00 (...): running... 2022-01-04T11:24:00 (...): Tue 4 Jan 11:24:00 GMT 2022 2022-01-04T11:24:00 (...): test: completed in 0.022s 2022-01-04T11:24:30 (...): running... 2022-01-04T11:24:30 (...): Tue 4 Jan 11:24:30 GMT 2022 2022-01-04T11:25:00 (...): running... 2022-01-04T11:25:00 (...): Tue 4 Jan 11:25:00 GMT 2022 ... But all things considered your changes are generally useful to have, including outside of the GUIX system, and I would very much like to have them there. But to be sure not to break any existing applications, I would like the changes to be opt-in via a command-line switch -l; the --log-format option can remain to customize this (please also make -L a short option alternative; also -D as short for --date-format). I am willing and able to do this work myself in a reasonable time-frame if you would like me to. Best wishes, Dale From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 20:22:34 2022 Received: (at 36510-done) by debbugs.gnu.org; 21 Nov 2022 01:22:34 +0000 Received: from localhost ([127.0.0.1]:44945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owvW5-00029g-Sm for submit@debbugs.gnu.org; Sun, 20 Nov 2022 20:22:34 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:34561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owvW4-00029T-Br for 36510-done@debbugs.gnu.org; Sun, 20 Nov 2022 20:22:33 -0500 Received: by mail-qk1-f180.google.com with SMTP id 8so7179990qka.1 for <36510-done@debbugs.gnu.org>; Sun, 20 Nov 2022 17:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ox6LwgXCUKvYZ1rCRZh4SaI1+o3nDoxMlMUGH/I0EAU=; b=K9Myvb6syx3S0gXRbzDCUUJr/MExUg5wj++b8lPpd6Bu/EsXr+I+uoM+Z322Ydr3fM Wk6EZR3igOB8kc8rWLOwTQ/XCYRlaaxkhpDZIV2Kbngqb81R2lZYyChS9uNECCAqURlW 3XHvxV5sL7yUVTA4rttkEAGL4hPYGBBZ2pgNOnuMNstYwyp26tu4qIdK9C8Hkol1WsL3 w5qa/zgcpmYEOKMwwjMdD9IiI4Q8S+Y3h2byfe4Y/W2lyyOR8O+GjAaJ5veT3b9nhjx+ SbbY1fTiGH+95q1qzmsPx+cNGRLLyzYeZrdbfWoRsb3lXwH/sL6hlAlc2XBJYwbuvTyN 8bvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ox6LwgXCUKvYZ1rCRZh4SaI1+o3nDoxMlMUGH/I0EAU=; b=HUS3thn49S1FpHJa1LOlETOzpUjONAWY8uA+RAmPVvh/GDv1pBH0k5ZRJFCvOQJ5k2 p6mQvmn2tK9/oHU4LOfL6xLC7cnLAwvKVQQkUjyPzwMojYIYbVuXnjwjy3YMfN/gdymf o6CiLVQ9uT9/RX97LsxIAkGGRNUc3IeGNxhTYFO7LypcQ1a8f8Aqm0KMvCKMLmqloXCP CCght+Lz8ixWdDq1Bo90ABzBgOZKRUYbl4c5f9XjQoJhvbTsK2efsdZ9WOyX5Hiu2e8H 6TWXzxpDqvR+cLrL0VnL8q1kIXOKE80xArK5aD4T3QYNgy7jqxfE+T/Rl4y0WpeBY27p gcBw== X-Gm-Message-State: ANoB5pk5i47yuei85Q1DnyEuWGe949UJipCacl7TRC6hFWcQyrHFALgq QU8WW4NtZHJkF6tJqfzI4BzaCNjBfpE= X-Google-Smtp-Source: AA0mqf5XetJQicXRTs3ixP51nBh9vVSXkawkJc2c3UhkJXHCd8AEdBFXF0EXKB44YefZhagx7Hvdng== X-Received: by 2002:ae9:ee1a:0:b0:6fa:3f2c:c654 with SMTP id i26-20020ae9ee1a000000b006fa3f2cc654mr2654410qkg.78.1668993746565; Sun, 20 Nov 2022 17:22:26 -0800 (PST) Received: from hurd (dsl-141-193.b2b2c.ca. [66.158.141.193]) by smtp.gmail.com with ESMTPSA id d7-20020ac86147000000b003a5c60686b0sm6075736qtm.22.2022.11.20.17.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 17:22:26 -0800 (PST) From: Maxim Cournoyer To: Dale Mellor Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <0b026b7cd95151875bf47958fc70b52764816d71.camel@rdmp.org> Date: Sun, 20 Nov 2022 20:22:25 -0500 In-Reply-To: <0b026b7cd95151875bf47958fc70b52764816d71.camel@rdmp.org> (Dale Mellor's message of "Tue, 04 Jan 2022 13:21:44 +0000") Message-ID: <874jut2jam.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36510-done Cc: 36510-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Dale, Dale Mellor writes: > Hi, sorry for the delay but I've had a bit of time over Christmas > to look things over. I've given this a lot of consideration. Apologies for my lack of reply thus far, it seems your mail had fallen in cracks. > > I am happy to drop compatibility with guile-2.2 and older; I think we > can make a minor version bump for this break with legacy. > > > > Does this belong in mcron? The mcron source code is currently > 3,000 lines, to which you are bringing over 500 new ones to > make a facility which is geared towards debugging in the GUIX > system (I am all-in on GUIX myself, but mcron is a generic GNU > program with use-cases outside of this system). I wonder if > this is the best place: perhaps it is shepherd, which is > responsible for the /var/log/mcron.log file, to be responsible > for the amended logging messages? And then again, isn't this > exactly what syslogd does anyway? Most likely timings will be > more accurate if they are generated in mcron. Since Shepherd 0.9+, it now appends logging information to every output it handles, so this feature has indeed become less important, but still useful: I've recently bumped our package of mcron in Guix and I'm using its annotation facility to prepend the process ID to its output. I think the grunt of new lines added must be as documentation and test code, so that's not so bad as it seems I think. > In your use-case, of debugging the system, I would think that > more specialized messages placed directly in the cron jobs > themselves would be a better aid to your work, as you can > target them to the problem at hand. And you could send those > to syslogd if you wanted. Here's a sample output from the Guix build farm: --8<---------------cut here---------------start------------->8--- 2022-11-21 01:56:15 84005 /gnu/store/ypyz886hd7qaw0g8ba5a595dc0qgnj3q-update-guix.gnu.org: running... 2022-11-21 01:59:24 84005 /gnu/store/ypyz886hd7qaw0g8ba5a595dc0qgnj3q-update-guix.gnu.org: Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'... 2022-11-21 01:59:24 84005 /gnu/store/ypyz886hd7qaw0g8ba5a595dc0qgnj3q-update-guix.gnu.org: Computing Guix derivation for 'x86_64-linux'... 2022-11-21 01:59:24 84005 /gnu/store/ypyz886hd7qaw0g8ba5a595dc0qgnj3q-update-guix.gnu.org: [2022-11-21T01:56:18+0100] building web site from 'https://git.savannah.gnu.org/git/guix/guix-artwork.git'... 2022-11-21 01:59:24 84005 /gnu/store/ypyz886hd7qaw0g8ba5a595dc0qgnj3q-update-guix.gnu.org: completed in 189.325s 2022-11-21 02:00:00 91665 /gnu/store/xsc4x68avp8nmrf3hgvhd26yl3k90jqz-check-disk-space: running... 2022-11-21 02:00:00 91665 /gnu/store/xsc4x68avp8nmrf3hgvhd26yl3k90jqz-check-disk-space: completed in 0.046s --8<---------------cut here---------------end--------------->8--- The timestamp is now generated by Shepherd, and mcron adds the PID of the job, such as 84005 above. To have some indication of how long the job ran available at a quick glance is very useful for admin purposes. > > > The output is a little unpredictable. The script (which is > admittedly somewhat pathological) > > (job '(next-second '(0 30)) '(begin (display "test: ") > (system "date"))) > > produces > > 2022-01-04T11:24:00 (...): running... > 2022-01-04T11:24:00 (...): Tue 4 Jan 11:24:00 GMT 2022 > 2022-01-04T11:24:00 (...): test: completed in 0.022s > 2022-01-04T11:24:30 (...): running... > 2022-01-04T11:24:30 (...): Tue 4 Jan 11:24:30 GMT 2022 > 2022-01-04T11:25:00 (...): running... > 2022-01-04T11:25:00 (...): Tue 4 Jan 11:25:00 GMT 2022 > ... I've noticed that too, that some jobs somehow escape producing the "completed in x..." message. I'll try looking into that, it's probably a subtle bug. > But all things considered your changes are generally useful to > have, including outside of the GUIX system, and I would very > much like to have them there. But to be sure not to break any > existing applications, I would like the changes to be opt-in > via a command-line switch -l; the --log-format option can > remain to customize this (please also make -L a short option > alternative; also -D as short for --date-format). > > I am willing and able to do this work myself in a reasonable > time-frame if you would like me to. Thank you for taking on yourself the above work, Dale! I was happily surprise to see this change had landed with your improvement on top. I think this Guix issue can now be closed :-). -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 22:31:47 2022 Received: (at 36510) by debbugs.gnu.org; 29 Nov 2022 03:31:47 +0000 Received: from localhost ([127.0.0.1]:52667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozrLX-0002W3-C9 for submit@debbugs.gnu.org; Mon, 28 Nov 2022 22:31:47 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:36708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozrLV-0002Vw-LN for 36510@debbugs.gnu.org; Mon, 28 Nov 2022 22:31:46 -0500 Received: by mail-qt1-f179.google.com with SMTP id fz10so8148931qtb.3 for <36510@debbugs.gnu.org>; Mon, 28 Nov 2022 19:31:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=pJjviAzBqN8ZTf4AbN5WMHmEPRAg+MbjgQh4QU5phE8=; b=Jdm+cJdhjxtflfOSd5Sxq/PhLmsbUjosqLmzWGjl/pLKmRmsfx4eYN7MRdo/A2llEg kOzzbsydFpWPp56DEzRNBeaZQLZ9QA5Ls9db1JSnxAR/oAY5sKjZ/LW9YinKsEDNhwPA zpqXyHgU0MGFBM/c0ZpaKz+ZIdDn3AdlDLk8Qs0Z2uUGvavKGAi21QwcCffFYDaBn5jh RE3TPaLkEYKp1ILMLigAVp/UpsceQw0jOv1fCd1g2Z9IoeqvS/eWyeOA2jgSdKRKOJDB 9VrJ8jBWJlHqj+N/En33KcHy8QR9TGGe2+y09EBQf07SY8NeMVMW7hDvOym6523cNRK6 mpVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pJjviAzBqN8ZTf4AbN5WMHmEPRAg+MbjgQh4QU5phE8=; b=kg2Y+W6VuMBuf2y6LuLMCKhwqeCjVdg+Mw7LwdgqdeyH4wa/Zoycz8HAoi1FcPQx6M 1YhUTQQX1B1dmleljqwndW8EKZIEZfJ+DeR3r/NK95YJrR15fHMKqN3NQizDWsybo87I yRYl0b90xiosXPtJAlbBX6Xv6VxCmVRb8UXM1Iewefs2IwiZPM7fzgkBnjV2yxRXRKnj AhG3MwMuSC4fjh3sJxZZ2jisjVL01uURvsQVhris1YPG3mQHI+iJmqz0W5FV5k14MXkG zIj90XlymGPXD+no7XUSq1mX8eDFI+y5d+MJx1hatRaEWay2tWL1K/67MNPD82GgKJIG C20Q== X-Gm-Message-State: ANoB5pkG/hzI3EQsBZW1jeexDp51+MsDHVkpFrqG2exdPIQIIhRb5Tt1 8fsxoukYKamHomqArzuVYMk0rPDiWCXw8g== X-Google-Smtp-Source: AA0mqf7vmU3C8jMT93VkRzi/PJJsyeuQtk3a0+/HUZwYUF8KZoMu2pC4w/5qN5mOO/PDf8FTysAy5w== X-Received: by 2002:ac8:6798:0:b0:3a5:6221:deff with SMTP id b24-20020ac86798000000b003a56221deffmr50290520qtp.374.1669692699828; Mon, 28 Nov 2022 19:31:39 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1004]) by smtp.gmail.com with ESMTPSA id w21-20020a05620a0e9500b006faa88ba2b5sm9567045qkm.7.2022.11.28.19.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 19:31:39 -0800 (PST) From: Maxim Cournoyer To: Dale Mellor Subject: Re: bug#36510: confusing mcron logging References: <90FD0C85-F140-420C-AD90-3C2776D8B8D0@vllmrt.net> <0b026b7cd95151875bf47958fc70b52764816d71.camel@rdmp.org> <874jut2jam.fsf_-_@gmail.com> Date: Mon, 28 Nov 2022 22:31:38 -0500 In-Reply-To: <874jut2jam.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Sun, 20 Nov 2022 20:22:25 -0500") Message-ID: <87o7sqqvvp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36510 Cc: 36510@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Maxim Cournoyer writes: > Dale Mellor writes: [...] >> The output is a little unpredictable. The script (which is >> admittedly somewhat pathological) >> >> (job '(next-second '(0 30)) '(begin (display "test: ") >> (system "date"))) >> >> produces >> >> 2022-01-04T11:24:00 (...): running... >> 2022-01-04T11:24:00 (...): Tue 4 Jan 11:24:00 GMT 2022 >> 2022-01-04T11:24:00 (...): test: completed in 0.022s >> 2022-01-04T11:24:30 (...): running... >> 2022-01-04T11:24:30 (...): Tue 4 Jan 11:24:30 GMT 2022 >> 2022-01-04T11:25:00 (...): running... >> 2022-01-04T11:25:00 (...): Tue 4 Jan 11:25:00 GMT 2022 >> ... I tried reproducing this, but couldn't, using the latest GNU Shepherd as shipped in Guix. > I've noticed that too, that some jobs somehow escape producing the > "completed in x..." message. I'll try looking into that, it's probably > a subtle bug. I took some time looking at the issue, and it was more straightforward than I had hoped: I was using exec in my job, which was basically hijacking the mcron's forked job process and loosing what it would have normally done upon completion (print status). Turning the 'execl' calls into 'system*' fixed it: --8<---------------cut here---------------start------------->8--- modified guix/hurd.scm @@ -36,14 +36,14 @@ ;; Run 'updatedb' at 3AM every day. #~(job '(next-hour '(3)) (lambda () - (execl #$(file-append findutils "/bin/updatedb") "updatedb" - (string-append "--prunepaths=" - "/gnu/store " - "/media " - "/mnt " - "/tmp " - "/var/tmp " - "/var/lib "))) + (system* #$(file-append findutils "/bin/updatedb") + (string-append "--prunepaths=" + "/gnu/store " + "/media " + "/mnt " + "/tmp " + "/var/tmp " + "/var/lib "))) "updatedb")) (define btrfs-balance-job @@ -52,15 +52,15 @@ ;; low (5%) to minimize wear on the SSD. Runs at 5 AM every 3 days. #~(job '(next-hour-from (next-day (range 1 31 3)) '(5)) (lambda () - (execl #$(file-append btrfs-progs "/bin/btrfs") "btrfs" - "balance" "start" "-dusage=5" "/")) + (system* #$(file-append btrfs-progs "/bin/btrfs") + "balance" "start" "-dusage=5" "/")) "btrfs-balance")) (define btrbk-job #~(job '(next-hour) (lambda () - (execl #$(file-append btrbk "/bin/btrbk") "btrbk" - "-q" "-c" #$(local-file "btrbk.conf") "run")) + (system* #$(file-append btrbk "/bin/btrbk") + "-q" "-c" #$(local-file "btrbk.conf") "run")) "btrbk")) --8<---------------cut here---------------end--------------->8--- -- Thanks, Maxim From unknown Fri Jun 13 09:56:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Dec 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator