Debugging Hung Python Processes with GDB

Publicado el: 17 marzo 2018
en el canal de: FOSDEM
1,269
7

by Brian Bouterse

At: FOSDEM 2017

When things go wrong in production, it can be necessary to troubleshootproblems where they occur, instead of in a development environment. In thosesituations having a working knowledge of GDB, GDB Python Extensions, andstrace is very helpful. You will see some simple techniques to get insightinto those situations. This talk outlines several techniques for connecting toan already running, "stuck", or deadlocked Python process using GDB fordebugging.

During the talk, we will:

inspect the current state of threads with * use and demo the GDB macros for Python * inspect a locally running process and a core dump collected from a remote machine * use strace to gather system call information about a process * discuss the SIGTRAP handler as a proactive way to make rpdb available in production.

I have had to debug several hard-to-find bugs that were very infrequentdeadlocks using Python. Furthermore it was happening on remote machines Icould not have network access to. This technique was invaluable in thosesituations.

Everything is in the abstract


Room: UD2.120 (Chavanne)
Scheduled start: 2017-02-05 12:30:00


En esta página del sitio puede ver el video en línea Debugging Hung Python Processes with GDB de Duración hora minuto segunda en buena calidad , que subió el usuario FOSDEM 17 marzo 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,269 veces y le gustó 7 a los espectadores. Disfruta viendo!