Hi all, Having an issue on Arm (Raspberry Pi 3) where it is throwing a SIGSEGV only when CPU profiling is turned on. Just wanted to sanity check my findings here...
This seems possibly related to https://github.com/golang/go/issues/20417 maybe https://github.com/golang/go/issues/10534 Problem is reproducible on 1.11.1, 1.12 and tip using this program: https://play.golang.org/p/PA5E0AQw28W Should show: 2019/03/09 12:45:26 Listening... 2019/03/09 12:45:30 1000 connections... 2019/03/09 12:45:30 2000 connections... : : : 2019/03/09 12:51:10 999000 connections... 2019/03/09 12:51:11 1000000 connections... 2019/03/09 12:51:11 Finished Which it does on amd64 and a Raspberry Pi Zero W. On the Raspberry Pi 3 I'm seeing: 2019/03/09 12:46:30 Listening... 2019/03/09 12:46:35 1000 connections... 2019/03/09 12:46:38 2000 connections... : : : 2019/03/09 12:47:06 14000 connections... 2019/03/09 12:47:08 15000 connections... Segmentation fault (core dumped) >From the core file using gdb: Core was generated by `./cpuprofile'. Program terminated with signal SIGSEGV, Segmentation fault. #0 runtime.sigtrampgo (ctx=0x2009d10, info=0x2009c90, sig=<optimized out>) at /home/rolfea/go1.11.1/src/runtime/signal_unix.go:307 307 if sp < g.m.gsignal.stack.lo || sp >= g.m.gsignal.stack.hi { [Current thread is 1 (LWP 16249)] Loading Go Runtime support. 3(gdb) bt #0 runtime.sigtrampgo (ctx=0x2009d10, info=0x2009c90, sig=<optimized out>) at /home/rolfea/go1.11.1/src/runtime/signal_unix.go:307 #1 0x00064904 in runtime.sigtramp () at /home/rolfea/go1.11.1/src/runtime/sys_linux_arm.s:445 #2 0x7ea99408 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) >From running with strace: accept4(5, 0xc63de0, [112], SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(4, [{EPOLLIN, {u32=1724452800, u64=1724452800}}], 128, 0) = 1 accept4(5, {sa_family=AF_INET, sin_port=htons(34640), sin_addr=inet_addr("127.0.0.1")}, [112->16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 6 epoll_ctl(4, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=1724452672, u64=1724452672}}) = 0 getsockname(6, {sa_family=AF_INET, sin_port=htons(4001), sin_addr=inet_addr("127.0.0.1")}, [112->16]) = 0 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0 epoll_ctl(4, EPOLL_CTL_DEL, 6, 0xc63ec0) = 0 close(6) = 0 accept4(5, 0xc63de0, [112], SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(4, [], 128, 0) = 0 epoll_wait(4, [{EPOLLIN, {u32=1724452800, u64=1724452800}}], 128, -1) = 1 --- SIGPROF {si_signo=SIGPROF, si_code=SI_KERNEL} --- --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xa387933b} --- +++ killed by SIGSEGV +++ Segmentation fault System details: go version go1.12 linux/arm GOARCH="arm" GOBIN="" GOCACHE="/tmp/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="arm" GOHOSTOS="linux" GOOS="linux" GOPATH="" GOPROXY="" GORACE="" GOROOT="/home/rolfea/go" GOTMPDIR="" GOTOOLDIR="/home/rolfea/go/pkg/tool/linux_arm" GCCGO="gccgo" GOARM="7" CC="gcc" CXX="g++" CGO_ENABLED="0" GOMOD="" GOROOT/bin/go version: go version go1.12 linux/arm GOROOT/bin/go tool compile -V: compile version go1.12 uname -sr: Linux 4.14.98-v7+ /lib/arm-linux-gnueabihf/libc.so.6: GNU C Library (Debian GLIBC 2.28-7+rpi1) stable release version 2.28. gdb --version: GNU gdb (Raspbian 8.2.1-2) 8.2.1 I've run memtester on the Raspberry Pi 3 and it shows no memory issues and the Pi3 is running without any issues. Thank you for your time, Diddymus -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.