{"action":"created","issue":{"url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/377","repository_url":"https://api.github.com/repos/google/aiyprojects-raspbian","labels_url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/377/comments","events_url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/377/events","html_url":"https://github.com/google/aiyprojects-raspbian/issues/377","id":324242906,"node_id":"MDU6SXNzdWUzMjQyNDI5MDY=","number":377,"title":"Myriad resets unexpectedly leading to SpicommInternalError","user":{"login":"HeatfanJohn","id":322853,"node_id":"MDQ6VXNlcjMyMjg1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/322853?v=4","gravatar_id":"","url":"https://api.github.com/users/HeatfanJohn","html_url":"https://github.com/HeatfanJohn","followers_url":"https://api.github.com/users/HeatfanJohn/followers","following_url":"https://api.github.com/users/HeatfanJohn/following{/other_user}","gists_url":"https://api.github.com/users/HeatfanJohn/gists{/gist_id}","starred_url":"https://api.github.com/users/HeatfanJohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeatfanJohn/subscriptions","organizations_url":"https://api.github.com/users/HeatfanJohn/orgs","repos_url":"https://api.github.com/users/HeatfanJohn/repos","events_url":"https://api.github.com/users/HeatfanJohn/events{/privacy}","received_events_url":"https://api.github.com/users/HeatfanJohn/received_events","type":"User","site_admin":false},"labels":[{"id":958155431,"node_id":"MDU6TGFiZWw5NTgxNTU0MzE=","url":"https://api.github.com/repos/google/aiyprojects-raspbian/labels/Vision","name":"Vision","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-18T01:48:16Z","updated_at":"2018-07-13T20:00:55Z","closed_at":null,"author_association":"NONE","body":"The Myriad resets due to `Slave not ready after 1000 ms` error.  This leads to an SpicommInternalError exception and results in the Finally clause to execute in JoyDetector.run causing the application to stop functioning while the service is still running.\r\n\r\nAn open except and logging was added to trap and display the exception as it occurred. \r\n\r\n```\r\nMay 17 10:41:18 aiyvision kernel: [46924.151775] aiy-vision spi0.0: Slave not ready after 1000 ms\r\nMay 17 10:41:18 aiyvision kernel: [46924.151816] aiy-vision spi0.0: Fatal error, resetting\r\nMay 17 10:41:18 aiyvision kernel: [46924.151829] aiy-vision spi0.0: Resetting myriad\r\nMay 17 10:41:21 aiyvision kernel: [46926.741620] aiy-vision spi0.0: Writing myriad firmware\r\nMay 17 10:41:27 aiyvision kernel: [46932.656598] aiy-vision spi0.0: Myriad booting\r\nMay 17 10:41:27 aiyvision kernel: [46932.837788] aiy-vision spi0.0: Myriad ready\r\nMay 17 10:41:27 aiyvision python3[239]: ERROR:__main__:Unexpected exception encountered: <class 'picamera.exc.PiCameraRuntimeError'>\r\nMay 17 10:41:27 aiyvision python3[239]: ERROR:__main__:Traceback (most recent call last):\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/_drivers/_spicomm.py\", line 137, in transact\r\nMay 17 10:41:27 aiyvision python3[239]:     fcntl.ioctl(self._dev, SPICOMM_IOCTL_TRANSACT, buf)\r\nMay 17 10:41:27 aiyvision python3[239]: OSError: [Errno 14] Bad address\r\nMay 17 10:41:27 aiyvision python3[239]: During handling of the above exception, another exception occurred:\r\nMay 17 10:41:27 aiyvision python3[239]: Traceback (most recent call last):\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/home/pi/AIY-projects-python/src/examples/vision/joy/joy_detection_demo.py\", line 278, in run\r\nMay 17 10:41:27 aiyvision python3[239]:     for i, result in enumerate(inference.run()):\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 76, in run\r\nMay 17 10:41:27 aiyvision python3[239]:     yield self._engine.camera_inference()\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 257, in camera_inference\r\nMay 17 10:41:27 aiyvision python3[239]:     return self._communicate(request).inference_result\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 187, in _communicate\r\nMay 17 10:41:27 aiyvision python3[239]:     response.ParseFromString(self._transport.send(request.SerializeToString()))\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/_drivers/_transport.py\", line 33, in send\r\nMay 17 10:41:27 aiyvision python3[239]:     return self._spicomm.transact(request)\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/_drivers/_spicomm.py\", line 152, in transact\r\nMay 17 10:41:27 aiyvision python3[239]:     raise SpicommInternalError\r\nMay 17 10:41:27 aiyvision python3[239]: aiy._drivers._spicomm.SpicommInternalError\r\nMay 17 10:41:27 aiyvision python3[239]: During handling of the above exception, another exception occurred:\r\nMay 17 10:41:27 aiyvision python3[239]: Traceback (most recent call last):\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/home/pi/AIY-projects-python/src/examples/vision/joy/joy_detection_demo.py\", line 293, in run\r\nMay 17 10:41:27 aiyvision python3[239]:     break\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 87, in __exit__\r\nMay 17 10:41:27 aiyvision python3[239]:     self.close()\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 79, in close\r\nMay 17 10:41:27 aiyvision python3[239]:     self._engine.stop_camera_inference()\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 263, in stop_camera_inference\r\nMay 17 10:41:27 aiyvision python3[239]:     self._communicate(request)\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/opt/aiy/projects-python/src/aiy/vision/inference.py\", line 189, in _communicate\r\nMay 17 10:41:27 aiyvision python3[239]:     raise InferenceException(response.status.message)\r\nMay 17 10:41:27 aiyvision python3[239]: aiy.vision.inference.InferenceException: StopCameraInference: Camera inference is not running.\r\nMay 17 10:41:27 aiyvision python3[239]: During handling of the above exception, another exception occurred:\r\nMay 17 10:41:27 aiyvision python3[239]: Traceback (most recent call last):\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/home/pi/AIY-projects-python/src/examples/vision/joy/joy_detection_demo.py\", line 293, in run\r\nMay 17 10:41:27 aiyvision python3[239]:     break\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/usr/lib/python3/dist-packages/picamera/camera.py\", line 758, in __exit__\r\nMay 17 10:41:27 aiyvision python3[239]:     self.close()\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/usr/lib/python3/dist-packages/picamera/camera.py\", line 752, in close\r\nMay 17 10:41:27 aiyvision python3[239]:     raise exc\r\nMay 17 10:41:27 aiyvision python3[239]:   File \"/usr/lib/python3/dist-packages/picamera/camera.py\", line 1995, in _control_callback\r\nMay 17 10:41:27 aiyvision python3[239]:     \"No data recevied from sensor. Check all connections, \"\r\nMay 17 10:41:27 aiyvision python3[239]: picamera.exc.PiCameraRuntimeError: No data recevied from sensor. Check all connections, including the SUNNY chip on the camera board\r\nMay 17 10:41:27 aiyvision python3[239]: INFO:__main__:JoyDetector: finnally called\r\nMay 17 11:17:01 aiyvision CRON[1645]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)\r\nMay 17 12:17:01 aiyvision CRON[1675]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)\r\n```"},"comment":{"url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/comments/404938582","html_url":"https://github.com/google/aiyprojects-raspbian/issues/377#issuecomment-404938582","issue_url":"https://api.github.com/repos/google/aiyprojects-raspbian/issues/377","id":404938582,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDkzODU4Mg==","user":{"login":"HeatfanJohn","id":322853,"node_id":"MDQ6VXNlcjMyMjg1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/322853?v=4","gravatar_id":"","url":"https://api.github.com/users/HeatfanJohn","html_url":"https://github.com/HeatfanJohn","followers_url":"https://api.github.com/users/HeatfanJohn/followers","following_url":"https://api.github.com/users/HeatfanJohn/following{/other_user}","gists_url":"https://api.github.com/users/HeatfanJohn/gists{/gist_id}","starred_url":"https://api.github.com/users/HeatfanJohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeatfanJohn/subscriptions","organizations_url":"https://api.github.com/users/HeatfanJohn/orgs","repos_url":"https://api.github.com/users/HeatfanJohn/repos","events_url":"https://api.github.com/users/HeatfanJohn/events{/privacy}","received_events_url":"https://api.github.com/users/HeatfanJohn/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T20:00:54Z","updated_at":"2018-07-13T20:00:54Z","author_association":"NONE","body":"Hi @dmitriykovalev. does debug information posted on 6/21 help to identify the root cause of the timeout?\r\n\r\nThis issue still happens about once every couple of days on my kit.  Could this be just an issue with my kit?\r\n\r\nIs there a utility I could run that stresses whatever is timing out?  In other words a test that just continuously performs the operation that is timing out. \r\n\r\nDoes `aiy-vision spi0.0: receive_data_buffer of size 134, buffer_len 12582928` mean that the kernel driver has received some indication that the Myriad chip wants to sent the driver some data?\r\n\r\nAnd then what's the purpose of `Waiting before read.`?\r\n\r\nThe driver then never says `Done waiting, reading` - the next entry is `Slave not ready after 1000ms`.\r\n\r\nWhat could cause that to happen?\r\n\r\nThanks again,\r\nJohn"}}
{"actor":{"display_login":"HeatfanJohn"}}