[Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
FWIW, my guess is that the reason this appears to be "fixed" when dropping to a smaller pagesize is simply because you're exhausting the stack more slowly. Given that it takes a long while reproduce with juju (or, so I've been told), it does also beg the question if juju has a slow memory leak. ** Package changed: linux (Ubuntu) => gccgo-4.9 (Ubuntu) ** Changed in: gccgo-4.9 (Ubuntu) Status: Incomplete => Confirmed ** Summary changed: - gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels + gccgo on ppc64el using split stacks when not supported ** Tags removed: kernel-da-key performing-bisect -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo on ppc64el using split stacks when not supported To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
Thanks Anton, this is great debugging. I tried the peano experiment on my -8 (4k) kernel and it failed as expected. I talked to the upstream who said that ./configure should detect that -fsplit-stack isn't supported on PPC and fall back to giving each goroutine a full stack. I will investigate this today. With this said, should this bug be reassiged to gccgo (trusty) ? On Thu, Apr 10, 2014 at 8:44 PM, Anton Blanchard wrote: > Based on the fail, I took a look at how gccgo handles stacks. It relies > on the split stack feature in gold, which doesn't appear to be > implemented for ppc64. > > Running one of the go recursion testcases (attached) shows what happens > when we run out of stack and don't have the split stack feature to save > us: > > #gccgo -g -O2 -o peano peano.go > # ./peano > Segmentation fault > > And we get the setup_rt_frame error in dmesg: > > peano[4538]: bad frame in setup_rt_frame: 00c20ff7f000 nip > 10001018 lr 10001024 > > As expected, we are just continually recurse without checking out stack > pointer for overflow: > >0x10001008 <+8>: cmpdi r3,0 >0x1000100c <+12>:beq 0x10001040 >0x10001010 <+16>:mflrr0 >0x10001014 <+20>:std r0,16(r1) >0x10001018 <+24>:stdur1,-32(r1) >0x1000101c <+28>:ld r3,0(r3) >0x10001020 <+32>:bl 0x10001008 > > > ** Attachment added: "peano.go" > > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+attachment/4079310/+files/peano.go > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1304754 > > Title: > gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels > > Status in "linux" package in Ubuntu: > Incomplete > > Bug description: > On kernels 3.13-18 and 3.13-23 (there may be others) the kernel is > killing gccgo compiled binaries > > [18519.444748] jujud[19277]: bad frame in setup_rt_frame: > nip lr > [18519.673632] init: juju-agent-ubuntu-local main process (19220) > killed by SEGV signal > [18519.673651] init: juju-agent-ubuntu-local main process ended, respawning > > In powerpc/kernel/signal_64.c: > > sys_rt_sigreturn is jumping to the badframe: label and executing an > unconditional force_sigsegv which is delivered to the userland > process. Like C++, gccgo tries to decode SIGSEGV as a nil pointer > access and blame some random function that happened to be the top > stack frame. > > Reverting to the 3.13-08 kernel appears to resolve the issue which > (weakly) points the finger at the recent switch to 64k pages. > > To manage notifications about this bug go to: > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
Based on the fail, I took a look at how gccgo handles stacks. It relies on the split stack feature in gold, which doesn't appear to be implemented for ppc64. Running one of the go recursion testcases (attached) shows what happens when we run out of stack and don't have the split stack feature to save us: #gccgo -g -O2 -o peano peano.go # ./peano Segmentation fault And we get the setup_rt_frame error in dmesg: peano[4538]: bad frame in setup_rt_frame: 00c20ff7f000 nip 10001018 lr 10001024 As expected, we are just continually recurse without checking out stack pointer for overflow: 0x10001008 <+8>: cmpdi r3,0 0x1000100c <+12>:beq 0x10001040 0x10001010 <+16>:mflrr0 0x10001014 <+20>:std r0,16(r1) 0x10001018 <+24>:stdur1,-32(r1) 0x1000101c <+28>:ld r3,0(r3) 0x10001020 <+32>:bl 0x10001008 ** Attachment added: "peano.go" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+attachment/4079310/+files/peano.go -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
If the bug still exists with the latest mainline kernel, we can perform a bisect to identify the fix that introduced this. However, if the mainline kernel resolves this bug, we can perform a "Reverse" bisect to identify the commit that fixes this. ** Tags added: performing-bisect -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.14 kernel[0]. If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'. If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'. If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'. Once testing of the upstream kernel is complete, please mark this bug as "Confirmed". Thanks in advance. [0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14-trusty/ ** Changed in: linux (Ubuntu) Importance: Undecided => Medium ** Tags added: kernel-da-key ppc64el trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1304754] Re: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels
See also, https://bugs.launchpad.net/juju-core/+bug/1303787 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1304754 Title: gccgo compiled binaries are killed by SEGV on 64k ppc64el kernels To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs