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

runtime: unexpected fault address 0x0 in hashmap.go #13062

Closed
beyang opened this issue Oct 27, 2015 · 14 comments
Closed

runtime: unexpected fault address 0x0 in hashmap.go #13062

beyang opened this issue Oct 27, 2015 · 14 comments

Comments

@beyang
Copy link

beyang commented Oct 27, 2015

This involves a bus error that occurs when assigning to a local map with no concurrency involved. This happens within the context of a program that constructs a large in-memory index and consumes a lot of memory (~60GB) in the process.

Here's additional info about the environment:

  • Go 1.5.1
  • Compiling on Ubuntu 14.04 x86_64
  • Running on CentOS 5.11 x86_64
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x40873b]

goroutine 97699 [running]:
runtime.throw(0x17f5cc0, 0x5)
    /home/beyang/go/src/runtime/panic.go:527 +0x90 fp=0xc8c9b63ac0 sp=0xc8c9b63aa8
runtime.sigpanic()
    /home/beyang/go/src/runtime/sigpanic_unix.go:21 +0x10c fp=0xc8c9b63b10 sp=0xc8c9b63ac0
runtime.mapassign1(0x12c6fe0, 0xc88283b998, 0xc8c9b63c68, 0xc8c9b63cd8)
    /home/beyang/go/src/runtime/hashmap.go:446 +0x1fb fp=0xc8c9b63bb8 sp=0xc8c9b63b10
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb925110, 0x27, 0x189e, 0xc8839696c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:150 +0x233 fp=0xc8c9b63d30 sp=0xc8c9b63bb8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb9250e0, 0x26, 0x189e, 0xc8839695e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b63ea8 sp=0xc8c9b63d30
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb9250b0, 0x25, 0x189e, 0xc8839695c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64020 sp=0xc8c9b63ea8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb925080, 0x24, 0x189e, 0xc8839695a0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64198 sp=0xc8c9b64020
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb925050, 0x23, 0x189e, 0xc8531460c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64310 sp=0xc8c9b64198
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb925020, 0x22, 0x189e, 0xc886397c00)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64488 sp=0xc8c9b64310
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb924ff0, 0x21, 0x189e, 0xc886397ac0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64600 sp=0xc8c9b64488
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a480, 0x20, 0x189e, 0xc8863978e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64778 sp=0xc8c9b64600
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a440, 0x1f, 0x189e, 0xc886397840)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b648f0 sp=0xc8c9b64778
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a400, 0x1e, 0x189e, 0xc8863976e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64a68 sp=0xc8c9b648f0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a3c0, 0x1d, 0x189e, 0xc886397580)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64be0 sp=0xc8c9b64a68
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a380, 0x1c, 0x189e, 0xc886397560)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64d58 sp=0xc8c9b64be0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a340, 0x1b, 0x189e, 0xc886397540)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64ed0 sp=0xc8c9b64d58
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a300, 0x1a, 0x189e, 0xc886397520)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65048 sp=0xc8c9b64ed0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a2c0, 0x19, 0x189e, 0xc886397500)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b651c0 sp=0xc8c9b65048
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a280, 0x18, 0x189e, 0xc8863974e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65338 sp=0xc8c9b651c0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a240, 0x17, 0x189e, 0xc8863974c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b654b0 sp=0xc8c9b65338
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a200, 0x16, 0x189e, 0xc8863974a0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65628 sp=0xc8c9b654b0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a1c0, 0x15, 0x189e, 0xc886397480)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b657a0 sp=0xc8c9b65628
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a180, 0x14, 0x189e, 0xc886397460)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65918 sp=0xc8c9b657a0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a140, 0x13, 0x189e, 0xc886397440)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65a90 sp=0xc8c9b65918
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a100, 0x12, 0x189e, 0xc886397420)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65c08 sp=0xc8c9b65a90
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc88283a0c0, 0x11, 0x189e, 0xc886397400)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65d80 sp=0xc8c9b65c08
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929180, 0x10, 0x189e, 0xc8863973e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b65ef8 sp=0xc8c9b65d80
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929160, 0xf, 0x189e, 0xc8863973c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66070 sp=0xc8c9b65ef8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929140, 0xe, 0x189e, 0xc8863973a0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b661e8 sp=0xc8c9b66070
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929120, 0xd, 0x189e, 0xc886397380)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66360 sp=0xc8c9b661e8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929100, 0xc, 0x189e, 0xc886397360)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b664d8 sp=0xc8c9b66360
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb9290e0, 0xb, 0x189e, 0xc886397340)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66650 sp=0xc8c9b664d8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb9290c0, 0xa, 0x189e, 0xc886397320)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b667c8 sp=0xc8c9b66650
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb9290a0, 0x9, 0x189e, 0xc886397300)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66940 sp=0xc8c9b667c8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929080, 0x8, 0x189e, 0xc8863972e0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66ab8 sp=0xc8c9b66940
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929060, 0x7, 0x189e, 0xc8863972c0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66c30 sp=0xc8c9b66ab8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb929050, 0x6, 0x189e, 0xc8863972a0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66da8 sp=0xc8c9b66c30
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb93cd50, 0x5, 0x189e, 0xc887ae5aa0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b66f20 sp=0xc8c9b66da8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb93cd30, 0x4, 0x189e, 0xc887ae5a80)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b67098 sp=0xc8c9b66f20
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb93cd10, 0x3, 0x189e, 0xc887ae5a60)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b67210 sp=0xc8c9b67098
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb93ccf0, 0x2, 0x189e, 0xc887ae5a40)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b67388 sp=0xc8c9b67210
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8cb93cc30, 0x1, 0x189e, 0xc887ae59a0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b67500 sp=0xc8c9b67388
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0x0, 0x0, 0xc88283189e, 0xc887a13320)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b67678 sp=0xc8c9b67500
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build(0xc82f88d440, 0xc844e08e40, 0x0, 0x0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:163 +0x17b4 fp=0xc8c9b67d58 sp=0xc8c9b67678
sourcegraph.com/sourcegraph/srclib/store.(*indexedTreeStore).buildIndexes.func4(0x0, 0x0)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/indexed.go:478 +0x48e fp=0xc8c9b67f20 sp=0xc8c9b67d58
code.google.com/p/rog-go/parallel.(*Run).Do.func1(0xc82f88d500, 0xc83bd1a690)
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:67 +0x48 fp=0xc8c9b67f60 sp=0xc8c9b67f20
runtime.goexit()
    /home/beyang/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8c9b67f68 sp=0xc8c9b67f60
created by code.google.com/p/rog-go/parallel.(*Run).Do
    /home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:70 +0x8f

Unfortunately, I have not been able to find a consistent repro for this. It happens about 25% of the time when running the program over a large dataset.

The hashmap assignment involves a local variable with no concurrency: https://sourcegraph.com/github.com/sourcegraph/srclib@2b53944d3fb5c9882f66bff716f396a0542eeec7/.tree/store/def_query_tree_index.go#startline=150&endline=150.

Issues #11286 and #12415 might be related, but don't appear to have the same underlying cause.

This issue does not seem to occur when GOGC=off.

Any ideas about what might be the cause here, or if there are known fixes or workarounds? I'm still trying to construct a reliable repro, but any advice/insight would be appreciated!

@davecheney
Copy link
Contributor

Anything in syslog or dmesg ?

Can you please run with GODEBUG=gctrace=1 and add this output with a crash report.

On 27 Oct 2015, at 16:33, Beyang Liu notifications@github.com wrote:

This involves a bus error that occurs in assignment to a local map with no concurrency involved. This happens within the context of a program that constructs a large in-memory index and consumes a lot of memory (~60GB) in the process.

Here's additional info about the environment:

Go 1.5.1
Compiling on Ubuntu 14.04 x86_64
Running on CentOS 5.11 x86_64
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x40873b]

