Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(60)

Issue 88210044: code review 88210044: runtime: crash when func main calls Goexit and all othe... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by rsc
Modified:
11 years ago
Reviewers:
r, gobot, iant
CC:
golang-codereviews, iant, dvyukov, r
Visibility:
Public.

Description

runtime: crash when func main calls Goexit and all other goroutines exit This has typically crashed in the past, although usually with an 'all goroutines are asleep - deadlock!' message that shows no goroutines (because there aren't any). Previous discussion at: https://groups.google.com/d/msg/golang-nuts/uCT_7WxxopQ/BoSBlLFzUTkJ https://groups.google.com/d/msg/golang-dev/KUojayEr20I/u4fp_Ej5PdUJ http://golang.org/issue/7711 There is general agreement that runtime.Goexit terminates the main goroutine, so that main cannot return, so the program does not exit. The interpretation that all other goroutines exiting causes an exit(0) is relatively new and was not part of those discussions. That is what this CL changes. Thankfully, even though the exit(0) has been there for a while, some other accounting bugs made it very difficult to trigger, so it is reasonable to replace. In particular, see golang.org/issue/7711#c10 for an examination of the behavior across past releases. Fixes issue 7711.

Patch Set 1 #

Patch Set 2 : diff -r e5edcb7742c7 https://code.google.com/p/go/ #

Patch Set 3 : diff -r e5edcb7742c7 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 2b7395456c56 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 80b31b24dfcd https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -8 lines) Patch
M doc/go1.3.html View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M src/pkg/runtime/crash_test.go View 1 2 2 chunks +7 lines, -7 lines 0 comments Download
M src/pkg/runtime/extern.go View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13
rsc
Hello golang-codereviews@googlegroups.com (cc: dvyukov, iant, r), I'd like you to review this change to https://code.google.com/p/go/
11 years ago (2014-04-16 01:14:33 UTC) #1
iant
LGTM
11 years ago (2014-04-16 05:34:33 UTC) #2
dvyukov
What is the rationale behind this change? The current interpretation is not relatively new. It's ...
11 years ago (2014-04-16 06:15:42 UTC) #3
dvyukov
Does it really fix issue 7711? I would expect that the program still hangs. And ...
11 years ago (2014-04-16 06:17:45 UTC) #4
rsc
On Wed, Apr 16, 2014 at 2:15 AM, <dvyukov@google.com> wrote: > What is the rationale ...
11 years ago (2014-04-16 14:35:56 UTC) #5
r
LGTM probably warrants words in the release notes
11 years ago (2014-04-16 15:03:08 UTC) #6
rsc
PTAL: Added doc/go1.3.html to this CL. The new text is: <li> If the main goroutine ...
11 years ago (2014-04-16 15:36:11 UTC) #7
dvyukov
On 2014/04/16 14:35:56, rsc wrote: > On Wed, Apr 16, 2014 at 2:15 AM, <mailto:dvyukov@google.com> ...
11 years ago (2014-04-16 15:54:32 UTC) #8
dvyukov
On 2014/04/16 15:54:32, dvyukov wrote: > On 2014/04/16 14:35:56, rsc wrote: > > On Wed, ...
11 years ago (2014-04-16 15:57:39 UTC) #9
r
LGTM
11 years ago (2014-04-16 16:15:52 UTC) #10
rsc
On Wed, Apr 16, 2014 at 11:54 AM, <dvyukov@google.com> wrote: > If it's all about ...
11 years ago (2014-04-16 17:12:02 UTC) #11
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=809c859fcd6e *** runtime: crash when func main calls Goexit and all other ...
11 years ago (2014-04-16 17:12:22 UTC) #12
gobot
11 years ago (2014-04-16 17:23:15 UTC) #13
Message was sent while issue was closed.
This CL appears to have broken the linux-386-387 builder.
See http://build.golang.org/log/c0e3549fa9374ef5d2d0c8d713780801b2be6148
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b