GNU bug report logs - #77943
[PATCH 0/2] Using the Shepherd's system log on the Hurd

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sun, 20 Apr 2025 15:54:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: yelninei <at> tutamail.com
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 77943 <77943 <at> debbugs.gnu.org>
Subject: [bug#77943] [PATCH 1/2] services: shepherd: Provide the right #:kernel-log-file on the Hurd.
Date: Tue, 10 Jun 2025 11:50:27 +0200 (CEST)
Hello Ludo,


Jun 2, 2025, 16:09 by ludo <at> gnu.org:

> Hi,
>
> Right, I started looking into it back then but then didn’t take the time
> to track it down.
>

I tried your patch that you sent to bug-hurd but I still end up with D_WOULD_BLOCK at the end. Was it working for you?

As pointed out by Samuel on bug-hurd the initial "if (err) return err" looks weird. I tried removing it and at the end of /dev/klog it died with SIGLOST.

I then tried this patch similar to yours to intercept D_WOULD_BLOCK at the beginning instead:

diff --git a/trans/streamio.c b/trans/streamio.c
index e42ff908..ee3cf9b4 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -1005,7 +1005,12 @@ dev_read (size_t amount, void **buf, size_t *len, int nowait)
   size_t max, avail;
 
   if (err)
-    return err;
+    {
+      if (err == D_WOULD_BLOCK)
+	  return EWOULDBLOCK;
+      else
+	  return err;
+    }
 
   while (!buffer_readable (input_buffer))
     {

and my example now fails with EAGAIN.

I am not sure yet what is setting this, the joy of global variables.

However something still seems wrong when I added back the shepherd syslog. It still crashes/hangs when it reaches the initial end of /dev/klog and does not process messages further: 
there is an extra message and e.g. sshd messages to the syslog dont get processed.

root <at> childhurd ~# ./main
irq handler [11]: new delivery port f5e44038 entry f4f39840

errno: Resource temporarily unavailable

To be continued.

Note: I had to add the patch to the default hurd and just patching the hurd package that is used in operating-system-hurd was not enough. Dont know what is up with that.

> Thanks,
> Ludo’.
>





This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.