goroutine 97699 [running]:
runtime.throw(0x17f5cc0, 0x5)
/home/beyang/go/src/runtime/panic.go:527 +0x90 fp=0xc8c9b63ac0 sp=0xc8c9b63aa8
runtime.sigpanic()
/home/beyang/go/src/runtime/sigpanic_unix.go:21 +0x10c fp=0xc8c9b63b10 sp=0xc8c9b63ac0
runtime.mapassign1(0x12c6fe0, 0xc88283b998, 0xc8c9b63c68, 0xc8c9b63cd8)
/home/beyang/go/src/runtime/hashmap.go:446 +0x1fb fp=0xc8c9b63bb8 sp=0xc8c9b63b10
sourcegraph.com/sourcegraph/srclib/store.(_defQueryTreeIndex).Build.func2(0xc8cb925110, 0x27, 0x189e, 0xc8839696c0)
/home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:150 +0x233 fp=0xc8c9b63d30 sp=0xc8c9b63bb8
sourcegraph.com/sourcegraph/srclib/store.(_defQueryTreeIndex).Build.func2(0xc8cb9250e0, 0x26, 0x189e, 0xc8839695e0)
/home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b63ea8 sp=0xc8c9b63d30
sourcegraph.com/sourcegraph/srclib/store.(_defQueryTreeIndex).Build.func2(0xc8cb9250b0, 0x25, 0x189e, 0xc8839695c0)
/home/beyang/src/src.sourcegraph.com/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8c9b64020 sp=0xc8c9b63ea8
sourcegraph.com/sourcegraph/srclib/store.(_defQueryTreeIndex).Build.func2(0xc8cb925080, 0x24, 0x189e, 0xc8839695a0)
...

