On 2024-12-19 16:42, Corinna Vinschen via Cygwin wrote:
On Dec 19 17:20, Cedric Blancher via Cygwin wrote:
Good afternoon!
We have a new AMD EPYC machine with 144 cores (upgraded from 8 core
machine) running Windows 10 Enterprise, with a mixture of native Win32
apps+Cygwin.
But the Cygwin apps cause trouble, as PID numbers get re-used too
fast. We churn through ~~6912000 child processes EVERY HOUR, which now
causes major problems with PID wraparounds in scripts and perl.
1. How can I increase the value at which pid-wraparound will happen?
2. How can I test for Cygwins max PID value? Cygwin does not have
/proc/sys/kernel/pid_max
We can't make the pid algorithm variable in terms of the max pid, so
I changed the maximum PID to the maximum pid on Linux, i.e., 4194304.
Please check out the next test release cygwin 3.6.0-0.294.g363357c023ce.
Run the attached to check your upgrade:
$ gcc -o cyg_max_pid{,.c} && ./cyg_max_pid
max pid 65536
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
/*!/usr/bin/gcc -D_GNU_SOURCE -pipe -Wp,-D_FORTIFY_SOURCE=3 -fanalyzer
-fsanitize-recover=all -fstack-check -fstack-protector-all
* -Wall -Wextra -Wformat=2 -Wformat-overflow=2 -Werror=format-security -ggdb
-Og --param=ssp-buffer-size=4 */
/* cyg_max_pid.c - print Cygwin max pid id allowed - not max pids per user -
see ulimit */
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/cygwin.h>
int
main (void)
{
pid_t mp = cygwin_internal (CW_MAX_CYGWIN_PID, &mp);
printf ("max pid %d\n", mp);
}
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple