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

Issue 11575044: code review 11575044: runtime: do not split stacks in syscall status (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by dvyukov
Modified:
10 years, 9 months ago
Reviewers:
rsc
CC:
rsc, golang-dev
Visibility:
Public.

Description

runtime: do not split stacks in syscall status Split stack checks (morestack) corrupt g->sched, but g->sched must be preserved consistent for GC/traceback. The change implements runtime.notetsleepg function, which does entersyscall/exitsyscall and is carefully arranged to not call any split functions in between.

Patch Set 1 #

Patch Set 2 : diff -r ee11148d2255 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r ee11148d2255 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r ee11148d2255 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r e6a6dc0d9c22 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r e6a6dc0d9c22 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r e6a6dc0d9c22 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 8 : diff -r e6a6dc0d9c22 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 9 : diff -r e6a6dc0d9c22 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 10 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 11 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 12 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 13 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 14 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 8

Patch Set 15 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 16 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 17 : diff -r 3d177aef8dd3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 18 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 19 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 20 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 21 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 22 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 23 : diff -r 84cafba689b1 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 1

Patch Set 24 : diff -r 654ca7de0282 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 25 : diff -r 654ca7de0282 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 6

Patch Set 26 : diff -r d41598ff11f3 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 27 : diff -r d41598ff11f3 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -184 lines) Patch
M misc/cgo/test/callback.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/asm_amd64.s View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +8 lines, -9 lines 0 comments Download
M src/pkg/runtime/cgocall.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +28 lines, -13 lines 0 comments Download
M src/pkg/runtime/futex_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/lock_futex.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +32 lines, -8 lines 0 comments Download
M src/pkg/runtime/lock_sema.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5 chunks +49 lines, -26 lines 0 comments Download
M src/pkg/runtime/os_darwin.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +12 lines, -23 lines 0 comments Download
M src/pkg/runtime/os_freebsd.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +11 lines, -14 lines 0 comments Download
M src/pkg/runtime/os_linux.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +10 lines, -15 lines 0 comments Download
M src/pkg/runtime/os_netbsd.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -2 lines 0 comments Download
M src/pkg/runtime/os_openbsd.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -7 lines 0 comments Download
M src/pkg/runtime/os_plan9.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -4 lines 0 comments Download
M src/pkg/runtime/os_windows.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +13 lines, -16 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 6 chunks +57 lines, -25 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +25 lines, -22 lines 0 comments Download
M src/pkg/runtime/runtime.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +30 lines, -0 lines 0 comments Download
M src/pkg/runtime/stack.c View 1 19 20 21 22 23 24 25 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13
rsc
https://codereview.appspot.com/11575044/diff/2039/src/pkg/runtime/cgocall.c File src/pkg/runtime/cgocall.c (right): https://codereview.appspot.com/11575044/diff/2039/src/pkg/runtime/cgocall.c#newcode241 src/pkg/runtime/cgocall.c:241: #pragma textflag,7 s/,/ / I am surprised the comma ...
10 years, 9 months ago (2013-07-22 20:34:44 UTC) #1
dvyukov
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 9 months ago (2013-07-24 15:19:42 UTC) #2
dvyukov
On 2013/07/22 20:34:44, rsc wrote: > https://codereview.appspot.com/11575044/diff/2039/src/pkg/runtime/cgocall.c > File src/pkg/runtime/cgocall.c (right): > > https://codereview.appspot.com/11575044/diff/2039/src/pkg/runtime/cgocall.c#newcode241 > ...
10 years, 9 months ago (2013-07-24 15:21:56 UTC) #3
dvyukov
ping
10 years, 9 months ago (2013-07-26 10:17:13 UTC) #4
dvyukov
https://codereview.appspot.com/11575044/diff/59001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/11575044/diff/59001/src/pkg/runtime/os_windows.c#newcode175 src/pkg/runtime/os_windows.c:175: ns = runtime·timediv(ns, 1000000, nil); note to myself: add ...
10 years, 9 months ago (2013-07-26 10:18:06 UTC) #5
dvyukov
On 2013/07/26 10:18:06, dvyukov wrote: > https://codereview.appspot.com/11575044/diff/59001/src/pkg/runtime/os_windows.c > File src/pkg/runtime/os_windows.c (right): > > https://codereview.appspot.com/11575044/diff/59001/src/pkg/runtime/os_windows.c#newcode175 > ...
10 years, 9 months ago (2013-07-26 13:12:39 UTC) #6
rsc
LGTM https://codereview.appspot.com/11575044/diff/80001/src/pkg/runtime/futex_test.go File src/pkg/runtime/futex_test.go (right): https://codereview.appspot.com/11575044/diff/80001/src/pkg/runtime/futex_test.go#newcode5 src/pkg/runtime/futex_test.go:5: // Race detector emits calls to split stack ...
10 years, 9 months ago (2013-07-29 17:26:46 UTC) #7
dvyukov
https://codereview.appspot.com/11575044/diff/80001/src/pkg/runtime/futex_test.go File src/pkg/runtime/futex_test.go (right): https://codereview.appspot.com/11575044/diff/80001/src/pkg/runtime/futex_test.go#newcode5 src/pkg/runtime/futex_test.go:5: // Race detector emits calls to split stack functions ...
10 years, 9 months ago (2013-07-29 18:21:54 UTC) #8
dvyukov
crossing fingers and submitting
10 years, 9 months ago (2013-07-29 18:22:18 UTC) #9
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=cb7c919fe554 *** runtime: do not split stacks in syscall status Split stack ...
10 years, 9 months ago (2013-07-29 18:22:44 UTC) #10
dvyukov
On Mon, Jul 29, 2013 at 10:22 PM, <dvyukov@google.com> wrote: > *** Submitted as > ...
10 years, 9 months ago (2013-07-29 18:48:55 UTC) #11
dvyukov
This is a real one: fatal error: runtime: stack split during syscall goroutine 2 [stack ...
10 years, 9 months ago (2013-07-29 19:29:57 UTC) #12
rsc
10 years, 9 months ago (2013-07-29 19:32:56 UTC) #13
Try putting some #pragma textflag 7 in runtime/vlrt_arm.c.
Sign in to reply to this message.

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