{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16760","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16760/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16760/comments","events_url":"https://api.github.com/repos/golang/go/issues/16760/events","html_url":"https://github.com/golang/go/issues/16760","id":171646322,"number":16760,"title":"runtime: \"fatal error: unknown caller pc\" crash on darwin/arm","user":{"login":"dcu","id":73729,"avatar_url":"https://avatars.githubusercontent.com/u/73729?v=3","gravatar_id":"","url":"https://api.github.com/users/dcu","html_url":"https://github.com/dcu","followers_url":"https://api.github.com/users/dcu/followers","following_url":"https://api.github.com/users/dcu/following{/other_user}","gists_url":"https://api.github.com/users/dcu/gists{/gist_id}","starred_url":"https://api.github.com/users/dcu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcu/subscriptions","organizations_url":"https://api.github.com/users/dcu/orgs","repos_url":"https://api.github.com/users/dcu/repos","events_url":"https://api.github.com/users/dcu/events{/privacy}","received_events_url":"https://api.github.com/users/dcu/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"assignees":[{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/38","html_url":"https://github.com/golang/go/milestones/Go1.8","labels_url":"https://api.github.com/repos/golang/go/milestones/38/labels","id":1709363,"number":38,"title":"Go1.8","description":"","creator":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"open_issues":208,"closed_issues":454,"state":"open","created_at":"2016-04-15T16:30:23Z","updated_at":"2016-10-27T22:40:15Z","due_on":"2017-01-31T00:00:00Z","closed_at":null},"comments":21,"created_at":"2016-08-17T12:34:49Z","updated_at":"2016-10-27T23:29:33Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\n```\r\n$ go version\r\ngo version go1.7 darwin/amd64\r\n```\r\nand\r\n\r\n```\r\n$ gomobile version\r\ngomobile version +0ba4e64 Tue Aug 16 10:53:25 2016 +0000 (android,ios); androidSDK=/usr/local/opt/android-sdk/platforms/android-22\r\n```\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\ndarwin/arm(64)\r\n\r\n3. What did you do?\r\nI'm not sure how to reproduce this, it's more likely to happen after sending the app to background and waiting few minutes and then resume it.\r\nI don't have code to provide at the moment but I got a backtrace:\r\n\r\n```\r\nruntime: unexpected return pc for runtime.cgocallback_gofunc called from 0x0\r\nfatal error: unknown caller pc\r\nruntime stack:\r\nruntime.throw(0x5bca2e, 0x11)\r\n/opt/go/src/runtime/panic.go:566 +0x80\r\nruntime.gentraceback(0x2eaf9c, 0x503db8e8, 0x0, 0x503983c0, 0x0, 0x0, 0x7fffffff, 0x70726efc, 0x0, 0x0, ...)\r\n/opt/go/src/runtime/traceback.go:317 +0x1620\r\nruntime.scanstack(0x503983c0, 0x503bb32c)\r\n/opt/go/src/runtime/mgcmark.go:770 +0x344\r\nruntime.scang(0x503983c0, 0x503bb32c)\r\n/opt/go/src/runtime/proc.go:830 +0xb0\r\nruntime.markroot.func1()\r\n/opt/go/src/runtime/mgcmark.go:234 +0xac\r\nruntime.systemstack(0x503ba000)\r\n/opt/go/src/runtime/asm_arm.s:247 +0x8c\r\nruntime.mstart()\r\n/opt/go/src/runtime/proc.go:1081\r\ngoroutine 29 [running]:\r\nruntime.systemstack_switch()\r\n/opt/go/src/runtime/asm_arm.s:192 +0x4 fp=0x50492f24 sp=0x50492f20\r\nruntime.markroot(0x503bb32c, 0x7)\r\n/opt/go/src/runtime/mgcmark.go:239 +0x34c fp=0x50492f60 sp=0x50492f24\r\nruntime.gcDrain(0x503bb32c, 0x5)\r\n/opt/go/src/runtime/mgcmark.go:956 +0x394 fp=0x50492f90 sp=0x50492f60\r\nruntime.gcBgMarkWorker(0x503baa00)\r\n/opt/go/src/runtime/mgc.go:1453 +0x66c fp=0x50492fcc sp=0x50492f90\r\nruntime.goexit()\r\n/opt/go/src/runtime/asm_arm.s:998 +0x4 fp=0x50492fcc sp=0x50492fcc\r\ncreated by runtime.gcBgMarkStartWorkers\r\n/opt/go/src/runtime/mgc.go:1342 +0x8c\r\ngoroutine 17 [GC assist wait (scan), locked to thread]:\r\noursdk/vendor/github.com/boltdb/bolt.(*meta).sum64(0x50830580, 0x4b3141ff, 0x0)\r\noursdk/vendor/github.com/boltdb/bolt/db.go:968 +0x34\r\noursdk/vendor/github.com/boltdb/bolt.(*meta).write(0x50830580, 0x5083e000)\r\noursdk/vendor/github.com/boltdb/bolt/db.go:961 +0x340\r\noursdk/vendor/github.com/boltdb/bolt.(*Tx).writeMeta(0x507eb400, 0x0, 0x0)\r\noursdk/vendor/github.com/boltdb/bolt/tx.go:499 +0x108\r\noursdk/vendor/github.com/boltdb/bolt.(*Tx).Commit(0x507eb400, 0x0, 0x0)\r\noursdk/vendor/github.com/boltdb/bolt/tx.go:211 +0x638\r\noursdk/vendor/github.com/boltdb/bolt.(*DB).Update(0x5080afc0, 0x503dbbe0, 0x0, 0x0)\r\noursdk/vendor/github.com/boltdb/bolt/db.go:575 +0x114\r\noursdk/storage.(*BoltDB).createBucket(0x50413a40, 0x5080afc0, 0x5bb02c, 0xc, 0x0, 0x0)\r\noursdk/storage/boltdb.go:248 +0x60\r\noursdk/storage.(*BoltDB).open(0x50413a40, 0x5bb02c, 0xc, 0x1, 0x1, 0x0, 0x0)\r\noursdk/storage/boltdb.go:233 +0x28c\r\noursdk/storage.(*BoltDB).AllKeys(0x50413a40, 0x5bb02c, 0xc, 0x0, 0x0, 0x0, 0x0)\r\noursdk/storage/boltdb.go:174 +0x64\r\noursdk/coresdk.GetTokensIdsStr(0x0, 0x0)\r\noursdk/token.go:174 +0x58\r\noursdk/coresdk.getTokenIds(0x0, 0x0, 0x0)\r\noursdk/token.go:183 +0x24\r\noursdk/coresdk.fetchTokens(0x50769ac0, 0x0, 0x0, 0x0)\r\noursdk/token.go:192 +0x58\r\noursdk/coresdk.(*Device).SyncTokens(0x50769ac0, 0x0, 0x0)\r\noursdk/device.go:300 +0x34\r\noursdk/coresdk.(*Device).Sync(0x50769ac0, 0x0, 0x0)\r\noursdk/device.go:197 +0x150\r\n/var/folders/y/ws09jpg90_b5y710wmd7kvj5sbl416/T/gomobile-work-594142717/src/gomobile_bind.proxycoresdk_Device_Sync(0xffffffd6, 0x0, 0x0)\r\n/var/folders/y_/ws09jpg90_b5y710wmd7kvj5sbl416/T/gomobile-work-594142717/src/gomobile_bind/go_coresdkmain.go:609 +0x5c\r\n/var/folders/y/ws09jpg90_b5y710wmd7kvj5sbl416/T/gomobile-work-594142717/src/gomobile_bind._cgoexpwrap_7047d42d6f98_proxycoresdk_Device_Sync(0xffffffd6, 0x0, 0x0)\r\n??:0 +0x68\r\ngoroutine 34 [syscall, locked to thread]:\r\nruntime.goexit()\r\n/opt/go/src/runtime/asm_arm.s:998 +0x4\r\ngoroutine 23 [IO wait]:\r\nnet.runtime_pollWait(0x480ff78, 0x72, 0x50485000)\r\n/opt/go/src/runtime/netpoll.go:160 +0x60\r\nnet.(*pollDesc).wait(0x503fe3b8, 0x72, 0x0, 0x0)\r\n/opt/go/src/net/fd_poll_runtime.go:73 +0x34\r\nnet.(*pollDesc).waitRead(0x503fe3b8, 0x0, 0x0)\r\n/opt/go/src/net/fd_poll_runtime.go:78 +0x30\r\nnet.(*netFD).Read(0x503fe380, 0x50485000, 0x1000, 0x1000, 0x0, 0x705248, 0x50416000)\r\n/opt/go/src/net/fd_unix.go:220 +0x1f8\r\nnet.(*conn).Read(0x50418d90, 0x50485000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n/opt/go/src/net/net.go:173 +0xbc\r\ncrypto/tls.(*block).readFromUntil(0x5047e7a0, 0x2c48050, 0x50418d90, 0x5, 0x0, 0x0)\r\n/opt/go/src/crypto/tls/conn.go:469 +0xc8\r\ncrypto/tls.(*Conn).readRecord(0x5048a000, 0x62da17, 0x0, 0x0)\r\n/opt/go/src/crypto/tls/conn.go:571 +0x228\r\ncrypto/tls.(*Conn).Read(0x5048a000, 0x50695000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n/opt/go/src/crypto/tls/conn.go:1072 +0x148\r\nnet/http.(*persistConn).Read(0x50488000, 0x50695000, 0x1000, 0x1000, 0x503d7da4, 0x0, 0x0)\r\n/opt/go/src/net/http/transport.go:1200 +0x1d0\r\nbufio.(*Reader).fill(0x506ca900)\r\n/opt/go/src/bufio/bufio.go:97 +0x1cc\r\nbufio.(*Reader).Peek(0x506ca900, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n/opt/go/src/bufio/bufio.go:129 +0xb4\r\nnet/http.(*persistConn).readLoop(0x50488000)\r\n/opt/go/src/net/http/transport.go:1350 +0x1d0\r\ncreated by net/http.(*Transport).dialConn\r\n/opt/go/src/net/http/transport.go:1001 +0xdd0\r\ngoroutine 24 [select]:\r\nnet/http.(*persistConn).writeLoop(0x50488000)\r\n/opt/go/src/net/http/transport.go:1578 +0x2f0\r\ncreated by net/http.(*Transport).dialConn\r\n/opt/go/src/net/http/transport.go:1002 +0xdf0\r\n```\r\n\r\n4. What did you expect to see?\r\niOS app not crashing when resuming it\r\n\r\n5. What did you see instead?\r\nThe application crashes randomly and it is hard to reproduce. It seems to be more frequent on armv7 than arm64\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/256798491","html_url":"https://github.com/golang/go/issues/16760#issuecomment-256798491","issue_url":"https://api.github.com/repos/golang/go/issues/16760","id":256798491,"user":{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T23:29:33Z","updated_at":"2016-10-27T23:29:33Z","body":"(f = stringtoslicebyte in the example above)\r\n\r\nIt seems bad to start writing args to the stack before we know if the call will happen.  Maybe we need to evaluate all args first, at least to the point where we know whether they will panic or not.\r\nOr we could declare used stack size at the point where we start writing the args.  That seems a harder change."}}
{"actor":{"display_login":"randall77"}}