Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939758 - >=sys-apps/openrc-0.55 crashes on big-endian
Summary: >=sys-apps/openrc-0.55 crashes on big-endian
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2024-09-17 02:12 UTC by matoro
Modified: 2024-09-19 01:28 UTC (History)
5 users (show)

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


Attachments
ASAN report (x86_64) (file_939758.txt,3.75 KB, text/plain)
2024-09-17 02:12 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-09-17 02:12:04 UTC
Created attachment 903169 [details]
ASAN report (x86_64)

openrc-0.55 appears to unconditionally crash on big-endian systems, as well as the "rc-status" command.  I observed this on ppc64 big-endian, sparc64, mips64, and hppa.  The crashes are not reproducible on little-endian systems (including ppc64 little-endian).

Boot log examples:


INIT: version 3.09 booting

   OpenRC 0.55 is starting up Gentoo Linux (ppc64)

 * Mounting /proc ...
 [ ok ]
free(): invalid pointer
 * Mounting /run ...
 [ ok ]
 * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ...
 [ ok ]
free(): invalid pointer
free(): invalid pointer
INIT: Entering runlevel: 3
free(): invalid pointer



INIT: version 3.09 booting

   OpenRC 0.55 is starting up Gentoo Linux (sparc64)

 * Mounting /proc ...
[   32.388529] random: crng init done
 [ ok ]
corrupted size vs. prev_size
 * Mounting /run ...
 [ ok ]
 * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ...
 [ ok ]
 * Clock skew detected with `/etc/rc.conf'
INIT: Entering runlevel: 3
corrupted size vs. prev_size


Userspace tool examples:

$ sudo rc-status
 * Caching service dependencies ...
corrupted size vs. prev_size
Aborted

$ sudo rc-status
 * Caching service dependencies ...
double free or corruption (!prev)
Aborted

These glibc abort messages vary, but the command always crashes.

This is reproducible in a clean stable stage3 chroot using the "rc-status" command.  awilfox was kindly able to gather ASAN reports which trigger on both ppc64 and amd64.  It probably pretty soundly points to https://github.com/OpenRC/openrc/commit/0702a064a93af9a98e6954e035867882778f4268 as the culprit.
Comment 1 Mike Gilbert gentoo-dev 2024-09-17 03:15:25 UTC
Not sure if this PR fixes the issue, but maybe?
Comment 2 Anna 2024-09-17 06:53:14 UTC
The pull request was merged, could anyone with access to a big-endian machine test against master?
Comment 3 Anna 2024-09-17 11:58:48 UTC
tested asan on musl (this is not reproducible on glibc), the report in rc_proc_getent got fixed by that patch, though other issues still exist

i'll be going to fix those later today and ask williamh for a patch release
Comment 4 matoro archtester 2024-09-17 14:01:35 UTC
Confirmed this allows my BE machines to boot again.
Comment 5 Anna 2024-09-18 18:20:00 UTC
Fixed in 0.55.1
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-19 01:28:37 UTC
commit 6d8e7b3d97f0b42b3280b5f31eac9a89f00ae172
Author: William Hubbs <williamh@gentoo.org>
Date:   Wed Sep 18 13:39:13 2024 -0500

    sys-apps/openrc: add 0.55.1

    Signed-off-by: William Hubbs <williamh@gentoo.org>

commit b9d40c7a658101b4ec6de0fb8062cd72d02d3e9d
Author: William Hubbs <williamh@gentoo.org>
Date:   Wed Sep 18 13:49:37 2024 -0500

    sys-apps/openrc: drop 0.55

    Signed-off-by: William Hubbs <williamh@gentoo.org>