TriPython February 2016 Meeting: Debugging Hung Python Processes With GDB
When things go wrong in production, it can be necessary to troubleshoot problems where they occur, instead of in a development environment. In those situations having a working knowledge of GDB, GDB Python Extensions, and strace is very helpful. Brian Bouterse will show some simple techniques to get insight into those situations. This talk outlines a variety of debugging techniques for connecting to an already running, "stuck", or deadlocked Python process using GDB. Together we will inspect the current state of threads with and without the help of the new GDB macros for Python, inspect a local running process and a core dump collected from a remote machine, use strace to gather system call information about a process, and discuss the SIGTRAP handler as a proactive way to make rpdb available in production. Brian Bouterse is a Senior Software Engineer at Red Hat. He is a developer on Pulp which is written in Python and deploys Python software among other types (rpm, puppet, docker, etc). He also is a contributor to the Kombu project. Brian loves open source because he loves freedom, collaboration, and choice. He is a Computer Science PhD candidate at North Carolina State University where he studies capacity planning and performance analysis. He lives in Raleigh near NCSU with his wife Katie and his cat Schmowee. Extemporaneous "lightning talks" of 5-10 minute duration are also welcome and don't need to be pre-announced. Plenty of free after hours parking is available in the upper level of the deck behind WebAssign (turn through the median just before the intersection of Varsity and Main Campus Drives). If the door is locked, call the number posted on the door. An after-meeting location for food and beverage will be decided at the meeting (usually BaDa Wings for the Thursday night draught specials).
For more information, visit
- WebAssign, NCSU Centennial Campus, 1791 Varsity Drive, Suite 200, Raleigh
- Steve Gambino
- Contact Email
- Contact Phone