Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: fatal error: gopark: bad g status #34886

Closed
mmli519 opened this issue Oct 14, 2019 · 7 comments
Closed

runtime: fatal error: gopark: bad g status #34886

mmli519 opened this issue Oct 14, 2019 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@mmli519
Copy link

mmli519 commented Oct 14, 2019

What version of Go are you using (go version)?

go version go1.12.9 linux/arm64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
aarch64

What did you do?

run go developped program

What did you expect to see?

program run normally

What did you see instead?

program crashed

  1. error log when program crashed

fatal error: gopark: bad g status

goroutine 8 [GC worker (idle)]:
runtime.throw(0xd3589e, 0x14)
/opt/tools/go/src/runtime/panic.go:617 +0x54 fp=0x4000179730 sp=0x4000179700 pc=0x42ed2c
runtime.gopark(0xd5ba18, 0x4000450e50, 0x1417, 0x0)
/opt/tools/go/src/runtime/proc.go:292 +0x130 fp=0x4000179750 sp=0x4000179730 pc=0x430a88
runtime.gcBgMarkWorker(0x400005ef00)
/opt/tools/go/src/runtime/mgc.go:1836 +0xe8 fp=0x40001797d0 sp=0x4000179750 pc=0x41cde0
runtime.goexit()
/opt/tools/go/src/runtime/asm_arm64.s:1128 +0x4 fp=0x40001797d0 sp=0x40001797d0 pc=0x45b13c
created by runtime.gcBgMarkStartWorkers
/opt/tools/go/src/runtime/mgc.go:1784 +0x80

  1. crash thread
    (gdb) bt
    #0 runtime.raise () at /opt/tools/go/src/runtime/sys_linux_arm64.s:156
    cmd/cgo: fails with gcc 4.4.1 #1 0x0000000000444a14 in runtime.raisebadsignal (sig=11, c=0x400051ad28) at /opt/tools/go/src/runtime/signal_unix.go:488
    net: LookupHost is returning odd values and crashing net tests #2 0x0000000000444d04 in runtime.badsignal (sig=11, c=0x400051ad28) at /opt/tools/go/src/runtime/signal_unix.go:598
    Problem with quietgcc #3 0x00000000004443d4 in runtime.sigtrampgo (sig=, info=0x400051ada0, ctx=0x400051ae20) at /opt/tools/go/src/runtime/signal_unix.go:299
    Segmentation fault on OS X 10.5 386 for "net" test #4 0x000000000045bca4 in runtime.sigtramp () at /opt/tools/go/src/runtime/sys_linux_arm64.s:332
    HTTP client&server tests fail. DNS_ServerName and URL_Target strings conjoined into nonsense. #5
    all.bash segfault  #6 runtime.systemstack () at /opt/tools/go/src/runtime/asm_arm64.s:243
    Crash when running tests, no tests matching. #7 0x00000000004333c8 in runtime.startTheWorldWithSema (emitTraceEvent=48, ~r1=) at /opt/tools/go/src/runtime/proc.go:1082
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)

  2. infinite loop thread
    #0 runtime.futex () at /opt/tools/go/src/runtime/sys_linux_arm64.s:417
    cmd/cgo: fails with gcc 4.4.1 #1 0x000000000042caf4 in runtime.futexsleep (addr=0x1514618 <runtime.newmHandoff+24>, val=0, ns=-1) at /opt/tools/go/src/runtime/os_linux.go:46
    net: LookupHost is returning odd values and crashing net tests #2 0x000000000040bcd8 in runtime.notesleep (n=0x1514618 <runtime.newmHandoff+24>) at /opt/tools/go/src/runtime/lock_futex.go:151
    Problem with quietgcc #3 0x0000000000434b14 in runtime.templateThread () at /opt/tools/go/src/runtime/proc.go:1914
    Segmentation fault on OS X 10.5 386 for "net" test #4 0x000000000043350c in runtime.mstart1 () at /opt/tools/go/src/runtime/proc.go:1206
    HTTP client&server tests fail. DNS_ServerName and URL_Target strings conjoined into nonsense. #5 0x000000000043342c in runtime.mstart () at /opt/tools/go/src/runtime/proc.go:1172
    all.bash segfault  #6 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    Crash when running tests, no tests matching. #7 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    go-mode.el breaks when editing empty file #8 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    I have already used the name for *MY* programming language #9 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    throw: index out of range during all.bash #10 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    $GOROOT/src/Make.linux/amd64: No such file or directory #11 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    required environment variables have no checks in all.bash #12 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    net: TestDialGoogle fails #13 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    On linux/amd64 you also need sudo aptitude install ed #14 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    "throw: index out of range" and "unknown pc" running network tests on Virtuozzo-virtualized Linux/amd64 system #15 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    Segfault getting Go to build #16 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    SIGTRAP when gopack grc _test/net.a _gotest_.8 #17 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    net: TestDialGoogle fails on "tcp6" address family #18 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    Build fails on Linux/386 on Ubuntu 9.10 #19 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    http.TestClient and TestRedirect FAIL: Get http://www.google.com/robots.txt: unexpected EOF #20 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    cgo panic in main·*Prog·loadDebugInfo #21 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    path.TestWalk fails running as root #22 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    net: TestDialError fails #23 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    ./6.out: cannot execute binary file #24 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    type.h:43 chan.c:6 incomplete structure element: m #25 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    unknown pc's #26 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    ...
    infinite loop

infinite loop maybe caused by gcc_arm64.S (line 40)
25 .globl EXT(crosscall1)
26 EXT(crosscall1):
27 stp x19, x20, [sp, #-16]!
28 stp x21, x22, [sp, #-16]!
29 stp x23, x24, [sp, #-16]!
30 stp x25, x26, [sp, #-16]!
31 stp x27, x28, [sp, #-16]!
32 stp x29, x30, [sp, #-16]!
33 mov x29, sp
34
35 mov x19, x0
36 mov x20, x1
37 mov x0, x2
38
39 blr x20
40 blr x19
41
42 ldp x29, x30, [sp], #16
43 ldp x27, x28, [sp], #16
44 ldp x25, x26, [sp], #16
45 ldp x23, x24, [sp], #16
46 ldp x21, x22, [sp], #16
47 ldp x19, x20, [sp], #16
48 ret

@agnivade
Copy link
Contributor

  • Does the crash happen with 1.13 ?
  • Have you compiled your code with -race and ensured there are no races ?
  • Is this issue reproducible ? Can you share with us a sample code that causes the crash ?

@agnivade agnivade changed the title go program crash in arm64 environment runtime: fatal error: gopark: bad g status Oct 14, 2019
@agnivade agnivade added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 14, 2019
@benshi001
Copy link
Member

Add an extra USB disk and mount is as swap? I had a similiar issue and the extra swap fixed it.

@jshachm
Copy link

jshachm commented Oct 17, 2019

we met this panic when we use containerd
@mmli519 anyother info update?

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 17, 2019
@mmli519
Copy link
Author

mmli519 commented Oct 19, 2019

  • Does the crash happen with 1.13 ?
  • Have you compiled your code with -race and ensured there are no races ?
  • Is this issue reproducible ? Can you share with us a sample code that causes the crash ?
  • Does the crash happen with 1.13 ?

--- not use 1.13 in product environment yet

  • Have you compiled your code with -race and ensured there are no races ?

--- no, we will try use -race in dev environment

  • Is this issue reproducible ? Can you share with us a sample code that causes the crash ?

--- still not reproduced? not sure which code causes the crash

@mmli519
Copy link
Author

mmli519 commented Oct 19, 2019

Add an extra USB disk and mount is as swap? I had a similiar issue and the extra swap fixed it.

thanks, I think it should not be caused by swap.

@mmli519
Copy link
Author

mmli519 commented Oct 19, 2019

we met this panic when we use containerd
@mmli519 anyother info update?

not yet, still investigate the crash

@agnivade agnivade added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 19, 2019
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants