[Bug 18894] New: inferior process exits due to SIGTRAP after detach on FreeBSD

Bug ID 18894
Summary inferior process exits due to SIGTRAP after detach on FreeBSD
Product lldb
Version unspecified
Hardware PC
OS FreeBSD
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter emaste@freebsd.org
Classification Unclassified

emaste@freebsd.org changed bug 18894

What | Removed | Added |

Comment # 3 on bug 18894 from emaste@freebsd.org

quitting while stopped at a breakpoint looks like this (with log enable freebsd
ptrace & lldb process):

(lldb) quit
Quitting LLDB will kill one or more processes. Do you really want to proceed:
[Y/n] y
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=400480 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 182
PT_IO: op=WRITE_D offs=400480 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=400480 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=4005b0 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 182
PT_IO: op=WRITE_D offs=4005b0 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=4005b0 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=800602d20 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 182
PT_IO: op=WRITE_D offs=800602d20 size=1
ptrace(PT_IO, 74686, 0x7fffff9fce08, 0) called from file
../tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp line 166
PT_IO: op=READ_D offs=800602d20 size=1
Process::SetPrivateState (exited)
Process::SetPrivateState (exited) stop_id = 5
Process::ControlPrivateStateThread (signal = 1)
Sending control event of type: 1.
Process::ShouldBroadcastEvent (0x808cdee20) => new state: exited, last
broadcast state: exited - YES
Process::HandlePrivateEvent (pid = 74686) broadcasting new state exited (old
state stopped) to public
Process::RunPrivateStateThread (arg = 0x808aed500, pid = 74686) about to exit
with internal state exited...
Process::RunPrivateStateThread (arg = 0x808aed500, pid = 74686) thread
exiting...
The control event killed the private state thread without having to cancel.

<pause here for a moment>

Went to stop the private state thread, but it was already invalid.