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: Ludovic Courtès <ludo <at> gnu.org>
To: yelninei <at> tutamail.com
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: Sun, 17 Aug 2025 17:11:23 +0200
Hello,

yelninei <at> tutamail.com writes:

> I found where the error gets set (debugging global variables is not fun)
>
> As a reminder we get the D_WOULD_BLOCK error back from the initial 
>
> if(err)
>     return err;
> check in dev_read.
>
> In our case this comes from device_read_reply_inband from the errorcode parameter. I am not yet sure where/how this gets called.
>
> My little C example now returns EWOULDBLOCK when reaching the "end" of /dev/klog.

So you have a patch for /hurd/streamio and a C reproducer?  (Maybe you
sent it already and I haven’t seen.)

> However this does not really help the shepherd syslog because guile's
> read-line blocks forever waiting for a terminating newline. Also guile
> is unaware that further attempts to read would EWOULDBLOCK as "(select
> (vector port) #() #() 0)" indicates that reading is possible but then
> actually trying to a get a char blocks.

Ah but I think that’s fine: shepherd, suspendable ports are enabled (via
Fibers), which means that read attempts that return EAGAIN or
EWOULDBLOCK result in the calling fiber being suspended.

You would need to try this for real, but it should be fine.

Thanks!

Ludo’.




This bug report was last modified 28 days ago.

Previous Next


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