{"id":17069537,"url":"https://github.com/mgalgs/systemd-tee-output-issue","last_synced_at":"2025-03-23T10:43:28.755Z","repository":{"id":138482367,"uuid":"421212460","full_name":"mgalgs/systemd-tee-output-issue","owner":"mgalgs","description":"Repro for systemd tee output issue","archived":false,"fork":false,"pushed_at":"2021-10-27T16:16:39.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T07:44:24.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgalgs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-25T23:15:22.000Z","updated_at":"2021-10-27T16:16:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ef5a7e9-aa53-4491-a445-9a080127c535","html_url":"https://github.com/mgalgs/systemd-tee-output-issue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgalgs%2Fsystemd-tee-output-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgalgs%2Fsystemd-tee-output-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgalgs%2Fsystemd-tee-output-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgalgs%2Fsystemd-tee-output-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgalgs","download_url":"https://codeload.github.com/mgalgs/systemd-tee-output-issue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090866,"owners_count":20559296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T11:27:07.583Z","updated_at":"2025-03-23T10:43:28.719Z","avatar_url":"https://github.com/mgalgs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Code to reproduce [this issue](https://serverfault.com/q/1081172/66928),\nwhich is that some of `tee`'s output isn't making it into the system\njournal.\n\nTroubleshooting is underway on the `systemd-devel` mailing list ([archive\nlink](https://lists.freedesktop.org/archives/systemd-devel/2021-October/047039.html\n)).\n\n# Repro instructions\n\n```\ngit clone https://github.com/mgalgs/systemd-tee-output-issue.git\ncd systemd-tee-output-issue\ncp tee_test.sh /usr/local/bin  # might need sudo\nmkdir -pv ~/.config/systemd/user\ncp tee_test.service ~/.config/systemd/user/\nsystemctl --user daemon-reload\nsystemctl --user start tee_test.service\njournalctl --user -xf -u tee_test.service\n```\n\nYou'll see in the logs that some of our pizza is missing, though the pie is\nall there.\n\n# Test results\n\nI've reproduced the issue on the following systems:\n\n```\nManjaro\nsystemd 249 (249.4-2-manjaro)\n+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified\n\nUbuntu 20.04\nsystemd 245 (245.4-4ubuntu3.5)\n+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid\n```\n\nI'm unable to reproduce the issue on the following systems:\n\n```\nDebian 11\nsystemd 247 (247.3-6)\n+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified\n```\n\nI don't see any glaring difference between the working `Debian 11` config\nand the non-working `Manjaro` config (`diff -r /etc/systemd ~/tmp/debian_systemd`)...\n\n### Logs in system journal\n\nViewing with `journalctl --user -x -u tee_test.service`. I only see a subset of the logs.\n\n```\nOct 26 12:13:53 grinchel systemd[2702]: Started Test teeing under systemd.\n░░ Subject: A start job for unit UNIT has finished successfully\n░░ Defined-By: systemd\n░░ Support: https://forum.manjaro.org/c/support\n░░\n░░ A start job for unit UNIT has finished successfully.\n░░\n░░ The job identifier is 713.\nOct 26 12:13:54 grinchel tee_test.sh[117352]: i shall eat 2 slices of pie\nOct 26 12:13:55 grinchel tee_test.sh[117352]: i shall eat 3 slices of pie\nOct 26 12:13:56 grinchel tee_test.sh[117352]: i shall eat 4 slices of pie\nOct 26 12:13:57 grinchel tee_test.sh[117352]: i shall eat 5 slices of pie\nOct 26 12:13:58 grinchel tee_test.sh[117352]: i shall eat 6 slices of pie\nOct 26 12:13:59 grinchel tee_test.sh[117352]: i shall eat 7 slices of pie\nOct 26 12:14:00 grinchel tee_test.sh[117352]: i shall eat 8 slices of pie\nOct 26 12:14:01 grinchel tee_test.sh[117352]: i shall eat 9 slices of pie\nOct 26 12:14:02 grinchel tee_test.sh[117352]: i shall eat 10 slices of pie\nOct 26 12:14:03 grinchel tee_test.sh[117352]: i shall eat 11 slices of pie\nOct 26 12:14:04 grinchel tee_test.sh[117352]: i shall eat 12 slices of pie\nOct 26 12:14:05 grinchel tee_test.sh[117352]: i shall eat 13 slices of pie\nOct 26 12:14:06 grinchel tee_test.sh[117352]: i shall eat 14 slices of pie\nOct 26 12:14:07 grinchel tee_test.sh[117352]: i shall eat 15 slices of pie\nOct 26 12:14:08 grinchel tee_test.sh[118097]: i shall eat 16 slices of pizza\nOct 26 12:14:08 grinchel tee_test.sh[117352]: i shall eat 16 slices of pie\nOct 26 12:14:09 grinchel tee_test.sh[117352]: i shall eat 17 slices of pie\nOct 26 12:14:10 grinchel tee_test.sh[117352]: i shall eat 18 slices of pie\nOct 26 12:14:11 grinchel tee_test.sh[117352]: i shall eat 19 slices of pie\nOct 26 12:14:12 grinchel tee_test.sh[118350]: i shall eat 20 slices of pizza\nOct 26 12:14:12 grinchel tee_test.sh[117352]: i shall eat 20 slices of pie\nOct 26 12:14:13 grinchel tee_test.sh[117352]: i shall eat 21 slices of pie\n```\n\nCompare this to my Debian 11 system, which doesn't have this problem for\nsome reason:\n\n```\nOct 27 08:51:58 pi-hole-test tee_test.sh[487]: i shall eat 75591 slices of pie\nOct 27 08:51:59 pi-hole-test tee_test.sh[228195]: i shall eat 75592 slices of pizza\nOct 27 08:51:59 pi-hole-test tee_test.sh[487]: i shall eat 75592 slices of pie\nOct 27 08:52:00 pi-hole-test tee_test.sh[228198]: i shall eat 75593 slices of pizza\nOct 27 08:52:00 pi-hole-test tee_test.sh[487]: i shall eat 75593 slices of pie\nOct 27 08:52:01 pi-hole-test tee_test.sh[228201]: i shall eat 75594 slices of pizza\nOct 27 08:52:01 pi-hole-test tee_test.sh[487]: i shall eat 75594 slices of pie\nOct 27 08:52:02 pi-hole-test tee_test.sh[228206]: i shall eat 75595 slices of pizza\nOct 27 08:52:02 pi-hole-test tee_test.sh[487]: i shall eat 75595 slices of pie\nOct 27 08:52:03 pi-hole-test tee_test.sh[228209]: i shall eat 75596 slices of pizza\nOct 27 08:52:03 pi-hole-test tee_test.sh[487]: i shall eat 75596 slices of pie\nOct 27 08:52:04 pi-hole-test tee_test.sh[228212]: i shall eat 75597 slices of pizza\n```\n\n### Logs in log file\n\nIn my log file I see all of the logs.\n\n```\n\ni like pie\ni shall eat 2 slices of pizza\ni shall eat 3 slices of pizza\ni shall eat 4 slices of pizza\ni shall eat 5 slices of pizza\ni shall eat 6 slices of pizza\ni shall eat 7 slices of pizza\ni shall eat 8 slices of pizza\ni shall eat 9 slices of pizza\ni shall eat 10 slices of pizza\ni shall eat 11 slices of pizza\ni shall eat 12 slices of pizza\ni shall eat 13 slices of pizza\ni shall eat 14 slices of pizza\ni shall eat 15 slices of pizza\ni shall eat 16 slices of pizza\ni shall eat 17 slices of pizza\ni shall eat 18 slices of pizza\ni shall eat 19 slices of pizza\ni shall eat 20 slices of pizza\ni shall eat 21 slices of pizza\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgalgs%2Fsystemd-tee-output-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgalgs%2Fsystemd-tee-output-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgalgs%2Fsystemd-tee-output-issue/lists"}