Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#51417 - [systemd] Journalctl --follow reports no error when out of inotify watches

Attached to Project: Arch Linux
Opened by Alexander Maznev (pik) - Monday, 17 October 2016, 14:04 GMT
Last edited by Dave Reisner (falconindy) - Monday, 17 October 2016, 20:16 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
journalctl --follow Fails to output any new input to journalctl (although cancelling and running the command again will show all input up do the time the command ran). When run with sudo e.g. `sudo journalctl --follow` new input is appended correctly to the buffer.

( I asked in #systemd IRC for an explanation to the above behavior and it was suggested I should file an issue for this. )

Additional info:
core/systemd 231-4
Linux 4.7.4-1-ARCH #1 SMP PREEMPT Thu Sep 15 15:24:29 CEST 2016 x86_64 GNU/Linux

Steps to reproduce:
journalctl --follow
printf "Wah, where is my message?" | systemd-cat
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 17 October 2016, 20:16 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://github.com/systemd/systemd/issue s/1296
Comment by Dave Reisner (falconindy) - Monday, 17 October 2016, 14:54 GMT
Works for me...

What groups are you in? Where are your logs saved (/run or /var)?
Comment by Alexander Maznev (pik) - Monday, 17 October 2016, 15:39 GMT
So after looking into it seems to occur when the user runs out of inotify_watches (`fs.inotify.max_user_watches`) so I was mistaken and superuser is irrelevant here (or only relevant as far as being a user that's not maxed out). Properly though one would think that journalctl should print an error message and exit, or resort to polling the way tail does:

"tail: inotify cannot be used, reverting to polling"

Journalctl fails to use any kind of fallback or display an error message on inotify_watch failure though.
Comment by Dave Reisner (falconindy) - Monday, 17 October 2016, 16:02 GMT
If you add SYSTEMD_LOG_LEVEL=debug to the environment of journalctl, does it show any error?

You'll probably want to report this upstream...
Comment by Alexander Maznev (pik) - Monday, 17 October 2016, 17:11 GMT
@Dave Reisner: no even debug log level doesn't seem to show any errors, but it's present in the strace attached for inotify_add_watch.
Comment by Dave Reisner (falconindy) - Monday, 17 October 2016, 18:40 GMT
Then please report this upstream. Arch will not fix this locally.
Comment by Alexander Maznev (pik) - Monday, 17 October 2016, 20:10 GMT
Seems like it's not a new issue (updated), referencing: https://github.com/systemd/systemd/issues/1296

Loading...