[Bug 282993] awk eats all ram
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 282993] awk eats all ram"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Nov 2024 16:43:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282993
--- Comment #1 from Riccardo Torrini <riccardo@torrini.org> ---
(In reply to Riccardo Torrini from comment #0)
first of all a fix for a typo: s/jq '{some parsing}'/jq '{some formatting}'/ ;)
I created a small script able to reproduce the problem on 14.1
----- 8< -----
# tail -qF /tmp/example.log | awk -F' {' '{printf( "{%s\n", $2 )}' > /dev/null
&
# sh -c "touch /tmp/example.log ; while true ; do mv /tmp/example.log
/tmp/example.log.old ; cat /var/log/messages > /tmp/example.log ; ps -axwwwo
pid,ppid,state,rss,command | grep awk | grep -v grep ; sleep .1 ; done"
----- 8< -----
how to use: look for some minutes to the output (mem keep growing)
mv & recreate should be very similar to rotate logs, to force tail -F to reopen
new file
tested on:
- 13.3 : rock stable to 2840
- 14.1 : about 1.5GB after 10' / 32GB of ram and 17GB of swap after 10 hours
- 14.2-BETA (on raspberry) : also rock stable at 2628
- HEAD of some days ago : again rock stable
Probably I choose a bad time frame for update ;)
--
Riccardo.
--
You are receiving this mail because:
You are the assignee for the bug.