Panics "negative WaitGroup counter" while scanning block devices
Closed this issue · 2 comments
CameronNemo commented
I built from git master (756bee0) to test a fix that was included previously. Saw these results:
[ 1.946831] Run /init as init process
[ 1.997635] booster: found a new device /dev/mmcblk2
[ 1.998128] booster: found a new device /dev/mmcblk2boot0
[ 1.998699] booster: found a new device /dev/mmcblk2boot1
[ 2.004667] booster: blkinfo for /dev/mmcblk2: type=gpt UUID=c9988538-e1de-7146-837a-97c5efb74200 LABEL=
[ 2.007482] booster: found a new device /dev/mmcblk2boot0
[ 2.008031] booster: found a new device /dev/mmcblk2p2
[ 2.008578] booster: found a new device /dev/mmcblk2p4
[ 2.009287] booster: found a new device /dev/mmcblk2p1
[ 2.009887] booster: found a new device /dev/mmcblk2p5
[ 2.010500] booster: found a new device /dev/mmcblk2p6
panic: sync: negative WaitGroup counter
goroutine 23 [running]:
sync.(*WaitGroup).Add(0x3a0320?, 0x400014c240?)
/usr/lib/go/src/sync/waitgroup.go:83 +0x108
sync.(*WaitGroup).Done(...)
/usr/lib/go/src/sync/waitgroup.go:108
main.markDeviceProcessed({0x40000d2f18?, 0x3451d4?})
/builddir/booster-0.9/init/main.go:105 +0x104
main.addBlockDevice({0x40000d2f18, 0x11}, 0x0, {0x0, 0x0, 0x0})
/builddir/booster-0.9/init/main.go:239 +0xa00
main.scanSysBlock.func2()
/builddir/booster-0.9/init/main.go:681 +0x50
created by main.scanSysBlock
/builddir/booster-0.9/init/main.go:679 +0x2b8
[ 2.059487] F2FS-fs (mmcblk2p6): Failed to start F2FS issue_checkpoint_thread (-12)
[ 2.060522] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[ 2.061206] CPU: 0 PID: 208 Comm: init Not tainted 6.1.1_1 #1
[ 2.061723] Hardware name: Pine64 Pinebook Pro (DT)
anatol commented
I checked code logic around the sourcecode from the panic trace and indeed, there seems a bug there. I just pushed a possible fix to wip
branch. Could you please try it and see if it makes your situation better?
CameronNemo commented
Looks to be the fix, thanks!