|
Description
|
Category
utility
Sub-Category
mdb
Description
term1> sleep 100000 &
term2> pfexec mdb -k
Loading modules: [ unix krtld genunix specfs dtrace uppc pcplusmp scsi_vhci ufs ip sctp arp usba uhci nca fcip fctl random crypto zfs ptm nfs ipc lofs ]
> ::pgrep sleep
S PID PPID PGID SID UID FLAGS ADDR NAME
R 5164 4757 5164 4757 1000 0x42004000 e6081bd8 sleep
> ::pgrep sleep | ::context
debugger context set to proc e6081bd8
zsh: segmentation fault (core dumped) pfexec mdb -k
> pstack core
core 'core' of 5163: mdb -k
00000000 ???????? (80e3cd0, 8045b00)
08089e6c ps_pauxv (80e3cd0, 8045b00) + 20
d0ee1606 _rd_reset32 (80e3c70, 0, d0ef4170, d0ef4000, 0, 8045b5c) + 76
d0ee0d50 rd_reset (80e3c70) + 2c
d0ee0de5 rd_new (80e3cd0) + 81
080762c9 kp_activate (80e3cd0) + 3d
0808cf2c mdb_tgt_activate (80e3cd0) + 18c
08077a1a kt_setcontext (80e3eb0, e6081bd8) + 5a
0808cc9d mdb_tgt_setcontext (80e3eb0, e6081bd8) + 15
08068c07 cmd_context (e6081bd8, f, 0, 0) + 23
08063f63 dcmd_invoke (80d4ef0, e6081bd8, f, 0, 0, 0) + 53
08064125 mdb_call_idcmd (80d4ef0, e6081bd8, 0, 1, 0, f) + 111
08063b64 mdb_call (e6081bd8, 0, 1, 0, 0, 80cef88) + 2d8
080944df yyparse (8046b7c, 809f564, 8046c3c, 80462c0, 80b7f30, 0) + a33
0806367a mdb_run (809f69c, 809f680, 10, d0ffb7c0, 0, 0) + 26e
0807acd1 main (2, 80470bc, 80470c8) + f49
08060822 _start (2, 8047220, 8047224, 0, 8047227, 8047239) + 7a
Frequency
Always
Regression
No
Steps to Reproduce
attempt to switch to a process context with ::context when debugging a live kernel (mdb -k).
Expected Result
Success.
Actual Result
Segv in ps_auvx()
Error Message(s)
Test Case
Workaround
Submitter wants to work on bug
No
Additional configuration information
so the brandz project added a 't_auxv' target operation to the mdb_tgt_ops structure
and only updated one mdb target (the mdb_proc target). all the other targets
within mdb need to be updated to define this entry point as not supported.
in addition to that, the brandz project also created a new librtld_db proc
services call named ps_pbrandname(). a version of this function was added to
libproc (which is a librtld_db proc services consumer), but one was not added
to mdb (which is also a librtld proc services consumer). this means that when
mdb attempt to switch to a debugging a process via the '::context' command,
when librtld_db is initalized it will invoke ps_pbrandname() and it will invoke
the libproc version. this causes libproc to access an invalid proc handle
(because the proc handle was allocated by mdb and not proc). mdb proc
services needs to define it's own version of this function for librtld_db
to invoke.
|