GNU bug report logs -
#76244
Shepherd does not support UTF-8 in the log output
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Wed, 12 Feb 2025 23:48:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76244 in the body.
You can then email your comments to 76244 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#76244
; Package
guix
.
(Wed, 12 Feb 2025 23:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tomas Volf <~@wolfsden.cz>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 12 Feb 2025 23:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi :)
Shepherd does not seem to support UTF-8 output (Japanese in my case) in
the log output. I noticed the issue with timers, but can be reproduced
with transient as well:
--8<---------------cut here---------------start------------->8---
$ herd spawn transient -- $(which sh) -c 'echo "猫"'
Spawning transient service for ("/run/current-system/profile/bin/sh" "-c" "echo \"???\"").
Service user-homes has been started.
Starting service transient-252...
Service transient-252 started.
Service transient-252 running with value #<<process> id: 1314 command: ("/run/current-system/profile/bin/sh" "-c" "echo \"???\"")>.
Service transient-252 has been started.
$ tail -f /var/log/messages
Feb 12 23:43:31 localhost shepherd[1]: Service user-homes has been started.
Feb 12 23:43:31 localhost shepherd[1]: Service user-homes started.
Feb 12 23:43:31 localhost shepherd[1]: Service user-homes running with value #t.
Feb 12 23:43:31 localhost shepherd[1]: Starting service transient-252...
Feb 12 23:43:31 localhost shepherd[1]: Service transient-252 started.
Feb 12 23:43:31 localhost shepherd[1]: Service transient-252 running with value #<<process> id: 1314 command: ("/run/current-system/profile/bin/sh" "-c" "echo \"???\"")>.
Feb 12 23:43:31 localhost shepherd[1]: Service transient-252 has been started.
Feb 12 23:43:31 localhost shepherd[1]: sh[1314] ???
Feb 12 23:43:31 localhost shepherd[1]: Service transient-252 has been disabled.
Feb 12 23:43:31 localhost shepherd[1]: Transient service transient-252 terminated, now unregistered.
--8<---------------cut here---------------end--------------->8---
Notice the `???' in output from both commands. Neither the `herd spawn'
output nor the /var/log/message contain correct Japanese character.
Have a nice day,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#76244
; Package
guix
.
(Thu, 13 Feb 2025 09:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 76244 <at> debbugs.gnu.org (full text, mbox):
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> $ herd spawn transient -- $(which sh) -c 'echo "猫"'
> Spawning transient service for ("/run/current-system/profile/bin/sh" "-c" "echo \"???\"").
Actually, it’s not logging, it’s the command itself that’s not
interpreted as UTF-8:
--8<---------------cut here---------------start------------->8---
$ cat /tmp/t.sh
#!/bin/sh
echo "猫"
$ sudo herd spawn transient /tmp/t.sh
Spawning transient service for ("/tmp/t.sh").
Service user-homes has been started.
Starting service transient-375...
Service transient-375 started.
Service transient-375 running with value #<<process> id: 12840 command: ("/tmp/t.sh")>.
Service transient-375 has been started.
$ sudo herd status root
● Status of root:
It is running since Mon 10 Feb 2025 08:38:03 AM CET (3 days ago).
Main PID: 1
Command: /gnu/store/n87px1cazqkav83npg80ccp1n777j08s-guile-3.0.9/bin/guile --no-auto-compile /gnu/store/ci2c9iwqaa1zpr38wc58419m9yh8g798-shepherd-1.0.99-git/bin/shepherd --config /gnu/store/6c9xhch8vqddwl81qj28d7c7k6zwr4ms-shepherd.conf
It is enabled.
Provides: root shepherd
Custom actions: help status halt power-off kexec load eval unload reload daemonize restart
Will not be respawned.
Recent messages (use '-n' to view more or less):
2025-02-13 10:45:45 Service transient-375 running with value #<<process> id: 12840 command: ("/tmp/t.sh")>.
2025-02-13 10:45:45 Service transient-375 has been started.
2025-02-13 10:45:45 [t.sh] 猫
2025-02-13 10:45:45 Service transient-375 has been disabled.
2025-02-13 10:45:45 Transient service transient-375 terminated, now unregistered.
--8<---------------cut here---------------end--------------->8---
Well there’s also a problem with logging after all:
--8<---------------cut here---------------start------------->8---
$ sudo tail -4 /var/log/messages
2025-02-13 10:45:45 localhost shepherd[1]: Service transient-375 has been started.
2025-02-13 10:45:45 localhost shepherd[1]: [t.sh] ?
2025-02-13 10:45:45 localhost shepherd[1]: Service transient-375 has been disabled.
2025-02-13 10:45:45 localhost shepherd[1]: Transient service transient-375 terminated, now unregistered.
--8<---------------cut here---------------end--------------->8---
I’m surprised because I’m pretty sure there are tests for that. I’ll
check later.
Ludo’.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 26 Feb 2025 16:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tomas Volf <~@wolfsden.cz>
:
bug acknowledged by developer.
(Wed, 26 Feb 2025 16:35:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 76244-done <at> debbugs.gnu.org (full text, mbox):
Fixed with dd193ad5b7af953c6e167bcfa002879e365e9a39 and
2b289dc34b0fd805e5aba7c964919620e8538ace.
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 27 Mar 2025 11:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.