Hello! I discovery crytical bug. Any user can use command grep and to bring system to slow as halting. Command: grep . /dev/zero Testing system: FreeBSD freebsd 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
This just causes grep to consume all of the system's memory and swap space. On my system the OOM killer kicks in and kills grep.
Mark Johnston, may be need tested stable version, i tested this version: FreeBSD freebsd 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 https://dropmefiles.com/vu7hI
Mark Johnston, You not indicated your version and not answered my question. Question (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239279#c1): > Mark Johnston, may be need tested stable version, i tested this version: FreeBSD freebsd 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
(In reply to AlnXpr from comment #2) I tested on -CURRENT. Again, however, any program is by default allowed to consume system memory and force swapouts. Does your system recover after some time, or do you need a reboot in order to recover?
(In reply to Mark Johnston from comment #4) No, system not restore. From restore needed do hard reboot pressed on reset button.
I can confirm that the problem still exists on 15-CURRENT. bsdgrep eats all memory until killed by the kernel: $ grep . /dev/zero Killed gnugrep and ripgrep don't have this memory problem, they just run in an endless loop as expected.
kib@ pointed out on IRC that grep is trying to read in a whole line, so memory use will grow without bound given input without a newline