Hi, I wonder, if I set breakpoint in kernel fired by dtrace probe, can I single step the executed function ? What happens: ce: breakpoint action at probe fbt:genunix:mod_name_to_major:return (ecb 60001b4c198) kmdb: target stopped at: kmdbmod`kaif_enter: ta %icc, %g0 + 0x7d [0]> $C 000002a1006b68f1 kmdbmod`kaif_enter(2a1006b727c, 38, 8, 180fc00, 0, 183dc00) 000002a1006b69c1 dtrace`dtrace_action_breakpoint+0x200(29, 58, 4d, 60002fd4eb1, 40, f) 000002a1006b6c11 dtrace`dtrace_probe+0x6a8(60002603930, 183c118, 183c118, 60003fad0c0, 70480aec, 60003fb5800) 000002a1006b6e11 0x146a918(119, 70480b88, 18afc00, 60003fad0c0, 1838800, 119) 000002a1006b6ec1 mod_removedrv+0x44(70480b58, 70480b88, 60004dd3b68, 0, 18ac400 , 1860800) 000002a1006b6f71 mod_remove+0x24(70480b88, 70480b90, 30001938a68, 65d045, 1861308, fff2) 000002a1006b7021 x25`_fini+0x18(0, 0, 70480800, 70480800, 0, 0) 000002a1006b70d1 moduninstall+0x148(1, 0, 18afc00, 0, 600024a7800, 7b7039d0) 000002a1006b7181 modunrload+0x6c(95, 0, 1, 0, 0, 600024a7800) 000002a1006b7231 modctl+0x54(1, 95, 100000ff0, 100103020, ffffffff7f3f4194, ffffffff7f2b93e0) 000002a1006b72e1 syscall_trap+0xac(1, 95, 100000ff0, 100103020, ffffffff7f3f4194 , ffffffff7f2b93e0) If I try to set breakpoint [0]> mod_removedrv+0x48::bp kmdb: breakpoint will not arm until DTrace is inactive If I try to step out [0]> ::step out kmdb: breakpoint will not arm until DTrace is inactive can''t unload the module: Device busy <----- back in OS, no longer in kernel debugger Can''t unload x25 Moreover if I try to single step [0]> ::step 000000000000001500000000edd0000000000000000000000000000000000000000000000200060000000000000000000000000000ff30bb00000000008000070000000000058bec0005001000000000f000420000000000f00042040004001000000000f000420000000000f00042040003001000000000f0005a0000000000f0005a04000200d0000000000100760c000000000100761000010068ffffffff7f2d41ccffffffff7f2d41d0 Watchdog Reset Externally Initiated Reset ok And the system is history. Thank you -- Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080429/5040e069/attachment.bin>
Hi Vlad, No, you cannot mix DTrace and kmdb that easily. This integration just never got done as the author of kmdb moved on to other endeavors -- and the DTrace team didn''t want to wade into kmdb ;-) It''s a pain, I know, but I can''t promise a fix anytime soon. Adam On Apr 29, 2008, at 12:34 AM, Vladimir Marek wrote:> Hi, > > I wonder, if I set breakpoint in kernel fired by dtrace probe, can I > single step the executed function ? > > What happens: > > ce: breakpoint action at probe fbt:genunix:mod_name_to_major:return > (ecb 60001b4c198) > kmdb: target stopped at: > kmdbmod`kaif_enter: ta %icc, %g0 + 0x7d > [0]> $C > 000002a1006b68f1 kmdbmod`kaif_enter(2a1006b727c, 38, 8, 180fc00, 0, > 183dc00) > 000002a1006b69c1 dtrace`dtrace_action_breakpoint+0x200(29, 58, 4d, > 60002fd4eb1, 40, f) > 000002a1006b6c11 dtrace`dtrace_probe+0x6a8(60002603930, 183c118, > 183c118, 60003fad0c0, 70480aec, 60003fb5800) > 000002a1006b6e11 0x146a918(119, 70480b88, 18afc00, 60003fad0c0, > 1838800, 119) > 000002a1006b6ec1 mod_removedrv+0x44(70480b58, 70480b88, 60004dd3b68, > 0, 18ac400 , 1860800) > 000002a1006b6f71 mod_remove+0x24(70480b88, 70480b90, 30001938a68, > 65d045, 1861308, fff2) > 000002a1006b7021 x25`_fini+0x18(0, 0, 70480800, 70480800, 0, 0) > 000002a1006b70d1 moduninstall+0x148(1, 0, 18afc00, 0, 600024a7800, > 7b7039d0) > 000002a1006b7181 modunrload+0x6c(95, 0, 1, 0, 0, 600024a7800) > 000002a1006b7231 modctl+0x54(1, 95, 100000ff0, 100103020, > ffffffff7f3f4194, ffffffff7f2b93e0) > 000002a1006b72e1 syscall_trap+0xac(1, 95, 100000ff0, 100103020, > ffffffff7f3f4194 , ffffffff7f2b93e0) > > > If I try to set breakpoint > > [0]> mod_removedrv+0x48::bp > kmdb: breakpoint will not arm until DTrace is inactive > > If I try to step out > > [0]> ::step out > kmdb: breakpoint will not arm until DTrace is inactive > can''t unload the module: Device busy <----- back in OS, > no longer in kernel debugger > Can''t unload x25 > > Moreover if I try to single step > > [0]> ::step > 000000000000001500000000edd0000000000000000000000000000000000000000000000200060000000000000000000000000000ff30bb00000000008000070000000000058bec0005001000000000f000420000000000f00042040004001000000000f000420000000000f00042040003001000000000f0005a0000000000f0005a04000200d0000000000100760c000000000100761000010068ffffffff7f2d41ccffffffff7f2d41d0 > Watchdog Reset > Externally Initiated Reset > ok > > And the system is history. > > Thank you > > -- > Vlad > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
> No, you cannot mix DTrace and kmdb that easily. This integration > just never got done as the author of kmdb moved on to other endeavors > -- and the DTrace team didn''t want to wade into kmdb ;-)Fair enough. But it was worth asking :) Thanks ! -- Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080429/f6814e22/attachment.bin>
On Tue, Apr 29, 2008 at 09:34:35AM +0200, Vladimir Marek wrote:> Hi, > > I wonder, if I set breakpoint in kernel fired by dtrace probe, can I > single step the executed function ?You can force kmdb to ignore the fact that dtrace is there by doing: kmdb:0> kdi_dtrace_state/W1 in kmdb. I''ve had some luck doing so. Cheers, - jonathan> What happens: > > ce: breakpoint action at probe fbt:genunix:mod_name_to_major:return (ecb 60001b4c198) > kmdb: target stopped at: > kmdbmod`kaif_enter: ta %icc, %g0 + 0x7d > [0]> $C > 000002a1006b68f1 kmdbmod`kaif_enter(2a1006b727c, 38, 8, 180fc00, 0, 183dc00) > 000002a1006b69c1 dtrace`dtrace_action_breakpoint+0x200(29, 58, 4d, 60002fd4eb1, 40, f) > 000002a1006b6c11 dtrace`dtrace_probe+0x6a8(60002603930, 183c118, 183c118, 60003fad0c0, 70480aec, 60003fb5800) > 000002a1006b6e11 0x146a918(119, 70480b88, 18afc00, 60003fad0c0, 1838800, 119) > 000002a1006b6ec1 mod_removedrv+0x44(70480b58, 70480b88, 60004dd3b68, 0, 18ac400 , 1860800) > 000002a1006b6f71 mod_remove+0x24(70480b88, 70480b90, 30001938a68, 65d045, 1861308, fff2) > 000002a1006b7021 x25`_fini+0x18(0, 0, 70480800, 70480800, 0, 0) > 000002a1006b70d1 moduninstall+0x148(1, 0, 18afc00, 0, 600024a7800, 7b7039d0) > 000002a1006b7181 modunrload+0x6c(95, 0, 1, 0, 0, 600024a7800) > 000002a1006b7231 modctl+0x54(1, 95, 100000ff0, 100103020, ffffffff7f3f4194, ffffffff7f2b93e0) > 000002a1006b72e1 syscall_trap+0xac(1, 95, 100000ff0, 100103020, ffffffff7f3f4194 , ffffffff7f2b93e0) > > > If I try to set breakpoint > > [0]> mod_removedrv+0x48::bp > kmdb: breakpoint will not arm until DTrace is inactive > > If I try to step out > > [0]> ::step out > kmdb: breakpoint will not arm until DTrace is inactive > can''t unload the module: Device busy <----- back in OS, no longer in kernel debugger > Can''t unload x25 > > Moreover if I try to single step > > [0]> ::step > 000000000000001500000000edd0000000000000000000000000000000000000000000000200060000000000000000000000000000ff30bb00000000008000070000000000058bec0005001000000000f000420000000000f00042040004001000000000f000420000000000f00042040003001000000000f0005a0000000000f0005a04000200d0000000000100760c000000000100761000010068ffffffff7f2d41ccffffffff7f2d41d0 > Watchdog Reset > Externally Initiated Reset > ok > > And the system is history. > > Thank you > > -- > Vlad> _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
> > I wonder, if I set breakpoint in kernel fired by dtrace probe, can I > > single step the executed function ? > > You can force kmdb to ignore the fact that dtrace is there by doing: > > kmdb:0> kdi_dtrace_state/W1 > > in kmdb. I''ve had some luck doing so.That''s valuable information, I''ll keep it in mind ! Thank you -- Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080512/162f683d/attachment.bin>