From: Dan Nelson Date: August 19 2002 3:23pm Subject: Re: Displaying the real thread PIDs. List-Archive: http://lists.mysql.com/mysql/117547 Message-Id: <20020819152327.GA70455@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Aug 19), Reid Sutherland (mysql) said: > Dan Nelson wrote: > > You cannot send signals to individual threads. Signals are > > delivered to the process as a whole rather than to a thread. The > > only way to kill a thread is from within the application itself. > > Mysql provides the "kill " command for this. > > Thanks for your reply. > > What could I do about hung mySQL threads? 'kill' fails to do > anything, except marked the thread as killed but keeps it active. > > Also, when I kill the mySQL parent, I have to then SIGKILL all the > hung threads thereafter. Is this normal? Nope. Maybe you need to apply some OS patches. I assume since you're talking about threads as though they were processes, you're on Linux. Make sure you're running the latest glibc, and if it still happens, file a bugreport via your Linux distro's bug reporting tool. When you SIGKILL the main LinuxThreads process/thread, all associated processes/threads should be killed also. > I've even seen an issue where no mySQL processes exist yet I cannot > restart mySQL since an unknown process is holding port 3306. I then > kill apache and some mySQL threads appear out of no where and require > a SIGKILL. This doesn't have anything to do with this subject, but > I'd like to share my findings. You can use the command "lsof -i :3306" to display all processes with a socket open on port 3306. -- Dan Nelson dnelson@stripped