{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13609","labels_url":"https://api.github.com/repos/golang/go/issues/13609/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13609/comments","events_url":"https://api.github.com/repos/golang/go/issues/13609/events","html_url":"https://github.com/golang/go/issues/13609","id":122013436,"number":13609,"title":"runtime: 1.5.1 compiler crashed with \"unswept span\"","user":{"login":"omerkirk","id":289690,"avatar_url":"https://avatars.githubusercontent.com/u/289690?v=3","gravatar_id":"","url":"https://api.github.com/users/omerkirk","html_url":"https://github.com/omerkirk","followers_url":"https://api.github.com/users/omerkirk/followers","following_url":"https://api.github.com/users/omerkirk/following{/other_user}","gists_url":"https://api.github.com/users/omerkirk/gists{/gist_id}","starred_url":"https://api.github.com/users/omerkirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omerkirk/subscriptions","organizations_url":"https://api.github.com/users/omerkirk/orgs","repos_url":"https://api.github.com/users/omerkirk/repos","events_url":"https://api.github.com/users/omerkirk/events{/privacy}","received_events_url":"https://api.github.com/users/omerkirk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-14T10:20:30Z","updated_at":"2015-12-14T16:28:50Z","closed_at":null,"body":"\r\nI deployed the same code to two of our servers. These two servers have the same OS (Centos 6.7) and the same kernel (2.6.32-573.8.1.el6.x86_64). However they have different configurations like RAM and CPU. \r\n\r\nThe code I deployed was working on these servers, however we found a bug and introduced a small fix. One of our servers built the code without issues however on our other server ```go build``` panics and produces the following output. I had to reboot the server to be able to build the source. \r\n\r\nIt looks like the garbage collector didn't shutdown properly with the app. The app crashed and that is why we had to introduce a fix, however I expect go to cleanup after a crash. \r\n\r\nWe use go version 1.5.1 and here is my ```go env``` output\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/kokteyl/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/linux_amd64\"\r\nGO15VENDOREXPERIMENT=\"\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\n```\r\nPlease let me know if there is any other info you need to understand the issue.\r\n\r\nPanic Stacktrace for go build:\r\n```\r\nsweep 136 8\r\nfatal error: gc: unswept span\r\n\r\nruntime stack:\r\nruntime.throw(0x8408c0, 0x10)\r\n        /usr/local/go/src/runtime/panic.go:527 +0x90 fp=0xc82003dce0 sp=0xc82003dcc8\r\nruntime.markroot(0xc82001c000, 0x3)\r\n        /usr/local/go/src/runtime/mgcmark.go:88 +0x375 fp=0xc82003dd80 sp=0xc82003dce0\r\nruntime.parfordo(0xc82001c000)\r\n        /usr/local/go/src/runtime/parfor.go:110 +0x1d4 fp=0xc82003de08 sp=0xc82003dd80\r\nruntime.gchelper()\r\n        /usr/local/go/src/runtime/mgc.go:1701 +0x56 fp=0xc82003de50 sp=0xc82003de08\r\nruntime.stopm()\r\n        /usr/local/go/src/runtime/proc1.go:1131 +0x146 fp=0xc82003de78 sp=0xc82003de50\r\nruntime.gcstopm()\r\n        /usr/local/go/src/runtime/proc1.go:1321 +0xf8 fp=0xc82003dea8 sp=0xc82003de78\r\nruntime.findrunnable(0xc82001e000, 0x0)\r\n        /usr/local/go/src/runtime/proc1.go:1382 +0x35 fp=0xc82003df28 sp=0xc82003dea8\r\nruntime.schedule()\r\n        /usr/local/go/src/runtime/proc1.go:1639 +0x267 fp=0xc82003df60 sp=0xc82003df28\r\nruntime.park_m(0xc820001200)\r\n        /usr/local/go/src/runtime/proc1.go:1698 +0x18b fp=0xc82003df88 sp=0xc82003df60\r\nruntime.mcall(0x0)\r\n        /usr/local/go/src/runtime/asm_amd64.s:204 +0x5b fp=0xc82003df98 sp=0xc82003df88\r\n\r\ngoroutine 1 [runnable]:\r\ncmd/compile/internal/amd64.copyau(0xc8215e3da8, 0xc8215e3b68, 0xc8215e3b01)\r\n        /usr/local/go/src/cmd/compile/internal/amd64/peep.go:914 fp=0xc8217670a8 sp=0xc8217670a0\r\ncmd/compile/internal/amd64.copyu(0xc8215e3d40, 0xc8215e3b68, 0x0, 0x1)\r\n        /usr/local/go/src/cmd/compile/internal/amd64/peep.go:806 +0x116 fp=0xc8217670d8 sp=0xc8217670a8\r\ncmd/compile/internal/amd64.copy1(0xc8215e3b10, 0xc8215e3b68, 0xc821746028, 0x0, 0x1)\r\n        /usr/local/go/src/cmd/compile/internal/amd64/peep.go:690 +0x54f fp=0xc821767260 sp=0xc8217670d8\r\ncmd/compile/internal/amd64.copyprop(0xc8216a2030, 0xc821745f20, 0xc8216a2001)\r\n        /usr/local/go/src/cmd/compile/internal/amd64/peep.go:661 +0x179 fp=0xc8217672f0 sp=0xc821767260\r\ncmd/compile/internal/amd64.peep(0xc821528d80)\r\n        /usr/local/go/src/cmd/compile/internal/amd64/peep.go:143 +0x717 fp=0xc821767350 sp=0xc8217672f0\r\ncmd/compile/internal/gc.regopt(0xc821528d80)\r\n        /usr/local/go/src/cmd/compile/internal/gc/reg.go:1412 +0x2da1 fp=0xc821767808 sp=0xc821767350\r\ncmd/compile/internal/gc.compile(0xc821254ab0)\r\n        /usr/local/go/src/cmd/compile/internal/gc/pgen.go:508 +0xe82 fp=0xc821767a78 sp=0xc821767808\r\ncmd/compile/internal/gc.funccompile(0xc821254ab0)\r\n        /usr/local/go/src/cmd/compile/internal/gc/dcl.go:1484 +0x1c9 fp=0xc821767af0 sp=0xc821767a78\r\ncmd/compile/internal/gc.Main()\r\n        /usr/local/go/src/cmd/compile/internal/gc/lex.go:473 +0x1f08 fp=0xc821767df0 sp=0xc821767af0\r\ncmd/compile/internal/amd64.Main()\r\n        /usr/local/go/src/cmd/compile/internal/amd64/galign.go:127 +0x58d fp=0xc821767e58 sp=0xc821767df0\r\nmain.main()\r\n        /usr/local/go/src/cmd/compile/main.go:26 +0x189 fp=0xc821767f30 sp=0xc821767e58\r\nruntime.main()\r\n        /usr/local/go/src/runtime/proc.go:111 +0x2b0 fp=0xc821767f80 sp=0xc821767f30\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc821767f88 sp=0xc821767f80\r\n\r\ngoroutine 2 [force gc (idle)]:\r\nruntime.gopark(0x89b7a8, 0xc7f6b0, 0x81e0d0, 0xf, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002a758 sp=0xc82002a730\r\nruntime.goparkunlock(0xc7f6b0, 0x81e0d0, 0xf, 0xc820000114, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:191 +0x54 fp=0xc82002a790 sp=0xc82002a758\r\nruntime.forcegchelper()\r\n        /usr/local/go/src/runtime/proc.go:152 +0xb8 fp=0xc82002a7c0 sp=0xc82002a790\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002a7c8 sp=0xc82002a7c0\r\ncreated by runtime.init.4\r\n        /usr/local/go/src/runtime/proc.go:141 +0x2b\r\n\r\ngoroutine 3 [GC sweep wait]:\r\nruntime.gopark(0x89b7a8, 0xc7f880, 0x819ab0, 0xd, 0x44af14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002af48 sp=0xc82002af20\r\nruntime.goparkunlock(0xc7f880, 0x819ab0, 0xd, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:191 +0x54 fp=0xc82002af80 sp=0xc82002af48\r\nruntime.bgsweep(0xc820052000)\r\n        /usr/local/go/src/runtime/mgcsweep.go:67 +0x14d fp=0xc82002afb8 sp=0xc82002af80\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002afc0 sp=0xc82002afb8\r\ncreated by runtime.gcenable\r\n        /usr/local/go/src/runtime/mgc.go:206 +0x53\r\n\r\ngoroutine 4 [finalizer wait]:\r\nruntime.gopark(0x89b7a8, 0xda6730, 0x81dcf0, 0xe, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002b718 sp=0xc82002b6f0\r\nruntime.goparkunlock(0xda6730, 0x81dcf0, 0xe, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:191 +0x54 fp=0xc82002b750 sp=0xc82002b718\r\nruntime.runfinq()\r\n        /usr/local/go/src/runtime/mfinal.go:154 +0xaa fp=0xc82002b7c0 sp=0xc82002b750\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002b7c8 sp=0xc82002b7c0\r\ncreated by runtime.createfing\r\n        /usr/local/go/src/runtime/mfinal.go:135 +0x60\r\n\r\ngoroutine 5 [garbage collection]:\r\nruntime.systemstack_switch()\r\n        /usr/local/go/src/runtime/asm_amd64.s:216 fp=0xc82002bc98 sp=0xc82002bc90\r\nruntime.gc(0x0)\r\n        /usr/local/go/src/runtime/mgc.go:1097 +0x3d0 fp=0xc82002bf90 sp=0xc82002bc98\r\nruntime.backgroundgc()\r\n        /usr/local/go/src/runtime/mgc.go:897 +0x3d fp=0xc82002bfc0 sp=0xc82002bf90\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002bfc8 sp=0xc82002bfc0\r\ncreated by runtime.startGC\r\n        /usr/local/go/src/runtime/mgc.go:870 +0x186\r\n\r\ngoroutine 6 [mark worker (idle)]:\r\nruntime.gopark(0x89b660, 0xc820030900, 0x841d80, 0x12, 0x14, 0x0)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002c750 sp=0xc82002c728\r\nruntime.gcBgMarkWorker(0xc82001e000)\r\n        /usr/local/go/src/runtime/mgc.go:1289 +0xf7 fp=0xc82002c7b8 sp=0xc82002c750\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002c7c0 sp=0xc82002c7b8\r\ncreated by runtime.gcBgMarkStartWorkers\r\n        /usr/local/go/src/runtime/mgc.go:1239 +0x93\r\n\r\ngoroutine 7 [mark worker (idle)]:\r\nruntime.gopark(0x89b660, 0xc820030480, 0x841d80, 0x12, 0x14, 0x0)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002cf50 sp=0xc82002cf28\r\nruntime.gcBgMarkWorker(0xc82001f500)\r\n        /usr/local/go/src/runtime/mgc.go:1289 +0xf7 fp=0xc82002cfb8 sp=0xc82002cf50\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002cfc0 sp=0xc82002cfb8\r\ncreated by runtime.gcBgMarkStartWorkers\r\n        /usr/local/go/src/runtime/mgc.go:1239 +0x93\r\n\r\ngoroutine 8 [mark worker (idle)]:\r\nruntime.gopark(0x89b660, 0xc8204aa000, 0x841d80, 0x12, 0x14, 0x0)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002d750 sp=0xc82002d728\r\nruntime.gcBgMarkWorker(0xc820020a00)\r\n        /usr/local/go/src/runtime/mgc.go:1289 +0xf7 fp=0xc82002d7b8 sp=0xc82002d750\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002d7c0 sp=0xc82002d7b8\r\ncreated by runtime.gcBgMarkStartWorkers\r\n        /usr/local/go/src/runtime/mgc.go:1239 +0x93\r\n\r\ngoroutine 9 [mark worker (idle)]:\r\nruntime.gopark(0x89b660, 0xc81340, 0x841d80, 0x12, 0x14, 0x0)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82002df50 sp=0xc82002df28\r\nruntime.gcBgMarkWorker(0xc820022000)\r\n        /usr/local/go/src/runtime/mgc.go:1289 +0xf7 fp=0xc82002dfb8 sp=0xc82002df50\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82002dfc0 sp=0xc82002dfb8\r\ncreated by runtime.gcBgMarkStartWorkers\r\n        /usr/local/go/src/runtime/mgc.go:1239 +0x93\r\n\r\ngoroutine 10 [timer goroutine (idle)]:\r\nruntime.gopark(0x89b7a8, 0xc7f8e0, 0x844920, 0x16, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc820026700 sp=0xc8200266d8\r\nruntime.goparkunlock(0xc7f8e0, 0x844920, 0x16, 0x14, 0x1)\r\n        /usr/local/go/src/runtime/proc.go:191 +0x54 fp=0xc820026738 sp=0xc820026700\r\nruntime.timerproc()\r\n        /usr/local/go/src/runtime/time.go:202 +0x123 fp=0xc8200267c0 sp=0xc820026738\r\nruntime.goexit()\r\n        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8200267c8 sp=0xc8200267c0\r\ncreated by runtime.addtimerLocked\r\n        /usr/local/go/src/runtime/time.go:116 +0x11f\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/164485490","html_url":"https://github.com/golang/go/issues/13609#issuecomment-164485490","issue_url":"https://api.github.com/repos/golang/go/issues/13609","id":164485490,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T16:28:50Z","updated_at":"2015-12-14T16:28:50Z","body":"The compiler crash reported here is not connected to whatever cgo problems you have been having.\r\n\r\nHave you seen this compiler crash more than once?"}}