https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79281
Bug ID: 79281 Summary: gccgo: Binaries using goroutines crash on m68k Product: gcc Version: 6.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: glaubitz at physik dot fu-berlin.de CC: cmang at google dot com, doko at gcc dot gnu.org, gcc-bugzilla at mkarcher dot dialup.fu-berlin.de, ian at airs dot com, jrtc27 at jrtc27 dot com, schwab at gcc dot gnu.org Target Milestone: --- After fixing #79037, I can compile and run Go programs on m68k now. However, there is still a problem when using Go routines: (sid-m68k-sbuild)root@ikarus:/# cat routines.go package main import ( "fmt" "time" ) func say(s string) { for i := 0; i < 5; i++ { time.Sleep(100 * time.Millisecond) fmt.Println(s) } } func main() { go say("World") go say("Alice") go say("Bob") say("Hello") } (sid-m68k-sbuild)root@ikarus:/# gccgo-6 routines.go -o routines (sid-m68k-sbuild)root@ikarus:/# ./routines futexwakeup addr=0x90416c5e returned -1 fatal error: unexpected signal during runtime execution [signal 0xb code=0x1 addr=0x1006] goroutine 22 [syscall]: runtime_dopanic ../../../src/libgo/runtime/panic.c:131 runtime_throw ../../../src/libgo/runtime/panic.c:193 sig_panic_leadin ../../../src/libgo/runtime/go-signal.c:249 sig_panic_info_handler ../../../src/libgo/runtime/go-signal.c:283 :0 runtime_futexwakeup ../../../src/libgo/runtime/thread-linux.c:70 runtime_notewakeup ../../../src/libgo/runtime/lock_futex.c:121 handoffp ../../../src/libgo/runtime/proc.c:1518 runtime_entersyscallblock ../../../src/libgo/runtime/proc.c:2081 runtime_notetsleepg ../../../src/libgo/runtime/lock_futex.c:200 timerproc ../../../src/libgo/runtime/time.goc:263 kickoff ../../../src/libgo/runtime/proc.c:235 created by addtimer ../../../src/libgo/runtime/time.goc:147 goroutine 16 [running]: goroutine running on other thread; stack unavailable goroutine 17 [syscall]: goroutine in C code; stack unavailable created by runtime_main ../../../src/libgo/runtime/proc.c:598 goroutine 18 [finalizer wait]: Hello runtime_mcall ../../../src/libgo/runtime/proc.c:295 runtime_parkunlock ../../../src/libgo/runtime/proc.c:1887 runfinq ../../../src/libgo/runtime/mgc0.c:2512 kickoff ../../../src/libgo/runtime/proc.c:235 created by runtime_createfing ../../../src/libgo/runtime/mgc0.c:2577 goroutine 19 [sleep]: runtime_mcall ../../../src/libgo/runtime/proc.c:295 runtime_parkunlock ../../../src/libgo/runtime/proc.c:1887 runtime_tsleep ../../../src/libgo/runtime/time.goc:97 time.Sleep ../../../src/libgo/runtime/time.goc:39 main.say //routines.go:10 kickoff ../../../src/libgo/runtime/proc.c:235 created by main.main //routines.go:16 goroutine 20 [sleep]: runtime_mcall ../../../src/libgo/runtime/proc.c:295 runtime_parkunlock ../../../src/libgo/runtime/proc.c:1887 runtime_tsleep ../../../src/libgo/runtime/time.goc:97 time.Sleep ../../../src/libgo/runtime/time.goc:39 main.say //routines.go:10 kickoff ../../../src/libgo/runtime/proc.c:235 created by main.main //routines.go:17 goroutine 21 [sleep]: runtime_mcall ../../../src/libgo/runtime/proc.c:295 runtime_parkunlock ../../../src/libgo/runtime/proc.c:1887 runtime_tsleep ../../../src/libgo/runtime/time.goc:97 time.Sleep ../../../src/libgo/runtime/time.goc:39 main.say //routines.go:10 kickoff ../../../src/libgo/runtime/proc.c:235 created by main.main //routines.go:18 goroutine 23 [GC sweep wait]: runtime_mcall ../../../src/libgo/runtime/proc.c:295 runtime_parkunlock ../../../src/libgo/runtime/proc.c:1887 bgsweep ../../../src/libgo/runtime/mgc0.c:1844 kickoff ../../../src/libgo/runtime/proc.c:235 created by mgc ../../../src/libgo/runtime/mgc0.c:2215 (sid-m68k-sbuild)root@ikarus:/# I have not looked into the problem in detail yet, but I assume it's either the 16-bit alignment striking again or maybe a missing syscall definition. Let me know if there is something I can try to address the issue.