Skip to content

runtime: async signal can cause traceback failure errors #8063

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

Closed
rsc opened this issue May 21, 2014 · 1 comment
Closed

runtime: async signal can cause traceback failure errors #8063

rsc opened this issue May 21, 2014 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented May 21, 2014

Normally we expect tracebacks to only need to handle frame sequences starting at a safe
point (a function call or a possible panic). Assembly that cannot fault typically
doesn't need an argument frame size because it will not appear in a traceback. However,
Dave Cheney reports that SIGQUIT can cause the traceback code to run starting at an
arbitrary location. If the traceback is just for printing the stack, we should probably
tell the traceback code not to complain about missing arg frame size. If the traceback
was being used for something more important, we need to understand what that was and
make the async signal handler not need that.



---------- Forwarded message ----------
From: Dave Cheney <dave@cheney.net>
Date: Tue, May 20, 2014 at 8:11 PM
Subject: runtime: unknown argument frame size for math/big.addMulVVW called from
0x8abf6e [math/big.basicMul]
To: Russ Cox <rsc@golang.org>


Hi Russ,

I ran across this failure today. The repro is a bit hard as it relies
on the test being killed by the watchdog, so this panic was due to the
timeout code killing the test process with SIGQUIT.

Would you like to see this as an issue?

Cheers

Dave

SIGQUIT: quit


                                                  [416/743]
PC=0x8b7467

goroutine 4425 [running]:
runtime: unknown argument frame size for math/big.addMulVVW called
from 0x8abf6e [math/big.basicMul]
math/big.addMulVVW()
        /home/dfc/go/src/pkg/math/big/arith_amd64.s:362 +0x37 fp=0x7f5f6af630e0
math/big.basicMul(0xc2085d87e0, 0x20, 0x24, 0xc208652240, 0x10, 0x24,
0xc208652240, 0x10, 0x24)
        /home/dfc/go/src/pkg/math/big/nat.go:216 +0x11e fp=0x7f5f6af63158
math/big.nat.mul(0xc2085d87e0, 0x20, 0x24, 0xc208652240, 0x10, 0x24,
0xc208652240, 0x10, 0x24, 0xc2087142c0, ...)
        /home/dfc/go/src/pkg/math/big/nat.go:401 +0x34d fp=0x7f5f6af63318
math/big.nat.expNNWindowed(0xc208652240, 0x10, 0x24, 0xc2083d6320,
0x10, 0x14, 0xc2083d61e0, 0x10, 0x14, 0xc2087142c0, ...)
        /home/dfc/go/src/pkg/math/big/nat.go:1354 +0x8ed fp=0x7f5f6af635a8
math/big.nat.expNN(0xc2085d87e0, 0x10, 0x24, 0xc2083d6320, 0x10, 0x14,
0xc2083d61e0, 0x10, 0x14, 0xc2087142c0, ...)
        /home/dfc/go/src/pkg/math/big/nat.go:1260 +0x3a0 fp=0x7f5f6af63738
math/big.nat.probablyPrime(0xc2087142c0, 0x10, 0x15, 0x14, 0xd2b101)
        /home/dfc/go/src/pkg/math/big/nat.go:1445 +0x821 fp=0x7f5f6af638b8
math/big.(*Int).ProbablyPrime(0xc2085beb60, 0x14, 0x7f5f6b0d3001)
        /home/dfc/go/src/pkg/math/big/int.go:722 +0x4a fp=0x7f5f6af638f0
crypto/rsa.(*PrivateKey).Validate(0xc2082a0660, 0x2, 0x2)
        /home/dfc/go/src/pkg/crypto/rsa/rsa.go:91 +0xc1 fp=0x7f5f6af639b8
crypto/x509.ParsePKCS1PrivateKey(0xc208254000, 0x4a8, 0x4aa,
0xc2082a0660, 0x0, 0x0)
        /home/dfc/go/src/pkg/crypto/x509/pkcs1.go:77 +0x480 fp=0x7f5f6af63ac0
github.com/joyent/gosign/auth.GetSignature(0xc20821b340, 0xc208699a40,
0x23, 0x1d, 0xc208699a40, 0x23, 0x7f5f6af63c10)
        /home/dfc/src/github.com/joyent/gosign/auth/auth.go:78 +0x1ab
fp=0x7f5f6af63b90
github.com/joyent/gosign/auth.CreateAuthorizationHeader(0xc208699920,
0xc20821b340, 0x1, 0xc2085beae0, 0x1d, 0x127565625887be89,
0xc212756562)
        /home/dfc/src/github.com/joyent/gosign/auth/auth.go:56 +0xbb
fp=0x7f5f6af63c60
github.com/joyent/gocommon/http.createHeaders(0xc208699800,
0xc20821b340, 0xdf2a70, 0x18, 0xd3a430, 0x0, 0xd3a430, 0x0, 0x429201,
0x7f5f6af63dd0, ...)
        /home/dfc/src/github.com/joyent/gocommon/http/client.go:111
+0x2e0 fp=0x7f5f6af63d48
github.com/joyent/gocommon/http.(*Client).BinaryRequest(0xc2083b4900,
0xd44070, 0x3, 0xc2085d03c0, 0x38, 0xd3a430, 0x0, 0xc2085d0340,
0xc2085d0380, 0xc2085d03c0, ...)
        /home/dfc/src/github.com/joyent/gocommon/http/client.go:239
