-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random crash of test_signal
on macos sonoma
#110017
Comments
I got it again from
|
Maybe the test_signal.test_stress_modifying_handlers() was already unstable before macOS 14: I saw a crash on macOS 12.7 (GHA macOS), see issue gh-110083. Maybe it's just that it was missed before I deplayed |
I got a failure-then-success for |
I came to the same conclusion. It would be great if someone with macOS 13 (or older) try to reproduce it. |
I caught the error in a debugger:
Note the SEGV on address 0x1 triggered from within libc. A second thread is in the sigaction implementation.
This looks more and more like a bug in macOS. I'll see if I can whip up a reproducer in C. |
This is a reproducer in C that crashes almost immediately for me on a 14.1 system. The crash is similar to the one above:
#include <signal.h>
#include <unistd.h>
#include <pthread.h>
#include <stdio.h>
static int sigcount = 0;
static int update_count = 0;
void sighandler(int sig)
{
return;
}
void* raising_thread(void* arg)
{
for (;;) {
raise(SIGUSR1);
sigcount += 1;
}
return NULL;
}
void update_signal(void)
{
struct sigaction context, ocontext;
if (update_count++ % 2 == 0) {
context.sa_handler = sighandler;
} else {
context.sa_handler = SIG_IGN;
}
sigemptyset(&context.sa_mask);
context.sa_flags = SA_ONSTACK;
if (sigaction(SIGUSR1, &context, &ocontext) == -1) {
perror("sigaction");
_exit(1);
}
}
int main(void)
{
alarm(30);
update_signal();
pthread_t thread;
if (pthread_create(&thread, NULL, &raising_thread, NULL) != 0) {
perror("pthread_create");
return 1;
}
for (;;) {
update_signal();
}
} |
…n macOS Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple.
I've filed an issue with Apple about this: FB13453490 |
FWIW, your C test also crashed on macOS 13.5.1 and 12.6.1 (both Apple Silicon). |
#112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple.
…n macOS (pythonGH-112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple. (cherry picked from commit bf0beae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
…n macOS (pythonGH-112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple. (cherry picked from commit bf0beae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
…on macOS (GH-112834) (#112851) gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple. (cherry picked from commit bf0beae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
…on macOS (GH-112834) (#112852) gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple. (cherry picked from commit bf0beae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
…n macOS (python#112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple.
…n macOS (python#112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple.
Crash report
I've experience a randome crash while fixing #109981
Why random? Because I was not able to reproduce it ever again.
My command:
Contents of
tests.txt
:But, note that only 3 tests were run before:
test_shelve test_shlex test_signal
I've also tried to run
./python.exe -m test -j4 --forever test_shelve test_shlex test_signal
, but no luck for now.Env:
main
)Linked PRs
The text was updated successfully, but these errors were encountered: