{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/125","labels_url":"https://api.github.com/repos/systemd/systemd/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/125/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/125/events","html_url":"https://github.com/systemd/systemd/issues/125","id":86719898,"number":125,"title":"regression: crashing journal due to watchdog","user":{"login":"utezduyar","id":8062069,"avatar_url":"https://avatars.githubusercontent.com/u/8062069?v=3","gravatar_id":"","url":"https://api.github.com/users/utezduyar","html_url":"https://github.com/utezduyar","followers_url":"https://api.github.com/users/utezduyar/followers","following_url":"https://api.github.com/users/utezduyar/following{/other_user}","gists_url":"https://api.github.com/users/utezduyar/gists{/gist_id}","starred_url":"https://api.github.com/users/utezduyar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utezduyar/subscriptions","organizations_url":"https://api.github.com/users/utezduyar/orgs","repos_url":"https://api.github.com/users/utezduyar/repos","events_url":"https://api.github.com/users/utezduyar/events{/privacy}","received_events_url":"https://api.github.com/users/utezduyar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-09T20:10:14Z","updated_at":"2015-06-10T06:26:36Z","closed_at":null,"body":"The for (;;) loop in server_process_datagram might prevent journal\r\nfrom feeding the watchdog if there is always something to receive in\r\nthe syslog socket. Potentially journald is restarted, applications\r\nstall if the syslog socket is staying full....\r\n\r\nI thought about fixing it by checking the watchdog on every iteration\r\nof for (;;) by using watchdog_last, watchdog_period and feeding\r\nwatchdog if necessary but none of those properties are public.\r\n\r\nCurrent rate limit check is done right before we store the message\r\n(after we receive it, after we forward it to console, wall, kmsg). I\r\nthink it is too late.\r\n\r\nMaybe the best approach is having a rate limit on sd-event\r\n(sd-event-source) so we can map rate limit options in journald.conf to\r\njournal's sd-event.\r\n\r\nThoughts?\r\n\r\nPS: Moving the discussion off the mailing list to get it tracked."},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/110612330","html_url":"https://github.com/systemd/systemd/issues/125#issuecomment-110612330","issue_url":"https://api.github.com/repos/systemd/systemd/issues/125","id":110612330,"user":{"login":"utezduyar","id":8062069,"avatar_url":"https://avatars.githubusercontent.com/u/8062069?v=3","gravatar_id":"","url":"https://api.github.com/users/utezduyar","html_url":"https://github.com/utezduyar","followers_url":"https://api.github.com/users/utezduyar/followers","following_url":"https://api.github.com/users/utezduyar/following{/other_user}","gists_url":"https://api.github.com/users/utezduyar/gists{/gist_id}","starred_url":"https://api.github.com/users/utezduyar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utezduyar/subscriptions","organizations_url":"https://api.github.com/users/utezduyar/orgs","repos_url":"https://api.github.com/users/utezduyar/repos","events_url":"https://api.github.com/users/utezduyar/events{/privacy}","received_events_url":"https://api.github.com/users/utezduyar/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T06:26:36Z","updated_at":"2015-06-10T06:26:36Z","body":"Imagine there is always something to fetch at this fd, https://github.com/systemd/systemd/blob/cde40acc805b855909b95f15fd9a3111e40be672/src/journal/journald-server.c#L1171.\r\n\r\nIn this case, the loop (https://github.com/systemd/systemd/blob/cde40acc805b855909b95f15fd9a3111e40be672/src/journal/journald-server.c#L1116) will never quit. We will never return back to event processing where we feed the watchdog. \r\n\r\nGuy with bad intention starts multiple processes, ```while (1) logger \"hello\"``` and it should be enough to clog the journal."}}