{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/415","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/415/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/415/events","html_url":"https://github.com/ev3dev/ev3dev/issues/415","id":112930225,"number":415,"title":"systemd-udevd goes crazy when setting sensor mode in a loop","user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/fix%20committed","name":"fix committed","color":"eb6420"},{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/sensors","name":"sensors","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ev3dev/ev3dev/milestones/2","html_url":"https://github.com/ev3dev/ev3dev/milestones/ev3dev-jessie%202015-Q4","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/milestones/2/labels","id":1385736,"number":2,"title":"ev3dev-jessie 2015-Q4","description":"For tracking everything that needs to be included in the upcoming release.","creator":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":3,"state":"open","created_at":"2015-10-30T16:27:49Z","updated_at":"2015-11-09T17:46:39Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-10-23T02:30:12Z","updated_at":"2015-11-09T17:46:39Z","closed_at":"2015-11-09T17:46:39Z","body":"I noticed this when trying out OpenRoberta with ev3dev (see #348). We are using the udev change event to notify the world when a sensor changes modes. It looks like we forgot to check if the mode actually changed before sending the change event.\r\n\r\n`sudo udevadm monitor` looks like this:\r\n\r\n```\r\n...\r\nKERNEL[350620.293225] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.334936] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.369049] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.415695] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.457251] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.491144] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.551488] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.571343] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.613675] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.681312] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.707123] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.761975] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.798546] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.868921] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350620.915246] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.932751] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350620.999060] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350621.019011] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350621.089110] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nUDEV  [350621.132397] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350621.149143] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\nKERNEL[350621.192830] change   /devices/platform/ti_omapl_pru_suart.1/tty/ttySU1/sensor2 (lego-sensor)\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/comments/155137372","html_url":"https://github.com/ev3dev/ev3dev/issues/415#issuecomment-155137372","issue_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/415","id":155137372,"user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T17:46:39Z","updated_at":"2015-11-09T17:46:39Z","body":"Fix released in kernel cycle 8 (`*-8-ev3dev-*`)."}}