Is this reproducible? If so, can you post a
short program that reproduces it?
Thanks.
Russ
diff -r 508513bbf607 src/pkg/runtime/linux/thread.c
--- a/src/pkg/runtime/linux/thread.c Thu Aug 18 16:07:28 2011 +1000
+++ b/src/pkg/runtime/linux/thread.c Tue Aug 23 06:25:46 2011 +0930
@@ -300,12 +300,12 @@
case SIGBUS:
if(g->sigcode0 == BUS_ADRERR && g->sigcode1 < 0x1000)
runtime·panicstring("invalid memory address or nil pointer dereference");
- runtime·printf("unexpected fault address %p\n", g->sigcode1);
+ runtime·printf("SIGBUS: unexpected fault address %p\n", g->sigcode1);
runtime·throw("fault");
case SIGSEGV:
if((g->sigcode0 == 0 || g->sigcode0 == SEGV_MAPERR || g->sigcode0 == SEGV_ACCERR) && g->sigcode1 < 0x1000)
runtime·panicstring("invalid memory address or nil pointer dereference");
- runtime·printf("unexpected fault address %p\n", g->sigcode1);
+ runtime·printf("SIGSEGV: unexpected fault address %p\n", g->sigcode1);
runtime·throw("fault");
case SIGFPE:
switch(g->sigcode0) {
diff -r 508513bbf607 src/pkg/runtime/malloc.goc
--- a/src/pkg/runtime/malloc.goc Thu Aug 18 16:07:28 2011 +1000
+++ b/src/pkg/runtime/malloc.goc Tue Aug 23 06:25:46 2011 +0930
@@ -277,7 +277,7 @@
// Actually we reserve 17 GB (because the bitmap ends up being 1 GB)
// but it hardly matters: fc is not valid UTF-8 either, and we have to
// allocate 15 GB before we get that far.
- arena_size = 16LL<<30;
+ arena_size = 16LL<<31;
bitmap_size = arena_size / (sizeof(void*)*8/4);
p = runtime·SysReserve((void*)(0x00f8ULL<<32), bitmap_size + arena_size);
if(p == nil)
>From my tests, any arena_size >= 16LL<<31 causes this problem 100% of
the time. Getting a minimal reproduction may take a little while - the
function/package that causes it to be generated is moderately
complicated, but I suspect the reproduction will just be a matter of
writing many structs through gob.Encode().
Dan
package main
type d struct {
A, B, C int64
}
func main() {
a := make([]d, 1<<30)
println(a[0].A)
}
This snippet gives:
SIGSEGV: unexpected fault address 0x343f0e0
throw: fault
[signal 0xb code=0x1 addr=0x343f0e0 pc=0x406417]
panic during panic
but not the stack trace I see with my other case (maybe gob recovers and
repanics? I haven't looked at that).
Dan
On Mon, 2011-08-22 at 12:26 -0400, Russ Cox wrote:
--
Omnes mundum facimus.
Dan Kortschak <dan.ko...@adelaide.edu.au>
F9B3 3810 C4DD E214 347C B8DA D879 B7A7 EECC 5A40
What environment are you in? On my amd64 Mac I see:
runtime: out of memory: cannot allocate 25769803776-byte block (1048576 in use)
throw: out of memory
panic during panic
Other than the last line, this is a reasonable explanation of a problem.
-rob
The issue is that I am unable to use the resources available on our
system (256GB of system memory) and this impacts on our ability to use
Go as a tool for genome analysis - something that I'm pushing in our lab
because of the developer and peer review benefits of the language and
despite some of the existing limits (notably the 31 bit index size). I'm
hoping in the not too distant future to write a paper putting Go forward
as a bioinformatics programming language to fill a niche between perl
with BioPerl and C/C++ with libraries like SeqAn - i.e. for prototyping
novel analytical algorithms in a research environment.
thanks
Dan