for BIT in $(seq 0 31); do make clean && rm -f objs.txt && BIT=$BIT make -j9 && cp arch/x86/boot/bzImage kernel_${BIT}.bzimg && mv objs.txt objs_${BIT}.txt ; donehttps://twitter.com/marcan42/status/928571175210323968 …
-
Show this thread
-
Finished building 32 kernels in 29 minutes. Time to test.
2 replies 2 retweets 8 likesShow this thread -
I expect 16/32 crashes on average; I'm at 8 so far after running through all kernels twice at 20 seconds per test. That narrows it down to 4 object files. The time to crash is nondeterministic, so let's go for a third run...
2 replies 1 retweet 4 likesShow this thread -


DING DING

$ grep '^[0246][012389ab][0189][014589cd][028a][012389ab][014589cd]' objs_0.txt
6b9cab4f arch/x86/entry/vdso/vclock_gettime.o #yes, grep for bitops Who'd have thought a *userspace* crash would depend on a difference in vdso code... which is userspace code!4 replies 5 retweets 12 likesShow this thread -
Surprise, it's Go's fault. Turns out 104 bytes of stack space is not enough when GCC decides to do a 4K stack probe. And stack probes are *exactly* what would cause nondeterministic corruption if another thread races that address!https://github.com/golang/go/issues/20427#issuecomment-343255844 …
1 reply 8 retweets 29 likesShow this thread -
So my second time stumbling upon and debugging a Go runtime bug *again* winds up being a problem with Go->C interop. Still not a fan of Go.
2 replies 3 retweets 14 likesShow this thread -
Replying to @marcan42
Among the people who use Go daily it's sort of well known that using cgo can be quirky due to all sorts of vague reasons; one learns to expect to pay a performance penalty at best. That runtime VDSO isn't really cgo and that's ok because it makes sense to optimize its performance
1 reply 0 retweets 0 likes
It's not cgo and that's why it crashes: because it makes assumptions about the vDSO that are not guaranteed by the C ABI that it will play nicely with Go's stack layout. You can't have your cake (funny stacks) and eat it too (call C code on them).
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.