{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/bugs/issues/373","labels_url":"https://api.github.com/repos/coreos/bugs/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/coreos/bugs/issues/373/comments","events_url":"https://api.github.com/repos/coreos/bugs/issues/373/events","html_url":"https://github.com/coreos/bugs/issues/373","id":86359706,"number":373,"title":"journald miss the last few log lines when process exit","user":{"login":"yichengq","id":2976232,"avatar_url":"https://avatars.githubusercontent.com/u/2976232?v=3","gravatar_id":"","url":"https://api.github.com/users/yichengq","html_url":"https://github.com/yichengq","followers_url":"https://api.github.com/users/yichengq/followers","following_url":"https://api.github.com/users/yichengq/following{/other_user}","gists_url":"https://api.github.com/users/yichengq/gists{/gist_id}","starred_url":"https://api.github.com/users/yichengq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yichengq/subscriptions","organizations_url":"https://api.github.com/users/yichengq/orgs","repos_url":"https://api.github.com/users/yichengq/repos","events_url":"https://api.github.com/users/yichengq/events{/privacy}","received_events_url":"https://api.github.com/users/yichengq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coreos/bugs/labels/systemd","name":"systemd","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-08T22:43:58Z","updated_at":"2015-06-09T16:34:18Z","closed_at":null,"body":"The problem comes from report issues about etcd running in CoreOS.\r\n\r\nI write a C program:\r\n```\r\n#include <stdio.h>\r\n#include <unistd.h>\r\n\r\nint main (void)\r\n{\r\n        printf(\"I am a C program\\n\");\r\n        fprintf(stderr, \"line 1: who am I\\n\");\r\n        fprintf(stderr, \"line 2: what am I doing\\n\");\r\n        // sleep(1);\r\n        fprintf(stderr, \"line 3: i don't even understand this bug\\n\");\r\n        fprintf(stderr, \"line 4: at any level!\\n\");\r\n        fflush(stderr);\r\n        return 0;\r\n}\r\n```\r\n\r\nAnd system service file to run it:\r\n```\r\n[Unit]\r\nDescription=a\r\n\r\n[Service]\r\nUser=etcd\r\nExecStart=/home/core/share/src/a\r\nRestart=always\r\nRestartSec=5s\r\nLimitNOFILE=40000\r\n```\r\n\r\nThe journalctl tells me the log is like this:\r\n```\r\nJun 07 18:23:20 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:25 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:25 core-01 systemd[1]: Started a.\r\nJun 07 18:23:15 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:15 core-01 a[9554]: line 1: who am I\r\nJun 07 18:23:15 core-01 a[9554]: line 2: what am I doing\r\nJun 07 18:23:15 core-01 a[9554]: line 3: i don't even understand this bug\r\nJun 07 18:23:15 core-01 a[9554]: line 4: at any level!\r\nJun 07 18:23:15 core-01 a[9554]: I am a C program\r\nJun 07 18:23:20 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:20 core-01 systemd[1]: Started a.\r\nJun 07 18:23:20 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:25 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:25 core-01 systemd[1]: Started a.\r\nJun 07 18:23:25 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:31 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:31 core-01 systemd[1]: Started a.\r\nJun 07 18:23:31 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:36 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:36 core-01 systemd[1]: Started a.\r\nJun 07 18:23:36 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:41 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:41 core-01 systemd[1]: Started a.\r\nJun 07 18:23:41 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:46 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:46 core-01 systemd[1]: Started a.\r\nJun 07 18:23:46 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:52 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:52 core-01 systemd[1]: Started a.\r\nJun 07 18:23:52 core-01 systemd[1]: Starting a...\r\nJun 07 18:23:57 core-01 systemd[1]: a.service holdoff time over, scheduling restart.\r\nJun 07 18:23:57 core-01 systemd[1]: Started a.\r\n```\r\n\r\nMy environment is `systemd 219\r\n-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS -ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN`, `CoreOS alpha (695.0.0)`, `Vagrant 1.7.2`, `VMWare fusion 7.1.1`, `OS X 10.10.2`\r\n\r\nI talked with nick and we cannot reproduce it in his VMs now.\r\n\r\n/cc @mischief @crawford @philips "},"comment":{"url":"https://api.github.com/repos/coreos/bugs/issues/comments/110424756","html_url":"https://github.com/coreos/bugs/issues/373#issuecomment-110424756","issue_url":"https://api.github.com/repos/coreos/bugs/issues/373","id":110424756,"user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T16:34:18Z","updated_at":"2015-06-09T16:34:18Z","body":"@yichengq Why sleep(1) is commented out? If it is not commented out, will the first 2 lines in the journal? "}}