<div dir="ltr">Thanks, but how does that relate to these failed messages?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021 at 1:47 PM Ulrich Windl <<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>> Ravindran Shanmugam <<a href="mailto:ravindran.shan@gmail.com" target="_blank">ravindran.shan@gmail.com</a>> schrieb am 20.03.2021 um<br>
20:50<br>
in Nachricht<br>
<CAC4QDGdbDvhnJ3E+mCDr+s3GZQ+eztLbD=fQUKGOUeeQy=<a href="mailto:Y_ow@mail.gmail.com" target="_blank">Y_ow@mail.gmail.com</a>>:<br>
> Hi,<br>
> <br>
> <br>
> <br>
> Bug / Issue:<br>
> <br>
> Under heavy logs entering the systemd-journald, journalctl Exits with one<br>
> of the following error messages:<br>
> <br>
> <br>
> <br>
> Failed to iterate through journal: Bad message<br>
> <br>
> Failed to get realtime timestamp: Bad message<br>
> <br>
> Failed to get monotonic timestamp: Bad message<br>
<br>
In theory with recent machines, you can get two identical timestamps even with<br>
nanosecond resolution on subsequent calls.<br>
I learned that some months ago.<br>
<br>
> <br>
> <br>
> <br>
> The systemd is at version 243<br>
> <br>
> <br>
> <br>
> Is this an Upstream bug which was fixed.?<br>
> <br>
> <br>
> <br>
> N.B:-<br>
> <br>
> As of now, not planning to upgrade to latest systemd version(247) for some<br>
> legacy reasons.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Repro steps:-<br>
> <br>
> 1)Change the following 2 options in the file "/etc/systemd/journald.conf"<br>
> from<br>
> <br>
> <br>
> <br>
> RateLimitIntervalSec=1s<br>
> <br>
> RateLimitBurst=2000<br>
> <br>
> to<br>
> <br>
> RateLimitIntervalSec=0<br>
> <br>
> RateLimitBurst=0<br>
> <br>
> <br>
> <br>
> to turn off rate limiting, and then kill the "systemd-journald" process so<br>
> that the new one<br>
> <br>
> will be spawned and picks up the new jounald.conf<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> 2) Start ‘journalctl’ with this command:<br>
> <br>
> "/bin/journalctl -o json<br>
><br>
--output-fields=_SOURCE_REALTIME_TIMESTAMP,__REALTIME_TIMESTAMP,SYSLOG_IDENT<br>
> IFIER,_SYSTEMD_UNIT,SYSLOG_FACILITY,MESSAGE,PRIORITY<br>
> -f --no-tail > /dev/null 2>&1 &"<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> 3)Create following bash script and run it as "test.sh 100 1"<br>
> <br>
> --------------------<br>
> <br>
> #! /bin/bash<br>
> <br>
> <br>
> <br>
> if [[ ! -e /tmp/lines1.txt ]]; then<br>
> <br>
> for i in $(seq 1 50001); do echo "abc1-$i" >> /tmp/lines1.txt; done<br>
> <br>
> for i in $(seq 1 50001); do echo "abc2-$i" >> /tmp/lines2.txt; done<br>
> <br>
> for i in $(seq 1 50001); do echo "abc3-$i" >> /tmp/lines3.txt; done<br>
> <br>
> for i in $(seq 1 50001); do echo "abc4-$i" >> /tmp/lines4.txt; done<br>
> <br>
> for i in $(seq 1 50001); do echo "abc5-$i" >> /tmp/lines5.txt; done<br>
> <br>
> fi<br>
> <br>
> <br>
> <br>
> loggernum=${1}<br>
> <br>
> if [[ -z ${loggernum} ]]; then<br>
> <br>
> loggernum=10<br>
> <br>
> fi<br>
> <br>
> loopnum=$((loggernum/5+1))<br>
> <br>
> <br>
> <br>
> foreverloop='no'<br>
> <br>
> if [[ -n "$2" ]]; then<br>
> <br>
> foreverloop='yes'<br>
> <br>
> fi<br>
> <br>
> <br>
> <br>
> while [[ 1 ]]; do<br>
> <br>
> for i in $(seq 1 ${loopnum}); do<br>
> <br>
> logger -p local0.3 -f /tmp/lines1.txt &<br>
> <br>
> logger -p local0.3 -f /tmp/lines2.txt &<br>
> <br>
> logger -p local0.3 -f /tmp/lines3.txt &<br>
> <br>
> logger -p local0.3 -f /tmp/lines4.txt &<br>
> <br>
> logger -p local0.3 -f /tmp/lines5.txt &<br>
> <br>
> done<br>
> <br>
> <br>
> <br>
> sleep 1<br>
> <br>
> ps aux | grep logger | wc -l<br>
> <br>
> <br>
> <br>
> if [[ "${foreverloop}" == "yes" ]]; then<br>
> <br>
> echo 'wait for loggers to exit'<br>
> <br>
> wait<br>
> <br>
> journalctl_pid=$(pidof journalctl)<br>
> <br>
> if [[ -z "${journalctl_pid}" ]]; then<br>
> <br>
> echo "journalctl dead, exit"<br>
> <br>
> exit 1<br>
> <br>
> fi<br>
> <br>
> else<br>
> <br>
> exit 0<br>
> <br>
> fi<br>
> <br>
> done<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> 4) Wait for until the message "journalctl dead, exit" appears on the<br>
> console, this means journalclt exited.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Rgds,<br>
> <br>
> --Ravi<br>
<br>
<br>
<br>
</blockquote></div>