{"action":"closed","issue":{"url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/issues/51","repository_url":"https://api.github.com/repos/bearing/dosenet-raspberrypi","labels_url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/issues/51/comments","events_url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/issues/51/events","html_url":"https://github.com/bearing/dosenet-raspberrypi/issues/51","id":162205254,"number":51,"title":"Bug around network up / network down","user":{"login":"bplimley","id":5259089,"avatar_url":"https://avatars.githubusercontent.com/u/5259089?v=3","gravatar_id":"","url":"https://api.github.com/users/bplimley","html_url":"https://github.com/bplimley","followers_url":"https://api.github.com/users/bplimley/followers","following_url":"https://api.github.com/users/bplimley/following{/other_user}","gists_url":"https://api.github.com/users/bplimley/gists{/gist_id}","starred_url":"https://api.github.com/users/bplimley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bplimley/subscriptions","organizations_url":"https://api.github.com/users/bplimley/orgs","repos_url":"https://api.github.com/users/bplimley/repos","events_url":"https://api.github.com/users/bplimley/events{/privacy}","received_events_url":"https://api.github.com/users/bplimley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/bearing/dosenet-raspberrypi/labels/device-software","name":"device-software","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-24T18:35:16Z","updated_at":"2016-07-26T00:07:32Z","closed_at":"2016-07-26T00:07:32Z","body":"Under certain conditions of network up and down, the `Sensor` object dies (or stops responding) and the `NetworkStatus` object dies (or stops responding).\n\nTo reproduce:\n1. start `manager.py` in a screen. preferably `-i 30`\n2. out of the screen, `sudo ifdown wlan1` or `eth0` to disable network connection\n3. in the screen, wait for `NetworkStatus` to notice and start saying `... is DOWN!`\n4. out of the screen, `sudo ifup wlan1` or `eth0`\n5. in the screen, wait for `NetworkStatus` to notice and say `... is UP!`\n6. So far so good. But bring the network down one more time, and you will get no more counts and `NetworkStatus` makes no more attempts to ping.\n\nI believe this is related to the signal handling and the `sys.exit(0)`. When subprocesses get terminated with e.g. `self._p.terminate()` in `NetworkStatus`, I believe a `SIGTERM` signal is sent to the subprocess, which then gets handled by the signal handler in `manager.py`. The `sys.exit(0)` call in the signal handler may kill something else in `NetworkStatus` or in `Sensor`. I haven't tried to think it through completely yet.\n\nMay need to use a different signal than `SIGTERM`, or do something different than `sys.exit(0)`, or change `dosenet.sh stop` behavior."}}
{"actor":{"display_login":"bplimley"}}