Skip to content

runtime/trace: failure with SIGSEGV (and no other output) on linux-ppc64-buildlet #55074

Closed
@bcmills

Description

@bcmills
signal: segmentation fault (core dumped)
FAIL	runtime/trace	2.104s

greplogs -l -e 'signal: segmentation fault \(core dumped\)\nFAIL\s+runtime/trace' --since=2022-01-01
2022-09-06T15:49:30-c35bc69/linux-ppc64-buildlet

(CC @golang/runtime @golang/ppc64)

Activity

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
and removed
compiler/runtimeIssues related to the Go compiler and/or runtime.
on Sep 14, 2022
added this to the Backlog milestone on Sep 14, 2022
pmur

pmur commented on Sep 19, 2022

@pmur
Contributor

I started looking into this. I was able to to reproduce a similar segfault on the VM on the same commit. I was able to get a core and save it off.

The backtrace of the fault:

#0  0x000000000006f2e8 in runtime.gentraceback (pc0=145060, sp0=824637013152, lr0=<optimized out>, gp=0xc000003d40, skip=0, pcbuf=0xc0003709e8, max=64, 
    callback={void (runtime.stkframe *, void *, bool *)} 0xc0003709c0, v=0x0, flags=6, ~r0=<optimized out>) at /workdir/go/src/go/src/runtime/traceback.go:162
#1  0x0000000000054974 in runtime.sigprof (pc=<optimized out>, sp=<optimized out>, lr=<optimized out>, gp=<optimized out>, mp=0xc0000e5000) at /workdir/go/src/go/src/runtime/proc.go:4626
#2  0x000000000005fbec in runtime.sighandler (sig=<optimized out>, info=<optimized out>, ctxt=<optimized out>, gp=<optimized out>) at /workdir/go/src/go/src/runtime/signal_unix.go:631
#3  0x000000000005f200 in runtime.sigtrampgo (sig=27, info=0xc000371d78, ctx=0xc000371000) at /workdir/go/src/go/src/runtime/signal_unix.go:479
#4  0x000000000007eee8 in runtime.sigtrampgo (sig=27, info=0xc000371d78, ctx=0xc000371000) at <autogenerated>:1
#5  0x000000000007df28 in sigtramp () at /workdir/go/src/go/src/runtime/sys_linux_ppc64x.s:559
bcmills

bcmills commented on Sep 19, 2022

@bcmills
ContributorAuthor

Hmm, the fault in gentraceback suggests a possible connection to #50144, although that could also be an independent bug with a similar failure mode. 🤔

pmur

pmur commented on Sep 19, 2022

@pmur
Contributor

At the point of failure, I see that, gp.m == nil caused the fault in if flags&_TraceJumpStack != 0 && gp == gp.m.g0 && gp.m.curg != nil .

cherrymui

cherrymui commented on Sep 19, 2022

@cherrymui
Member

CL https://golang.org/cl/428656 is supposed to fix the nil m case. Is the failure before or after that CL? Thanks.

pmur

pmur commented on Sep 19, 2022

@pmur
Contributor

@cherrymui, this is 2 commits prior to that patch.

Though, if gp.m is nil, won't this still segfault when executing gp == gp.m.g0?

prattmic

prattmic commented on Sep 19, 2022

@prattmic
Member

That check is guarding on the previous loop iteration. i.e., in the previous loop gp.m.curg.m == nil. Once we set gp = gp.m.curg, then next iteration will crash on gp.m.g0.

pmur

pmur commented on Sep 19, 2022

@pmur
Contributor

I am not able to reproduce this with CL 428655. I think this has been fixed by CL 428656.

locked and limited conversation to collaborators on Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.arch-ppc64xcompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @prattmic@bcmills@gopherbot@pmur@cherrymui

        Issue actions

          runtime/trace: failure with SIGSEGV (and no other output) on linux-ppc64-buildlet · Issue #55074 · golang/go