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

Issue 4446062: code review 4446062: runtime: more graceful out-of-memory crash (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by rsc
Modified:
14 years ago
Reviewers:
fiber
CC:
r, dave_cheney.net, golang-dev
Visibility:
Public.

Description

runtime: more graceful out-of-memory crash Used to fault trying to access l->list->next when l->list == nil after MCentral_AllocList. Now prints runtime: out of memory: no room in arena for 65536-byte allocation (536870912 in use) throw: out of memory followed by stack trace. Fixes issue 1650.

Patch Set 1 #

Patch Set 2 : diff -r d6903b7fbff4 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r d6903b7fbff4 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r bc3d62d4973e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M src/pkg/runtime/mcache.c View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 8
rsc
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years ago (2011-04-26 04:50:38 UTC) #1
dave_cheney.net
Thanks. I was using this as a stop gap. diff -r a77eea2b52bd src/pkg/runtime/mcentral.c --- a/src/pkg/runtime/mcentral.c ...
14 years ago (2011-04-26 05:10:40 UTC) #2
r
LGTM
14 years ago (2011-04-26 07:13:23 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=ebb5a2413cf7 *** runtime: more graceful out-of-memory crash Used to fault trying to ...
14 years ago (2011-04-26 12:25:48 UTC) #4
fiber
Looking back at mem.go I was wondering how that uses 500+ M in the first ...
14 years ago (2011-04-26 13:20:17 UTC) #5
rsc
On Tue, Apr 26, 2011 at 09:19, Sven Engelhardt <sven@engelhardt.to> wrote: > Looking back at ...
14 years ago (2011-04-26 13:36:53 UTC) #6
fiber
Thanks for the swift response. mem.go doesnt actually run out of memory on 64 bit ...
14 years ago (2011-04-26 17:43:08 UTC) #7
rsc
14 years ago (2011-04-26 17:46:14 UTC) #8
> Upping the limit to 2G may help for now. I'd yet argue that putting
> this kind of hard limits is not really a good choice for a systems
> programming language.

As always there are tradeoffs.  2G means having 256 MB of
tracking bitmaps the way the current allocator works.
Going all the way up to 4G means having 512 MB of tracking.
That seemed unlikely to pay off in most cases.

The real fix is to use a 64-bit machine.

Russ
Sign in to reply to this message.

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