Problem with pthread_kill, maybe bug?
Christophe Saout <[email protected]> 21 Aug 2002 23:23:43 +0200
| Newsgroups | gmane.linux.ngpt.user |
|---|---|
| Message-ID | <1029965025.29951.13.camel@chtephan> |
Hi! I compiled ngpt-2.0.1 yesterday and tried to make mysqld use it. It starts fine and answers request but when you try to stop it (via network command or kill), it hangs. After some debugging I found the following: The main thread does a select() to wait for new incoming connections which are then handled by separate threads. When the server is stopped, the function for shutdown is called and it tries to pthread_kill(main_thread, SIGUSR1) which should obviously cause the main thread to abort waiting in select() but which it doesn't. A quick check with LinuxThreads showed that it did it there. I'm not sure if it's mysql's fault (not correctly setting up signals or something), but mysql is supposed to work with other pthread implementations than only LinuxThreads, so I ask if this might be a bug.