Unfortunately, I have not been able to find a consistent repro for this. It happens about 25% of the time when running the program over a large dataset.

The hashmap assignment involves a local variable with no concurrency: https://sourcegraph.com/github.com/sourcegraph/srclib@2b53944d3fb5c9882f66bff716f396a0542eeec7/.tree/store/def_query_tree_index.go#startline=150&endline=150.

Issues #11286 and #12415 might be related, but don't appear to have the same underlying cause.

This issue does not seem to occur when GOGC=off.

Any ideas about what might be the cause here, or if there are known fixes or workarounds? I'm still trying to construct a reliable repro, but any advice/insight would be appreciated!


Reply to this email directly or view it on GitHub.

@minux
Copy link
Member

minux commented Oct 27, 2015 via email

@davecheney
Copy link
Contributor

Beyang, what are the specs of that .machine you're running this job on?

On Tue, 27 Oct 2015, 17:09 Minux Ma notifications@github.com wrote:

why does nil pointer access trigger a SIGBUS instead of SIGSEGV?


Reply to this email directly or view it on GitHub
#13062 (comment).

@davecheney
Copy link
Contributor

Also, I'm very sorry to tell you that centos 5 is not a supported platform
for Go.

On Tue, 27 Oct 2015, 17:14 Dave Cheney dave@cheney.net wrote:

Beyang, what are the specs of that .machine you're running this job on?

On Tue, 27 Oct 2015, 17:09 Minux Ma notifications@github.com wrote:

why does nil pointer access trigger a SIGBUS instead of SIGSEGV?


Reply to this email directly or view it on GitHub
#13062 (comment).

@beyang
Copy link
Author

beyang commented Oct 27, 2015

Thanks for the quick response here. I'll try to repro the issue on another Linux distro. I stepped out of the office and can't access the machine right now, but will do so in the morning.

@beyang
Copy link
Author

beyang commented Oct 27, 2015

We were able to reproduce this on Mac OS X (compiling on Mac, running on Mac):

