Hi,
On 10-3-16 下午8:59, Samuel Thibault wrote:
>
> Get the address of the mach_port_deallocate_debug variable, set it to 1
> by entering kdb and use
>
> w theaddress 1
>
> then trigger the warning, you'll now get kdb invoked from the context.
> Then you can use trace to get the backtrace, and "show all thread/u" to
> know which process the task corresponds to. Then you can use e.g. gdb to
> know exactly which mach_port_deallocate() call is apparently spurious.
OK, now I can invoke kdb and set the variable. After the Hurd triggers the
warning, I get to kdb and invoke 'show all thread/u", but I don't know how to
find the task that trigger the warning. There are so many tasks and threads. The
output is something like this:
ID: TASK MAP THD SUS PR
COMMAND THREADS
0: 1fef5234 1fef3294 8 0 12
gnumach
0:(...) 1:(...) ...
1: 1fef6b24 1fef6bc4 628 0 12
...
...
We can see that the first task is gnumach, which has 8 threads, and it lists all
threads of gnumach at the end. But I don't know some columns such as
SUS(suspend?) and PR (priority?).
But the command doesn't always display the command of a task. For example, the
next task has 628 threads, but I don't know which process it corresponds to.
Zheng Da