FS#66093 - [procps-ng] Running pgrep fails
Attached to Project:
Arch Linux
Opened by Benoit Pierre (bpierre) - Friday, 03 April 2020, 04:22 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 22 May 2020, 12:42 GMT
Opened by Benoit Pierre (bpierre) - Friday, 03 April 2020, 04:22 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 22 May 2020, 12:42 GMT
|
Details
Description:
pgrep fails when not executed as root: > pgrep something pgrep: cannot allocate 4611686018427387903 bytes Additional info: * package version(s): procps-ng 3.3.16-1 * link to upstream bug report: this is fixed in procps' master https://gitlab.com/procps-ng/procps/-/commit/bb96fc42956c9ed926a1b958ab715f8b4a663dec Steps to reproduce: Run pgrep as a non-root user. |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Friday, 22 May 2020, 12:42 GMT
Reason for closing: Fixed
Additional comments about closing: procps-ng 3.3.16-2
Friday, 22 May 2020, 12:42 GMT
Reason for closing: Fixed
Additional comments about closing: procps-ng 3.3.16-2

Note that this doesn't happen in a default installation since the
stack size is low enough (2 MB) by default, see the pthread_create
man page
(http://man7.org/linux/man-pages/man3/pthread_create.3.html). To
reproduce, you temporarily need to lift this limit for your shell
session by running "ulimit -s ulimited".

Any project that relies on pgrep or pkill is heavily affected.
Note that even if you have a ulimit -s, the bug slows down pgrep.
This slowdown is linear in the stack size. E.g. on an older PC,
any simple pgrep call takes 30 sec if your stack is 500000, and 60
sec if it is 1000000!