goroutine 36141 [running]:
runtime.mapassign1(0xef91a0, 0xc86bc37998, 0xc87af8e248, 0xc87af8e2b8)
    /usr/local/go/src/runtime/hashmap.go:446 +0x1fb fp=0xc87af8e198 sp=0xc87af8e0f0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc341e0, 0x23, 0x10, 0xc8801effc0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:150 +0x233 fp=0xc87af8e310 sp=0xc87af8e198
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc341b0, 0x22, 0x10, 0xc87b46caa0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8e488 sp=0xc87af8e310
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc34180, 0x21, 0x10, 0xc87b46ca80)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8e600 sp=0xc87af8e488
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36240, 0x20, 0x10, 0xc87a605220)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8e778 sp=0xc87af8e600
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36200, 0x1f, 0x10, 0xc87a605200)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8e8f0 sp=0xc87af8e778
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc361c0, 0x1e, 0x10, 0xc87a6051e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8ea68 sp=0xc87af8e8f0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36180, 0x1d, 0x10, 0xc87a6051c0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8ebe0 sp=0xc87af8ea68
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36140, 0x1c, 0x10, 0xc87a6051a0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8ed58 sp=0xc87af8ebe0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36100, 0x1b, 0x10, 0xc87a605180)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8eed0 sp=0xc87af8ed58
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc360c0, 0x1a, 0x10, 0xc87a605160)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f048 sp=0xc87af8eed0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36080, 0x19, 0x10, 0xc87a605140)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f1c0 sp=0xc87af8f048
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36040, 0x18, 0x10, 0xc87a605120)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f338 sp=0xc87af8f1c0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc36000, 0x17, 0x10, 0xc87a605100)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f4b0 sp=0xc87af8f338
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc33fc0, 0x16, 0x10, 0xc87a6050e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f628 sp=0xc87af8f4b0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc331a0, 0x15, 0x10, 0xc87a604c20)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f7a0 sp=0xc87af8f628
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc33160, 0x14, 0x10, 0xc87a604c00)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8f918 sp=0xc87af8f7a0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc33120, 0x13, 0x10, 0xc87a604be0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8fa90 sp=0xc87af8f918
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc330e0, 0x12, 0x10, 0xc87a604bc0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8fc08 sp=0xc87af8fa90
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc86bc32bc0, 0x11, 0x10, 0xc87a604a00)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8fd80 sp=0xc87af8fc08
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87865bdd0, 0x10, 0x10, 0xc87a6049e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af8fef8 sp=0xc87af8fd80
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87865bdb0, 0xf, 0x10, 0xc87a6049c0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90070 sp=0xc87af8fef8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87865bd80, 0xe, 0x10, 0xc87a6049a0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af901e8 sp=0xc87af90070
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87865bd60, 0xd, 0x10, 0xc87a604980)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90360 sp=0xc87af901e8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87865bd40, 0xc, 0x10, 0xc87a604960)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af904d8 sp=0xc87af90360
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878662800, 0xb, 0x10, 0xc87a947260)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90650 sp=0xc87af904d8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8786627e0, 0xa, 0x10, 0xc87a947240)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af907c8 sp=0xc87af90650
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8786627c0, 0x9, 0x10, 0xc87a947220)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90940 sp=0xc87af907c8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8786627a0, 0x8, 0x10, 0xc87a947200)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90ab8 sp=0xc87af90940
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878662780, 0x7, 0x10, 0xc87a9471e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90c30 sp=0xc87af90ab8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878662440, 0x6, 0x10, 0xc87a9471c0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90da8 sp=0xc87af90c30
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878662420, 0x5, 0x10, 0xc87a947180)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af90f20 sp=0xc87af90da8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878662400, 0x4, 0x10, 0xc87a947160)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af91098 sp=0xc87af90f20
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8786623e0, 0x3, 0x10, 0xc87a947140)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af91210 sp=0xc87af91098
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc87866da80, 0x2, 0x10, 0xc87a946a80)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af91388 sp=0xc87af91210
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc878677d50, 0x1, 0x10, 0xc87aabcfe0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af91500 sp=0xc87af91388
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0x0, 0x0, 0xc86bc30010, 0xc8801efee0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc87af91678 sp=0xc87af91500
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build(0xc869db6810, 0xc87fbc8c60, 0x0, 0x0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:163 +0x17b4 fp=0xc87af91d58 sp=0xc87af91678
sourcegraph.com/sourcegraph/srclib/store.(*indexedTreeStore).buildIndexes.func4(0x0, 0x0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/indexed.go:478 +0x48e fp=0xc87af91f20 sp=0xc87af91d58
code.google.com/p/rog-go/parallel.(*Run).Do.func1(0xc869db68a0, 0xc872324be0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:67 +0x48 fp=0xc87af91f60 sp=0xc87af91f20
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc87af91f68 sp=0xc87af91f60
created by code.google.com/p/rog-go/parallel.(*Run).Do
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:70 +0x8f

And another error, panicked at a different place in hashmap.go but potentially related:

unexpected fault address 0xb01dfacedebac1e
fatal error: fault
[signal 0xb code=0x1 addr=0xb01dfacedebac1e pc=0xaf55]

goroutine 23177 [running]:
runtime.throw(0x1443350, 0x5)
    /usr/local/go/src/runtime/panic.go:527 +0x90 fp=0xc8a5d262b0 sp=0xc8a5d26298
runtime.sigpanic()
    /usr/local/go/src/runtime/sigpanic_unix.go:27 +0x2ba fp=0xc8a5d26300 sp=0xc8a5d262b0
runtime.evacuate(0xef91a0, 0xc8a5c93998, 0x6d138b056334ab)
    /usr/local/go/src/runtime/hashmap.go:803 +0x95 fp=0xc8a5d263c0 sp=0xc8a5d26300
runtime.growWork(0xef91a0, 0xc8a5c93998, 0x6d138b056334ab)
    /usr/local/go/src/runtime/hashmap.go:791 +0x57 fp=0xc8a5d263e0 sp=0xc8a5d263c0
runtime.mapassign1(0xef91a0, 0xc8a5c93998, 0xc8a5d26538, 0xc8a5d265a8)
    /usr/local/go/src/runtime/hashmap.go:433 +0x176 fp=0xc8a5d26488 sp=0xc8a5d263e0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d2ca80, 0x21, 0x10, 0xc89ff74fa0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:150 +0x233 fp=0xc8a5d26600 sp=0xc8a5d26488
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91540, 0x20, 0x10, 0xc8a0c82640)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d26778 sp=0xc8a5d26600
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91500, 0x1f, 0x10, 0xc8a0eaaf00)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d268f0 sp=0xc8a5d26778
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c914c0, 0x1e, 0x10, 0xc8a0f13b80)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d26a68 sp=0xc8a5d268f0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91480, 0x1d, 0x10, 0xc8a0f13b60)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d26be0 sp=0xc8a5d26a68
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91440, 0x1c, 0x10, 0xc8a0f13b40)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d26d58 sp=0xc8a5d26be0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91400, 0x1b, 0x10, 0xc8a0f13b20)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d26ed0 sp=0xc8a5d26d58
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c913c0, 0x1a, 0x10, 0xc8a0f13b00)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27048 sp=0xc8a5d26ed0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91380, 0x19, 0x10, 0xc8a0f13ae0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d271c0 sp=0xc8a5d27048
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91340, 0x18, 0x10, 0xc8a0f13ac0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27338 sp=0xc8a5d271c0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91300, 0x17, 0x10, 0xc8a0f13aa0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d274b0 sp=0xc8a5d27338
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c912c0, 0x16, 0x10, 0xc8a0f13a80)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27628 sp=0xc8a5d274b0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91280, 0x15, 0x10, 0xc8a0f13a60)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d277a0 sp=0xc8a5d27628
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91240, 0x14, 0x10, 0xc8a0f13a40)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27918 sp=0xc8a5d277a0
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91200, 0x13, 0x10, 0xc8a0f13a20)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27a90 sp=0xc8a5d27918
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c911c0, 0x12, 0x10, 0xc8a0f13a00)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27c08 sp=0xc8a5d27a90
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5c91180, 0x11, 0x10, 0xc8a0f139e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27d80 sp=0xc8a5d27c08
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d15fe0, 0x10, 0x10, 0xc8a0f139c0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d27ef8 sp=0xc8a5d27d80
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d15fc0, 0xf, 0x10, 0xc8a0f139a0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28070 sp=0xc8a5d27ef8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d15fa0, 0xe, 0x10, 0xc8a0f13980)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d281e8 sp=0xc8a5d28070
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d15f80, 0xd, 0x10, 0xc8a0f13960)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28360 sp=0xc8a5d281e8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d15f60, 0xc, 0x10, 0xc8a0f13940)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d284d8 sp=0xc8a5d28360
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0d2e0, 0xb, 0x10, 0xc8a0eaa240)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28650 sp=0xc8a5d284d8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0d2c0, 0xa, 0x10, 0xc8a0eaa220)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d287c8 sp=0xc8a5d28650
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0d2a0, 0x9, 0x10, 0xc8a0eaa200)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28940 sp=0xc8a5d287c8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0d280, 0x8, 0x10, 0xc8a0eaa1e0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28ab8 sp=0xc8a5d28940
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0d260, 0x7, 0x10, 0xc8a0eaa1c0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28c30 sp=0xc8a5d28ab8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0cf40, 0x6, 0x10, 0xc8a0eaa1a0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28da8 sp=0xc8a5d28c30
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0cf20, 0x5, 0x10, 0xc8a0eaa160)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d28f20 sp=0xc8a5d28da8
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0cf00, 0x4, 0x10, 0xc8a0eaa140)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d29098 sp=0xc8a5d28f20
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0cee0, 0x3, 0x10, 0xc8a0eaa120)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d29210 sp=0xc8a5d29098
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5d0c590, 0x2, 0x10, 0xc8a0d33a60)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d29388 sp=0xc8a5d29210
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0xc8a5cf8900, 0x1, 0x10, 0xc8a0cd7fc0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d29500 sp=0xc8a5d29388
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build.func2(0x0, 0x0, 0xc8a5c90010, 0xc89ff74ec0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:154 +0x3d0 fp=0xc8a5d29678 sp=0xc8a5d29500
sourcegraph.com/sourcegraph/srclib/store.(*defQueryTreeIndex).Build(0xc89f50c300, 0xc89f50d200, 0x0, 0x0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/def_query_tree_index.go:163 +0x17b4 fp=0xc8a5d29d58 sp=0xc8a5d29678
sourcegraph.com/sourcegraph/srclib/store.(*indexedTreeStore).buildIndexes.func4(0x0, 0x0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/store/indexed.go:478 +0x48e fp=0xc8a5d29f20 sp=0xc8a5d29d58
code.google.com/p/rog-go/parallel.(*Run).Do.func1(0xc89f50c390, 0xc89f0d5f40)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:67 +0x48 fp=0xc8a5d29f60 sp=0xc8a5d29f20
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8a5d29f68 sp=0xc8a5d29f60
created by code.google.com/p/rog-go/parallel.(*Run).Do
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:70 +0x8f

This was running a srclib import on the elasticsearch library. I'm still working on creating a more minimal repro (the steps to process elasticsearch and import it are a bit involved, but I can post here if people think it'd be helpful).

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Oct 27, 2015
@davecheney
Copy link
Contributor

Please test this under the race detector, it is very common to see hashmap corruption due to data races.

@neelance
Copy link
Member

@davecheney Is hashmap corruption also possible for GOMAXPROCS=1?

@bradfitz
Copy link
Contributor

@neelance, data races can corrupt memory even with GOMAXPROCS=1. If you have any data race in your program, anywhere, Go makes zero promises about anything.

@neelance
Copy link
Member

@bradfitz Thanks, that's what I thought.

@rsc
Copy link
Contributor

rsc commented Nov 5, 2015

Please post the steps to reproduce this. Thanks.

@rsc
Copy link
Contributor

rsc commented Dec 5, 2015

Without a way to reproduce this, we can't do much.

@rsc rsc modified the milestones: Unplanned, Go1.6 Dec 5, 2015
@bradfitz
Copy link
Contributor

bradfitz commented Dec 7, 2015

This involves a bus error that occurs when assigning to a local map with no concurrency involved.

You say there's no concurrency involved, but then you post a stacktrace with this:

code.google.com/p/rog-go/parallel.(*Run).Do.func1(0xc869db68a0, 0xc872324be0)
    /Users/renfred/code/sourcegraph/Godeps/_workspace/src/code.google.com/p/rog-go/parallel/parallel.go:67 +0x48 fp=0xc87af91f60 sp=0xc87af91f20

So, that's not really true.

You're definitely doing concurrency.

I suspect this is a data race and will close until we hear otherwise, especially given the lack of updates on this issue.

@bradfitz bradfitz closed this as completed Dec 7, 2015
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/17501 mentions this issue.

mk0x9 pushed a commit to mk0x9/go that referenced this issue Dec 7, 2015
If reports like golang#13062 are really concurrent misuse of maps,
we can detect that, at least some of the time, with a cheap check.

There is an extra pair of memory writes for writing to a map,
but to the same cache line as h.count, which is often being modified anyway,
and there is an extra memory read for reading from a map,
but to the same cache line as h.count, which is always being read anyway.
So the check should be basically invisible and may help reduce the
number of "mysterious runtime crash due to map misuse" reports.

Change-Id: I0e71b0d92eaa3b7bef48bf41b0f5ab790092487e
Reviewed-on: https://go-review.googlesource.com/17501
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
@golang golang locked and limited conversation to collaborators Dec 14, 2016
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

8 participants