Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 562334 - sys-apps/openrc compatibility with musl
Summary: sys-apps/openrc compatibility with musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-05 16:06 UTC by David Flogeras
Modified: 2015-10-06 19:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2015-10-05 16:06:41 UTC
The line in /etc/init.d/sysfs

echo 1 > /sys/fs/cgroup/openrc/notify_on_release

Can will send the bytes "1" and "\n" to the kernel.  On musl it seems this is more prone to be broken up into two userspace->kernel calls, and the kernel squawks when receiving the bare newline character.  Changing it to "echo -n 1" will suppress this warning.

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2015-10-05 21:08:27 UTC
Can you provide some evidence of this (like an strace log)? It sounds a bit weird.

> Changing it to "echo -n 1" will suppress this warning.

And that will also break it if /bin/sh is dash; echo -n is undefined in POSIX.
Comment 2 David Flogeras 2015-10-05 22:02:25 UTC
I cannot strace it, strace failed to build for my musl system which is another work in progress. Sorry.

I asked in #musl on freenode and Rich Felker explained it to me as such.   I cannot find a log of that conversation but I did find a very similar thread here where he explains:

http://www.openwall.com/lists/musl/2013/05/05/9
Comment 3 Felix Janda 2015-10-06 13:15:06 UTC
Replacing "echo 1" by "printf 1" should work fine for all these cases.
Comment 4 William Hubbs gentoo-dev 2015-10-06 19:33:14 UTC
This is fixed in commit 17ef205 and will be part of OpenRC-0.18.