-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd-bootchart fails with ENOENT for "/proc/schedstat" when run from initial ramdisk #60
Comments
strace log is attached. To prepare an initial ramdisk with systemd-bootchart (and strace), you can do this:
Reboot and then edit the grub command to boot using the new initial ramdisk:
Also, add a kernel param to boot into the
In the ramdisk emergency shell, run bootchart and then exit to continue booting:
When you login as normal, systemd-bootchart won't be running. The strace log shows that systemd-bootchart failed attempting to read
You can also reproduce the defect by setting the kernel param
|
This certainly wasn't supported. I think we can, though. I think we might have to rewrite all the That's assuming that it actually works and the |
We have a patch that works the way you suggest; i.e. rather than use an absolute path, it holds a file descriptor to the original It seems to work. I will test it a bit more and then open a PR. |
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 (settingargv[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.
The text was updated successfully, but these errors were encountered: