Skip to content

Add Requires: zstd-libs for systemd requirement#6664

Closed
ddstreetmicrosoft wants to merge 2 commits into
fasttrack/2.0from
ddstreet/systemd-zstd
Closed

Add Requires: zstd-libs for systemd requirement#6664
ddstreetmicrosoft wants to merge 2 commits into
fasttrack/2.0from
ddstreet/systemd-zstd

Conversation

@ddstreetmicrosoft

@ddstreetmicrosoft ddstreetmicrosoft commented Nov 3, 2023

Copy link
Copy Markdown
Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?
After enabling zstd support in systemd build, one can encounter an error where libzstd.so.1 is missing in /sbin/init.

[ 0.593882] Run /sbin/init as init process

/sbin/init: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory
[ 0.647950] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[ 0.648635] CPU: 0 PID: 1 Comm: init Not tainted 6.1.0.mshv11 #1
[ 0.649059] Call Trace:

[ 0.649251]
[ 0.649529] dump_stack_lvl+0x3b/0x59
[ 0.649881] panic+0xfb/0x264
[ 0.650240] do_exit.cold+0x15/0x15

[ 0.650639] do_group_exit+0x28/0x80
[ 0.651034] __x64_sys_exit_group+0xf/0x10
[ 0.651436] do_syscall_64+0x43/0x90
[ 0.651842] entry_SYSCALL_64_after_hwframe+0x63/0xcd

[ 0.652283] RIP: 0033:0x7f92ce4c6151

[ 0.653296] Code: 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa be e7 00 00 00 ba 3c 00 00 00 eb 0d 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 89 05 ff 40 01 00 eb dd 0f 1f 44 00
[ 0.654484] RSP: 002b:00007fffb0a5e4d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7

[ 0.655344] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f92ce4c6151
[ 0.656023] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 000000000000007f
[ 0.656712] RBP: 00007fffb0a5f110 R08: 0000000000000001 R09: 0000000000000000
[ 0.657410] R10: 00000000ffffffff R11: 0000000000000246 R12: 00007f92ce4d0668
[ 0.658092] R13: 00007f92ce32e9ff R14: 00007f92ce32ea10 R15: 0000000000000000
[ 0.658577]
[ 0.658987] Kernel Offset: disabled

[ 0.659359] Rebooting in 1 seconds..
Add missing Requires on the zstd-libs package so the missing shared object will always be installed at runtime with the systemd package.

Fixes: #6494

Signed-off-by: Chris Co chrco@microsoft.com

Does this affect the toolchain?

NO

Associated issues

#6661

ddstreet and others added 2 commits November 3, 2023 08:43
Also for mariner 2, force journald to not use zstd compression, to
retain backwards compatibility.

Fixes: #6424
Signed-off-by: Chris Co <chrco@microsoft.com>
@ddstreetmicrosoft ddstreetmicrosoft requested a review from a team as a code owner November 3, 2023 12:45
@ddstreetmicrosoft

Copy link
Copy Markdown
Author

I initially thought this was a serious issue but on further inspection, the 250.3-18 systemd rpm does correctly include the libzstd requirement, i.e.:

# rpm -qp --requires systemd-250.3-18.cm2.x86_64.rpm |grep zstd
libzstd.so.1()(64bit)

So while adding the explicit Requires: zstd-libs doesn't hurt anything and is fine to do, technically it isn't actually required.

@ddstreetmicrosoft

Copy link
Copy Markdown
Author

Closing this PR against fasttrack; this change was merged into main already in #6661, and the change (adding a Requires: zstd-libs) is not technically necessary since the systemd rpm does, as expected, contain the auto-added libzstd.so.1 requirement.

@ddstreetmicrosoft ddstreetmicrosoft deleted the ddstreet/systemd-zstd branch November 3, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants