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

Open
mmli519 opened this issue Oct 14, 2019 · 6 comments

Comments

@mmli519
Copy link

@mmli519 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
    #1 0x0000000000444a14 in runtime.raisebadsignal (sig=11, c=0x400051ad28) at /opt/tools/go/src/runtime/signal_unix.go:488
    #2 0x0000000000444d04 in runtime.badsignal (sig=11, c=0x400051ad28) at /opt/tools/go/src/runtime/signal_unix.go:598
    #3 0x00000000004443d4 in runtime.sigtrampgo (sig=, info=0x400051ada0, ctx=0x400051ae20) at /opt/tools/go/src/runtime/signal_unix.go:299
    #4 0x000000000045bca4 in runtime.sigtramp () at /opt/tools/go/src/runtime/sys_linux_arm64.s:332
    #5
    #6 runtime.systemstack () at /opt/tools/go/src/runtime/asm_arm64.s:243
    #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
    #1 0x000000000042caf4 in runtime.futexsleep (addr=0x1514618 <runtime.newmHandoff+24>, val=0, ns=-1) at /opt/tools/go/src/runtime/os_linux.go:46
    #2 0x000000000040bcd8 in runtime.notesleep (n=0x1514618 <runtime.newmHandoff+24>) at /opt/tools/go/src/runtime/lock_futex.go:151
    #3 0x0000000000434b14 in runtime.templateThread () at /opt/tools/go/src/runtime/proc.go:1914
    #4 0x000000000043350c in runtime.mstart1 () at /opt/tools/go/src/runtime/proc.go:1206
    #5 0x000000000043342c in runtime.mstart () at /opt/tools/go/src/runtime/proc.go:1172
    #6 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #7 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #8 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #9 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #10 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #11 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #12 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #13 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #14 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #15 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #16 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #17 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #18 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #19 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #20 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #21 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #22 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #23 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #24 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #25 0x0000000000b69868 in crosscall1 () at gcc_arm64.S:40
    #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

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Oct 14, 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 ?
@agnivade agnivade changed the title go program crash in arm64 environment runtime: fatal error: gopark: bad g status Oct 14, 2019
@benshi001

This comment has been minimized.

Copy link
Member

@benshi001 benshi001 commented Oct 14, 2019

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

@jshachm

This comment has been minimized.

Copy link

@jshachm jshachm commented Oct 17, 2019

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

@mmli519

This comment has been minimized.

Copy link
Author

@mmli519 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

This comment has been minimized.

Copy link
Author

@mmli519 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

This comment has been minimized.

Copy link
Author

@mmli519 mmli519 commented Oct 19, 2019

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

not yet, still investigate the crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.