Rare bug: libcrc32c.ko causes libguestfs crash #164

Closed
opened 2025-12-29 00:19:04 +01:00 by adam · 4 comments
Owner

Originally created by @sickcodes on GitHub (Apr 10, 2021).

You can fix this bug by removing whatever uses libcrc32c

For me, it was introduced here https://github.com/linux-apfs/linux-apfs-rw/issues/2

You can replicate this bug via

sudo modprobe libcrc32c

And then add

    -e LIBGUESTFS_DEBUG=1 \
    -e LIBGUESTFS_TRACE=1 \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist' \

LIBGUESTFS output:

supermin: internal insmod libcrc32c.ko
supermin: root UUID is longer than 16 bytes
[    0.552791] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    0.553816] CPU: 0 PID: 1 Comm: init Not tainted 5.11.11-arch1-1 #1
[    0.554015] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014
[    0.554015] Call Trace:
[    0.554015]  dump_stack+0x6b/0x83
[    0.554015]  panic+0x112/0x2e8
[    0.554015]  do_exit.cold+0xa7/0xb3
[    0.554015]  ? vfs_write+0x153/0x2a0
[    0.554015]  do_group_exit+0x33/0xa0
[    0.554015]  __x64_sys_exit_group+0x14/0x20
[    0.554015]  do_syscall_64+0x33/0x40
[    0.554015]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    0.554015] RIP: 0033:0x441221
[    0.554015] Code: c0 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 16 66 0f 1f 84 00 00 00 00 00 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 64 41 89 00 eb df 0f 1f 80 00 00 00
[    0.554015] RSP: 002b:00007fff3fd00318 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[    0.554015] RAX: ffffffffffffffda RBX: 00000000004b3230 RCX: 0000000000441221
[    0.554015] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
[    0.554015] RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000
[    0.554015] R10: 0000000000441fb7 R11: 0000000000000246 R12: 00000000004b3230
[    0.554015] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
[    0.554015] Kernel Offset: 0x6800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.554015] Rebooting in 1 seconds..
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x5623d91219a0: child process died
libguestfs: sending SIGTERM to process 1114
libguestfs: qemu maxrss 178212K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x5623d91219a0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsZWmKzc
libguestfs: trace: close
libguestfs: closing guestfs handle 0x55fafcc199a0 (state 0)
### cleaning up ...
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs6gd6An
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 

Originally created by @sickcodes on GitHub (Apr 10, 2021). You can fix this bug by removing whatever uses `libcrc32c` For me, it was introduced here https://github.com/linux-apfs/linux-apfs-rw/issues/2 You can replicate this bug via ```bash sudo modprobe libcrc32c ``` And then add ```bash -e LIBGUESTFS_DEBUG=1 \ -e LIBGUESTFS_TRACE=1 \ -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist' \ ``` LIBGUESTFS output: ```console supermin: internal insmod libcrc32c.ko supermin: root UUID is longer than 16 bytes [ 0.552791] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 0.553816] CPU: 0 PID: 1 Comm: init Not tainted 5.11.11-arch1-1 #1 [ 0.554015] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014 [ 0.554015] Call Trace: [ 0.554015] dump_stack+0x6b/0x83 [ 0.554015] panic+0x112/0x2e8 [ 0.554015] do_exit.cold+0xa7/0xb3 [ 0.554015] ? vfs_write+0x153/0x2a0 [ 0.554015] do_group_exit+0x33/0xa0 [ 0.554015] __x64_sys_exit_group+0x14/0x20 [ 0.554015] do_syscall_64+0x33/0x40 [ 0.554015] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 0.554015] RIP: 0033:0x441221 [ 0.554015] Code: c0 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 16 66 0f 1f 84 00 00 00 00 00 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 64 41 89 00 eb df 0f 1f 80 00 00 00 [ 0.554015] RSP: 002b:00007fff3fd00318 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 0.554015] RAX: ffffffffffffffda RBX: 00000000004b3230 RCX: 0000000000441221 [ 0.554015] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 [ 0.554015] RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000 [ 0.554015] R10: 0000000000441fb7 R11: 0000000000000246 R12: 00000000004b3230 [ 0.554015] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 [ 0.554015] Kernel Offset: 0x6800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 0.554015] Rebooting in 1 seconds.. libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages libguestfs: child_cleanup: 0x5623d91219a0: child process died libguestfs: sending SIGTERM to process 1114 libguestfs: qemu maxrss 178212K libguestfs: error: guestfs_launch failed, see earlier error messages libguestfs: trace: launch = -1 (error) libguestfs: trace: close libguestfs: closing guestfs handle 0x5623d91219a0 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsZWmKzc libguestfs: trace: close libguestfs: closing guestfs handle 0x55fafcc199a0 (state 0) ### cleaning up ... libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfs6gd6An ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 ```
adam added the bug label 2025-12-29 00:19:04 +01:00
adam closed this issue 2025-12-29 00:19:04 +01:00
Author
Owner

@sickcodes commented on GitHub (Apr 14, 2021):

Related https://github.com/sickcodes/Docker-OSX/issues/244

@sickcodes commented on GitHub (Apr 14, 2021): Related https://github.com/sickcodes/Docker-OSX/issues/244
Author
Owner

@sickcodes commented on GitHub (Apr 15, 2021):

Not rare anymore this bug is preventing fish disk-create within the opencore-image-ng.sh script. Looking into it but don't have much time today

@sickcodes commented on GitHub (Apr 15, 2021): Not rare anymore this bug is preventing fish disk-create within the opencore-image-ng.sh script. Looking into it but don't have much time today
Author
Owner

@sickcodes commented on GitHub (Apr 18, 2021):

SOLVED HERE BY @aronzvi https://github.com/sickcodes/Docker-OSX/issues/244#issuecomment-821990631

@sickcodes commented on GitHub (Apr 18, 2021): SOLVED HERE BY @aronzvi https://github.com/sickcodes/Docker-OSX/issues/244#issuecomment-821990631
Author
Owner

@sickcodes commented on GitHub (Apr 18, 2021):

The bug was in the file command....

@sickcodes commented on GitHub (Apr 18, 2021): The bug was in the file command....
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#164