{"action":"opened","issue":{"url":"https://api.github.com/repos/sbinet/lsst-ccs/issues/2","labels_url":"https://api.github.com/repos/sbinet/lsst-ccs/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sbinet/lsst-ccs/issues/2/comments","events_url":"https://api.github.com/repos/sbinet/lsst-ccs/issues/2/events","html_url":"https://github.com/sbinet/lsst-ccs/issues/2","id":110039443,"number":2,"title":"fwk: data race","user":{"login":"sbinet","id":1070920,"avatar_url":"https://avatars.githubusercontent.com/u/1070920?v=3","gravatar_id":"","url":"https://api.github.com/users/sbinet","html_url":"https://github.com/sbinet","followers_url":"https://api.github.com/users/sbinet/followers","following_url":"https://api.github.com/users/sbinet/following{/other_user}","gists_url":"https://api.github.com/users/sbinet/gists{/gist_id}","starred_url":"https://api.github.com/users/sbinet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbinet/subscriptions","organizations_url":"https://api.github.com/users/sbinet/orgs","repos_url":"https://api.github.com/users/sbinet/repos","events_url":"https://api.github.com/users/sbinet/events{/privacy}","received_events_url":"https://api.github.com/users/sbinet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sbinet/lsst-ccs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"sbinet","id":1070920,"avatar_url":"https://avatars.githubusercontent.com/u/1070920?v=3","gravatar_id":"","url":"https://api.github.com/users/sbinet","html_url":"https://github.com/sbinet","followers_url":"https://api.github.com/users/sbinet/followers","following_url":"https://api.github.com/users/sbinet/following{/other_user}","gists_url":"https://api.github.com/users/sbinet/gists{/gist_id}","starred_url":"https://api.github.com/users/sbinet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbinet/subscriptions","organizations_url":"https://api.github.com/users/sbinet/orgs","repos_url":"https://api.github.com/users/sbinet/repos","events_url":"https://api.github.com/users/sbinet/events{/privacy}","received_events_url":"https://api.github.com/users/sbinet/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-10-06T15:46:31Z","updated_at":"2015-10-06T15:46:31Z","closed_at":null,"body":"running `fcs-lpc-bench` with the race detector, one gets:\r\n\r\n```\r\ncanbus INFO    >>> boot...\r\ncanbus INFO    ... starting tcp server ...\r\ncanbus INFO    ... waiting for a connection ...\r\ncanbus INFO    detected node 0x42\r\ncanbus INFO    detected node 0x41\r\ncanbus INFO    node={66 524689 23 587464706 1 c7c60327}\r\ncanbus INFO    node={65 262545 23 587333634 65538 c7c80499}\r\ncanbus INFO    adc=&canbus.ADC{Base:(*fwk.Base)(0xc82009e0a0), node:65, serial:\"c7c80499\", tx:1, bus:(*canbus.busImpl)(0xc8200a0090)}\r\ncanbus INFO    dac=&canbus.DAC{Base:(*fwk.Base)(0xc82009e0e0), node:66, serial:\"c7c60327\", bus:(*canbus.busImpl)(0xc8200a0090)}\r\ncanbus INFO    >>> boot... [done]\r\ncanbus INFO    handle...\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.0625mbar; temp=21.078125C\r\n==================\r\nWARNING: DATA RACE\r\nWrite by goroutine 30:\r\n  syscall.raceWriteRange()\r\n      /build/go/src/go-1.5.1/src/syscall/race.go:29 +0x38\r\n  syscall.Read()\r\n      /build/go/src/go-1.5.1/src/syscall/syscall_unix.go:163 +0x9d\r\n  net.(*netFD).Read()\r\n      /build/go/src/go-1.5.1/src/net/fd_unix.go:228 +0x1bb\r\n  net.(*conn).Read()\r\n      /build/go/src/go-1.5.1/src/net/net.go:172 +0x120\r\n  net.(*TCPConn).Read()\r\n      <autogenerated>:74 +0x7c\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).run()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:380 +0xd51\r\n\r\nPrevious read by goroutine 39:\r\n  bytes.Count()\r\n      /build/go/src/go-1.5.1/src/bytes/bytes.go:64 +0x154\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).readVolts()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:154 +0x71b\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).Pressure()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:115 +0x76\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).Tick()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:68 +0x69b\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).sysTick.func1()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:195 +0x2a8\r\n\r\nGoroutine 30 (running) created at:\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).init()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:340 +0x2839\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).Boot()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:149 +0x2bf\r\n  github.com/sbinet/lsst-ccs/fwk.Module.Boot()\r\n      <autogenerated>:38 +0x6e\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).doSys.func1()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:153 +0x55\r\n\r\nGoroutine 39 (finished) created at:\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).sysTick()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:200 +0x17c\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).Run()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:94 +0xbd3\r\n  main.main()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fcs-mgr/fcs-lpc-bench/main.go:39 +0x3ce\r\n==================\r\n==================\r\nWARNING: DATA RACE\r\nWrite by goroutine 30:\r\n  syscall.raceWriteRange()\r\n      /build/go/src/go-1.5.1/src/syscall/race.go:29 +0x38\r\n  syscall.Read()\r\n      /build/go/src/go-1.5.1/src/syscall/syscall_unix.go:163 +0x9d\r\n  net.(*netFD).Read()\r\n      /build/go/src/go-1.5.1/src/net/fd_unix.go:228 +0x1bb\r\n  net.(*conn).Read()\r\n      /build/go/src/go-1.5.1/src/net/net.go:172 +0x120\r\n  net.(*TCPConn).Read()\r\n      <autogenerated>:74 +0x7c\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).run()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:380 +0xd51\r\n\r\nPrevious read by goroutine 39:\r\n  bytes.(*Reader).ReadRune()\r\n      /build/go/src/go-1.5.1/src/bytes/reader.go:91 +0x173\r\n  fmt.(*ss).ReadRune()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:207 +0x205\r\n  fmt.(*ss).getRune()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:227 +0x32\r\n  fmt.(*ss).skipSpace()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:434 +0x32\r\n  fmt.(*ss).SkipSpace()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:325 +0x33\r\n  fmt.(*ss).doScanf()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:1174 +0x2ea\r\n  fmt.Fscanf()\r\n      /build/go/src/go-1.5.1/src/fmt/scan.go:151 +0xf2\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.Command.Err()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:67 +0x2ee\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).readVolts()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:143 +0x516\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).Pressure()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:115 +0x76\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/hd2001.(*Device).Tick()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/hd2001/device.go:68 +0x69b\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).sysTick.func1()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:195 +0x2a8\r\n\r\nGoroutine 30 (running) created at:\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).init()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:340 +0x2839\r\n  github.com/sbinet/lsst-ccs/fwk/drivers/canbus.(*busImpl).Boot()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/drivers/canbus/canbus.go:149 +0x2bf\r\n  github.com/sbinet/lsst-ccs/fwk.Module.Boot()\r\n      <autogenerated>:38 +0x6e\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).doSys.func1()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:153 +0x55\r\n\r\nGoroutine 39 (finished) created at:\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).sysTick()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:200 +0x17c\r\n  github.com/sbinet/lsst-ccs/fwk.(*App).Run()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fwk/app.go:94 +0xbd3\r\n  main.main()\r\n      /home/binet/dev/lsst/ccs/go/src/github.com/sbinet/lsst-ccs/fcs-mgr/fcs-lpc-bench/main.go:39 +0x3ce\r\n==================\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.075000000000003C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.075000000000003C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.078125C\r\nsysbus INFO    recv: name=hpt;hygro=47.103125%; press=941.078125mbar; temp=21.0875C\r\n^Clpc INFO    stopping app...\r\ncanbus INFO    stopping...\r\nsysbus ERROR    received EOF: connection closed\r\ncanbus INFO    shutdown...\r\ncanbus INFO    closing tcp connection...\r\ncanbus INFO    closing tcp server\r\nFound 2 data race(s)\r\n\r\nreal\t0m16.415s\r\nuser\t0m0.033s\r\nsys\t0m0.067s\r\n```"}}