Date: Sun, 5 Jan 2003 14:08:19 -0500 (EST) From: Robert Watson <rwatson@FreeBSD.org> To: current@FreeBSD.org Subject: gdb: failed to set signal flags properly for ast() Message-ID: <Pine.NEB.3.96L.1030105135032.89578B-100000@fledge.watson.org>
next in thread | raw e-mail | index | archive | help
While debugging the recent pthreads problem, I've started running into this: pid 663 (test), uid 1000: exited on signal 10 (core dumped) failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() pid 709 (test), uid 0: exited on signal 10 (core dumped) pid 713 (test), uid 0: exited on signal 10 (core dumped) failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() failed to set signal flags properly for ast() It appears to happen frequently when running the previously posted "test" source code for -pthread under gdb. When running the test program outside of gdb, this doesn't happen, suggesting a possible interaction with ptrace. To trigger it the first time under gdb, I have to hit Ctrl-T, then type continue a few times. Under gdb, Ctrl-T appears to "sometimes" cause a sigbus; the rest of the time, it causes this warning to start being generated while the program continues. Once the warning has started to be generated, it gets generated about 12 times almost immediately, and then intermittently from then onwards. Source below. Compiled using -g, -Wall, -pthread. (so not KSE) Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories #include <pthread.h> #include <stdio.h> #include <unistd.h> void * thread1(void *arg) { while (1) { /* sleep(2); */ pthread_yield(); printf("1\n"); } } void * thread2(void *arg) { sleep(1); while (1) { /* sleep(2); */ pthread_yield(); printf("2\n"); } } int main(int argc, char *argv[]) { pthread_t t1, t2; int error; error = pthread_create(&t1, NULL, thread1, NULL); error = pthread_create(&t2, NULL, thread2, NULL); error = pthread_join(t1, NULL); error = pthread_join(t2, NULL); return (0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030105135032.89578B-100000>