Opened 14 years ago
Closed 14 years ago
#6315 closed bug (fixed)
[pthread] Unkillable thread
Reported by: | Adek336 | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
After reducing the testcase a lot, I ended up with
#include <iostream> #include <pthread.h> #include <stdlib.h> #include <unistd.h> pthread_cond_t ptcond; pthread_mutex_t *ptmux; void* fun(void*) { pthread_mutex_lock(ptmux); while (true) pthread_cond_wait(&ptcond,ptmux); for(;;) sleep(1000); } int main(int argc, char *argv[]) { pthread_mutex_t ptm; pthread_mutex_init(&ptm,__null); pthread_cond_init(&ptcond,__null); ptmux = &ptm; pthread_t pt; pthread_create(&pt, 0, fun, 0); for(;;) sleep(100); }
The main thread for this process is unkillable. Interestingly, sending SIGTERM, SIGINT or SIGKILL to the other thread kills the process.
Change History (5)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
Component: | - General → System/Kernel |
---|---|
Owner: | changed from | to
Version: | R1/alpha2 → R1/Development |
comment:4 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
hrev37286, VBox 3.1, gcc4+2 hybrid