+0x168 fp=0x7f5f6af63df8
github.com/joyent/gocommon/client.(*client).sendRequest(0xc2084c8b40,
0xd44070, 0x3, 0xc2085d03c0, 0x38, 0xd3a430, 0x0, 0xc2085d0340,
0xc2085d0380, 0x7f5f5bf21d60, ...)
        /home/dfc/src/github.com/joyent/gocommon/client/client.go:69
+0x9d fp=0x7f5f6af63e58
github.com/joyent/gocommon/client.(*client).SendRequest(0xc2084c8b40,
0xd44070, 0x3, 0xc2085bea20, 0x1c, 0xd3a430, 0x0, 0xc2085d0340,
0xc2085d0380, 0x0, ...)
        /home/dfc/src/github.com/joyent/gocommon/client/client.go:76
+0x11f fp=0x7f5f6af63ef8
github.com/joyent/gomanta/manta.(*Client).sendRequest(0xc2081cb2e0,
0xd44070, 0x3, 0xc2085bea20, 0x1c, 0x0, 0x0, 0xc208699800, 0x0, 0x0,
...)
        /home/dfc/src/github.com/joyent/gomanta/manta/manta.go:88
+0x21d fp=0x7f5f6af64000
github.com/joyent/gomanta/manta.(*Client).PutDirectory(0xc2081cb2e0,
0xc2085be9c0, 0x17, 0xc2085be9c0, 0x17)
        /home/dfc/src/github.com/joyent/gomanta/manta/manta.go:125
+0x189 fp=0x7f5f6af641a0
launchpad.net/juju-core/provider/joyent.(*JoyentStorage).Put(0xc2084c8b70,
0xc2085bee40, 0x1b, 0x7f5f6b0f6cc0, 0xc2086994a0, 0x1f2, 0xc208114d80,
0x1f2)
        /home/dfc/src/launchpad.net/juju-core/provider/joyent/storage.go:177
+0x41b fp=0x7f5f6af64370
launchpad.net/juju-core/environs/tools.WriteMetadata(0x7f5f6b0ea860,
0xc2084c8b70, 0xc20819a4f0, 0x2, 0x2, 0x0, 0xc20819a4f0, 0x2)
        /home/dfc/src/launchpad.net/juju-core/environs/tools/simplestreams.go:380
+0x576 fp=0x7f5f6af645d0
launchpad.net/juju-core/environs/tools.MergeAndWriteMetadata(0x7f5f6b0ea860,
0xc2084c8b70, 0xc20819a910, 0x2, 0x2, 0x0, 0x2, 0x0)
        /home/dfc/src/launchpad.net/juju-core/environs/tools/simplestreams.go:407
+0x182 fp=0x7f5f6af64658
launchpad.net/juju-core/environs/testing.UploadFakeToolsVersions(0x7f5f6b0ea860,
0xc2084c8b70, 0xc20839c480, 0x2, 0x2, 0xc20839c480, 0x1, 0x2,
0xc2082d2450, 0xffffffff)
        /home/dfc/src/launchpad.net/juju-core/environs/testing/tools.go:155
+0x2d6 fp=0x7f5f6af64800
launchpad.net/juju-core/environs/testing.(*ToolsFixture).UploadFakeTools(0xc20803c6e0,
0xc2087148f0, 0x7f5f6b0ea860, 0xc2084c8b70)
        /home/dfc/src/launchpad.net/juju-core/environs/testing/tools.go:65
+0x256 fp=0x7f5f6af64950
launchpad.net/juju-core/environs/jujutest.(*LiveTests).TestPorts(0xc20803c6e0,
0xc2087148f0)
        /home/dfc/src/launchpad.net/juju-core/environs/jujutest/livetests.go:214
+0xa6 fp=0x7f5f6af64ac0
runtime.call16(0xd1a130, 0xc2081cb890, 0x1000000010)
        /home/dfc/go/src/pkg/runtime/asm_amd64.s:345 +0x32 fp=0x7f5f6af64ad8
reflect.Value.call(0xd19c80, 0xc20803c640, 0x0, 0x2d38, 0xd3e530, 0x4,
0xc208194e20, 0x1, 0x1, 0x20, ...)
        /home/dfc/go/src/pkg/reflect/value.go:563 +0x1069 fp=0x7f5f6af64e00
reflect.Value.Call(0xd19c80, 0xc20803c640, 0x0, 0x2d38, 0xc208194e20,
0x1, 0x1, 0x41cc8c, 0xa839c0, 0xc20806e160)
        /home/dfc/go/src/pkg/reflect/value.go:411 +0xb3 fp=0x7f5f6af64e68
launchpad.net/gocheck.func·006(0xc2087148f0)
        /home/dfc/src/launchpad.net/gocheck/gocheck.go:735 +0x355
fp=0x7f5f6af64f78
launchpad.net/gocheck.func·004()
        /home/dfc/src/launchpad.net/gocheck/gocheck.go:630 +0x8f
fp=0x7f5f6af64fa8
runtime.goexit()
        /home/dfc/go/src/pkg/runtime/proc.c:1445 fp=0x7f5f6af64fb0
created by launchpad.net/gocheck.(*suiteRunner).forkCall
        /home/dfc/src/launchpad.net/gocheck/gocheck.go:631 +0x246
@rsc
Copy link
Contributor Author

rsc commented Sep 18, 2014

Comment 1:

The specific message is gone.
The traceback code doesn't complain about missing argument frames anymore.
The stack copying and garbage collector know how to deal with panics at arbitrary points
(CL 100870044).
So whatever the problem was here, it's fixed.

Status changed to Fixed.

@rsc rsc added fixed labels Sep 18, 2014
@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants