Why don’t you worry? – getting help

Is anyone kind enough to help me? Recently, I was troubled by a cgo problem.

here it is backtrace Output using gdb. i found that c The code has raised and signaled SIGSEGV for ‘memory access error’ and go has already caught the signal.
the problem is that, Go code ran into infinite loop And don’t worry.

Thread 91 (Thread 0x7f64777fe700 (LWP 365)):
#0  runtime.usleep () at /usr/local/go/src/runtime/sys_linux_amd64.s:144
#1  0x000000000044435e in runtime.raisebadsignal (c=0x7f64777f5198, sig=11) at /usr/local/go/src/runtime/signal_unix.go:496
#2  0x0000000000444773 in runtime.badsignal (c=0x7f64777f5198, sig=11) at /usr/local/go/src/runtime/signal_unix.go:600
#3  0x0000000000443f58 in runtime.sigtrampgo (ctx=0x7f64777f5240, info=0x7f64777f5370, sig=11) at /usr/local/go/src/runtime/signal_unix.go:297
#4  0x000000000045efc3 in runtime.sigtramp () at /usr/local/go/src/runtime/sys_linux_amd64.s:352
#5  <signal handler called>
#6  0x00007f722fbba738 in __memcpy_ssse3_back () from /lib64/libc.so.6
#7  0x00007f705036f728 in AqcPropCalcModRun () from /ise-cn/bin/libaqc20.so
#8  0x00007f7050388092 in ModulesProcessBase () from /ise-cn/bin/libaqc20.so
#9  0x00007f705036baa7 in AqcInstAppend () from /ise-cn/bin/libaqc20.so
#10 0x00007f705036d4f4 in AQCAudioWrite () from /ise-cn/bin/libaqc20.so

The following is the output using strace -e signal -ff -p command. Signal process went into syscall infinite loop!

[pid  7810] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7feb3bffe000} ---
[pid  7810] rt_sigprocmask(SIG_SETMASK, NULL, ~[KILL STOP], 8) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
[pid  7810] sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid  7810] sigaltstack({ss_sp=0xc4535d0000, ss_flags=0, ss_size=32768}, NULL) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[HUP INT QUIT ILL TRAP ABRT BUS FPE KILL SEGV TERM STKFLT CHLD STOP PROF SYS RTMIN RT_1], NULL, 8) = 0
[pid  7810] rt_sigprocmask(SIG_UNBLOCK, [SEGV], NULL, 8) = 0
[pid  7810] rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ff8a5af3630}, NULL, 8) = 0
[pid  7810] tkill(178, SIGSEGV)         = 0
[pid  7810] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
[pid  7810] rt_sigaction(SIGSEGV, {sa_handler=0x45eff0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ff8a5af3630}, NULL, 8) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
[pid  7810] sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}, NULL) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[KILL STOP], NULL, 8) = 0
[pid  7810] rt_sigreturn({mask=[]})     = 140625886429224
[pid  7810] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7feb3bffe000} ---
[pid  7810] rt_sigprocmask(SIG_SETMASK, NULL, ~[KILL STOP], 8) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
[pid  7810] sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid  7810] sigaltstack({ss_sp=0xc4535d0000, ss_flags=0, ss_size=32768}, NULL) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[HUP INT QUIT ILL TRAP ABRT BUS FPE KILL SEGV TERM STKFLT CHLD STOP PROF SYS RTMIN RT_1], NULL, 8) = 0
[pid  7810] rt_sigprocmask(SIG_UNBLOCK, [SEGV], NULL, 8) = 0
[pid  7810] rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ff8a5af3630}, NULL, 8) = 0
[pid  7810] tkill(178, SIGSEGV)         = 0
[pid  7810] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
[pid  7810] rt_sigaction(SIGSEGV, {sa_handler=0x45eff0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ff8a5af3630}, NULL, 8) = 0
[pid  7810] rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
....

Go version and environment:

go version go1.10.3 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build797487429=/tmp/go-build -gno-record-gcc-switches"

Kernel: Linux xxxxx 4.14.49 #1 SMP Fri Jun 15 16:15:07 CST 2018 x86_64 x86_64 x86_64 GNU/Linux

Leave a Comment