We have have a multi-threaded program with multiple connections to the database. While this program is running, we often get a single child process (pid) that just hangs. This particular child process consumes 100% of any given CPU. We are trying to troubleshoot this and trying to determine which child pid maps to the SHOW PROCESSLIST Id.
With that in mind, we would like to know if there is a way to map a linux child pid that's associated with the linux parent pid (ppid) of the mysqld process to the Id shown in the output of SHOW PROCESSLIST.