Hi Takashi,
sorry for the delay.
On Sat, 3 May 2025 15:53:57 +0900, Takashi Yano wrote:
Hi Christian,
On Fri, 2 May 2025 16:09:48 +0200
Christian Franke wrote:
...
I have a problem with
stress-ng --mprotect 1 -t 5 -v
It sometimes hang due to a cause which does not seem to be a
cygwin bug.
stress-ng seems to use SIGALRM to stop processes. In mprotect
case, SIGARLM is armed before stopping SIGSEGV. What I observed
is:
1. SIGARLM is armed.
2. stress_handle_stop_stressing() is called.
3. Just after stress_handle_stop_stressing() is called, SIGSEGV
occurs inside the stress_handle_stop_stressing().
4. SIGSEGV handler is called and longjmp() is executed.
5. stress_handle_stop_stressing() can not continue because
longjmp() does not return.
Therefore, timeout (SIGARLM) processing in stress-ng fails.
Please try
while true; do stress-ng --mprotect 1 -t 1 -v; done
with cygwin-3.7.0-0.88.gb7097ab39ed0 (Test). In my environment,
stress-ng hangs in dozens of minutes.
Could you please have a look?
With many iterations, I could reproduce the hang. Your explanation is
likely correct.
SIGSEGV should be set in the sa_mask of SIGALRM (and other) handlers. I
could file an upstream issue if desired.
--
Regards,
Christian