Description of problem: If you try to attach to a process using gdb, and the ptrace fails with EPERM, it is then no longer possible to quit gdb. Version-Release number of selected component (if applicable): gdb-5.3post-0.20021129.18 How reproducible: Always Steps to Reproduce: 1. # /usr/sbin/httpd.worker 2. # ps axf ## pick a child of httpd.worker 3. # gdb /usr/sbin/httpd.worker 5697 ... Couldn't get registers: Operation not permitted. A program is being debugged already. Kill it? (y or n) n Program not killed. (gdb) quit Actual results: The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/sbin/httpd.worker, process 5955 ptrace: Operation not permitted. Expected results: It should be possible to quit GDB without needing to kill -9 it! Additional info:
Note that this is only reproducible if you boot a kernel with the ptrace-of-setuid-process bug, e.g. 2.4.20-9, not the 2.4.20-13.9 erratum which was released today.
Fixed in latest release. Error in ptrace detach now causes message but does not call error() so quitting will complete.