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

x/tools/go/types: can crash when object files out of date #5664

Closed
rogpeppe opened this issue Jun 7, 2013 · 12 comments
Closed

x/tools/go/types: can crash when object files out of date #5664

rogpeppe opened this issue Jun 7, 2013 · 12 comments

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented Jun 7, 2013

go vet crashed in an unexpected way when running
over some code. rebuilding the source seemed to fix the
problem. i can only assume that it's getting type
information from object files that happened to
be out of date.

if that's the case, it should either build them fresh or
complain that they're out of date.

here's the traceback, for the record:
(the target type is nonsensical - the argument to
the function in question does not take any such type).

machine_test.go:45:44: convertUntyped(x = "ardbeg-0" (constant
"\"ardbeg-0\""), target = launchpad.net/juju-core/constraints.Value)
INTERNAL PANIC: unreachable
panic: unreachable [recovered]
    panic: unreachable

goroutine 1 [running]:
code.google.com/p/go.tools/go/types.func·003()
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/check.go:113 +0x16a
code.google.com/p/go.tools/go/types.unreachable()
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/errors.go:24 +0x53
code.google.com/p/go.tools/go/types.(*checker).convertUntyped(0xc21004c870,
0xc210471a00, 0xc21004f240, 0xc210238f00)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/expr.go:626 +0x626
code.google.com/p/go.tools/go/types.(*checker).assignment(0xc21004c870, 0xc210471a00,
0xc21004f240, 0xc210238f00, 0xc21004f240, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/stmt.go:34 +0x199
code.google.com/p/go.tools/go/types.(*checker).argument(0xc21004c870, 0xc210274510, 0x1,
0xc21002b580, 0xc210100100, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/expr.go:987 +0x23a
code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc21004c870, 0xc210471a00,
0xc21002b540, 0xc2100fe7c0, 0x0, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/expr.go:1603 +0x3c3b
code.google.com/p/go.tools/go/types.(*checker).expr(0xc21004c870, 0xc210471a00,
0xc21002b540, 0xc2100fe7c0, 0x0, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/expr.go:1756 +0x88
code.google.com/p/go.tools/go/types.(*checker).assignMulti(0xc21004c870, 0xc2105f08e0,
0x2, 0x2, 0xc2100ecc10, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/assignments.go:109 +0x46e
code.google.com/p/go.tools/go/types.(*checker).stmt(0xc21004c870, 0xc210061800,
0xc2100fe800)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/stmt.go:419 +0x4572
code.google.com/p/go.tools/go/types.(*checker).stmtList(0xc21004c870, 0xc21004da00, 0xb,
0x10)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/stmt.go:266 +0x68
code.google.com/p/go.tools/go/types.check(0xc2101badc0, 0x601080, 0x1, 0xc21004ffc0,
0xc2100eb180, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/check.go:159 +0x431
code.google.com/p/go.tools/go/types.(*Context).Check(0xc2101badc0, 0x601080, 0x1,
0xc21004ffc0, 0xc2100eb180, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/go/types/api.go:142 +0x6c
main.(*Package).check(0xc2101bad00, 0xc21004ffc0, 0xc2100eb180, 0xd, 0x10, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/cmd/vet/types.go:32 +0x168
main.doPackage(0x601080, 0x1, 0xc21000a010, 0xd, 0xd, ...)
    /home/rog/src/go/src/code.google.com/p/go.tools/cmd/vet/main.go:226 +0x8f5
main.main()
    /home/rog/src/go/src/code.google.com/p/go.tools/cmd/vet/main.go:144 +0x665

goroutine 2 [runnable]:
go: exit 1
exit status 2


go tools version: 956fb611bffb+ tip
go version: 4aa7943034c5+ tip
@robpike
Copy link
Contributor

robpike commented Jun 8, 2013

Comment 1:

Labels changed: added priority-soon, removed priority-triage.

Owner changed to @griesemer.

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Jun 10, 2013

Comment 2:

Issue #5675 has been merged into this issue.

@griesemer
Copy link
Contributor

Comment 3:

Issue #5675 has been merged into this issue.

@griesemer
Copy link
Contributor

Comment 4:

Issue #5675 has been merged into this issue.

@griesemer
Copy link
Contributor

Comment 5:

https://golang.org/cl/10141044

@rogpeppe
Copy link
Contributor Author

Comment 6:

Are you sure that this is the same as issue #5675?
The stack traces don't look *that* similar to me, and
the fact that the type checker was trying to convert
to a totally unrelated type (one that was not mentioned
in the function's signature) makes me think something
else might be going on here.

@griesemer
Copy link
Contributor

Comment 7:

Yes, you're right. This could be something else. Going to disentangle the two again.
That said, w/o more information, this issue is not very "actionable". Leaving it open
for now.

@griesemer
Copy link
Contributor

Comment 8:

Waiting for another reproducible crash.

Status changed to WaitingForReply.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 9:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 10:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 11:

Labels changed: added repo-tools.

@griesemer
Copy link
Contributor

Comment 12:

Status changed to TimedOut.

@mikioh mikioh changed the title go.tools/go/types: can crash when object files out of date x/tools/go/types: can crash when object files out of date Aug 5, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 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

5 participants