-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
pahole: patch to force single-threaded mode if reproducibility is desired #231768
Conversation
@ofborg build linuxPackages.zfs linux_latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it makes sense -- have you brought it up with upstream?
I'm sure the merge process could be made reproducible if they tried.
pkgs/development/tools/misc/pahole/threading-reproducibility.patch
Outdated
Show resolved
Hide resolved
I think it could be but it would not be trivial from what I can tell -- the threads just grab DWARF info from the input in an uncoordinated fashion, so you'd need some major refactoring to split up the input in a consistent way, or to sort the output while merging. I've not communicated with upstream at all at this point. |
I've opened acmel/dwarves#42 for now |
Thanks a lot for the insightful review, I've updated this PR:
|
Thanks! Unless there's any reason to hurry let's give upstream a couple of days to reply (at least Arnaldo does this for work so we should wait for weekdays); otherwise LGTM To whoever merges this: might want to retarget staging instead given number of packages involved |
No objection, I don't think there's any hurry. @raboof any particular timeline we should try to keep in mind re: reproducible builds and 23.05 release?
Done. |
…ired pahole's processes DWARF -> BTF in a pseudo-random order if multi threading is enabled (default in the Linux kernel). This can be fixed in dependent derivation by making sure users don't ever pass "-j" or "-j N", but it seems easier and safer to just detect whether reprodubility is desired (by proxy: if SOURCE_DATE_EPOCH is set) and ignore the multi-threading flag.
Great find! Does this slow down the kernel build or is the parallelism inconsequential here?
I don't think we expect to fix #188978 for 23.05, so I agree there's no hurry and we can take this at its 'natural pace' 👍 |
This is more a developer comfort thing imo -- from the commit message in acmel/dwarves@f104790 it should be something like 20s -> 5s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of changes
#223584 #227800
pahole processes DWARF -> BTF in a pseudo-random order if multi
threading is enabled (default in the Linux kernel). This can be fixed in dependent
derivation by making sure users don't ever pass "-j" or "-j N", but it
seems easier and safer to just detect whether reprodubility is desired
(by proxy: if SOURCE_DATE_EPOCH is set) and ignore the multi-threading
flag.
Tested with a zfs --check build, it passes with this patch applied!
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)