Skip to content

systemd-bootchart fails with ENOENT for "/proc/schedstat" when run from initial ramdisk #60

@jamuir

Description

@jamuir

Executing systemd-bootchart from the initial ramdisk fails when systemd does its switch-root procedure.

This can be reproduced on Fedora 41 with an initial ramdisk updated to include systemd-bootchart.

The systemd-bootchart documentation does not mention if execution from the initial ramdisk is supported or not, but, internally, systemd-bootchart sets argv[0][0] = '@', so it seems like this was supported at one point (setting argv[0][0] = '@' is one way to survive the switch-root process killing spree).

The failure happens here:

https://github.com/systemd/systemd-bootchart/blob/a15bcafb60b9a24d866024953e9965316ba73eaf/src/store.c#L191C1-L194C71

I will provide an strace log and more detailed steps to reproduce below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions