{"action":"opened","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/1898","repository_url":"https://api.github.com/repos/prometheus/prometheus","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/1898/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/1898/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/1898/events","html_url":"https://github.com/prometheus/prometheus/issues/1898","id":171490500,"number":1898,"title":"Data race in go test -race","user":{"login":"tcolgate","id":76019,"avatar_url":"https://avatars.githubusercontent.com/u/76019?v=3","gravatar_id":"","url":"https://api.github.com/users/tcolgate","html_url":"https://github.com/tcolgate","followers_url":"https://api.github.com/users/tcolgate/followers","following_url":"https://api.github.com/users/tcolgate/following{/other_user}","gists_url":"https://api.github.com/users/tcolgate/gists{/gist_id}","starred_url":"https://api.github.com/users/tcolgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcolgate/subscriptions","organizations_url":"https://api.github.com/users/tcolgate/orgs","repos_url":"https://api.github.com/users/tcolgate/repos","events_url":"https://api.github.com/users/tcolgate/events{/privacy}","received_events_url":"https://api.github.com/users/tcolgate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-16T18:53:52Z","updated_at":"2016-08-16T18:53:52Z","closed_at":null,"body":"**What did you do?** \r\n\r\nRan go test -race\r\n\r\n**What did you expect to see?**\r\n\r\nclean tests\r\n\r\n**What did you see instead? Under which circumstances?**\r\n`prometheus/promql [ go test -race                                                                         paa * ]\r\nERRO[0000] parser panic: runtime error: index out of range\r\ngoroutine 15 [running]:\r\ngithub.com/prometheus/prometheus/promql.(*evaluator).recover(0x0, 0xc42002b750)\r\n        /home/tristan/go/src/github.com/prometheus/prometheus/promql/engine.go:567 +0x115\r\npanic(0x946b40, 0xc42000c140)\r\n        /usr/local/go/src/runtime/panic.go:458 +0x271\r\ngithub.com/prometheus/prometheus/promql.TestRecoverEvaluatorRuntime(0xc420190540)\r\n        /home/tristan/go/src/github.com/prometheus/prometheus/promql/engine_test.go:200 +0x71\r\ntesting.tRunner(0xc420190540, 0xa21358)\r\n        /usr/local/go/src/testing/testing.go:610 +0xca\r\ncreated by testing.(*T).Run\r\n        /usr/local/go/src/testing/testing.go:646 +0x530\r\n  source=engine.go:569\r\n==================\r\nWARNING: DATA RACE\r\nRead at 0x00c420181670 by goroutine 48:\r\n  github.com/prometheus/prometheus/promql.(*lexer).scanNumber()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex.go:809 +0x48\r\n  github.com/prometheus/prometheus/promql.lexNumberOrDuration()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex.go:788 +0x53\r\n  github.com/prometheus/prometheus/promql.(*lexer).run()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex.go:442 +0x9a\r\n\r\nPrevious write at 0x00c420181670 by goroutine 42:\r\n  github.com/prometheus/prometheus/promql.TestLexer()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex_test.go:442 +0x153\r\n  testing.tRunner()\r\n      /usr/local/go/src/testing/testing.go:610 +0xc9\r\n\r\nGoroutine 48 (running) created at:\r\n  github.com/prometheus/prometheus/promql.lex()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex.go:435 +0x120\r\n  github.com/prometheus/prometheus/promql.TestLexer()\r\n      /home/tristan/go/src/github.com/prometheus/prometheus/promql/lex_test.go:441 +0x139\r\n  testing.tRunner()\r\n      /usr/local/go/src/testing/testing.go:610 +0xc9\r\n\r\nGoroutine 42 (running) created at:\r\n  testing.(*T).Run()\r\n      /usr/local/go/src/testing/testing.go:646 +0x52f\r\n  testing.RunTests.func1()\r\n      /usr/local/go/src/testing/testing.go:793 +0xb9\r\n  testing.tRunner()\r\n      /usr/local/go/src/testing/testing.go:610 +0xc9\r\n  testing.RunTests()\r\n      /usr/local/go/src/testing/testing.go:799 +0x4b5\r\n  testing.(*M).Run()\r\n      /usr/local/go/src/testing/testing.go:743 +0x12f\r\n  main.main()\r\n      github.com/prometheus/prometheus/promql/_test/_testmain.go:96 +0x1b4\r\n==================\r\nERRO[0000] parser panic: runtime error: index out of range\r\ngoroutine 298 [running]:\r\ngithub.com/prometheus/prometheus/promql.(*parser).recover(0x0, 0xc42002b750)\r\n        /home/tristan/go/src/github.com/prometheus/prometheus/promql/parse.go:332 +0x115\r\npanic(0x946b40, 0xc42000c140)\r\n        /usr/local/go/src/runtime/panic.go:458 +0x271\r\ngithub.com/prometheus/prometheus/promql.TestRecoverParserRuntime(0xc4201edc80)\r\n        /home/tristan/go/src/github.com/prometheus/prometheus/promql/parse_test.go:1884 +0x71\r\ntesting.tRunner(0xc4201edc80, 0xa21370)\r\n        /usr/local/go/src/testing/testing.go:610 +0xca\r\ncreated by testing.(*T).Run\r\n        /usr/local/go/src/testing/testing.go:646 +0x530\r\n  source=parse.go:334\r\n`\r\n**Environment**\r\n\r\ngo 1.7beta1\r\n\r\n* System information:\r\n\r\nLinux 4.7.0-rc7-ARCH x86_64\r\n\r\n* Prometheus version: \r\n\r\n98c0d335676d4c55cf2bfdec6c0808c4aae82341\r\n\r\n* Prometheus configuration file:\r\n\r\nn/a (run from go test)\r\n\r\n"}}
{"actor":{"display_login":"tcolgate"}}