This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/14107] Bad user unwinding from kernel fatal signal handler for some x86_64 kernels


http://sourceware.org/bugzilla/show_bug.cgi?id=14107

--- Comment #3 from Mark Wielaard <mjw at redhat dot com> 2012-05-14 22:22:51 UTC ---
And we do actually go trough do_page_fault just before this frame:

_stp_get_uregs:194: unwind levels: 17, ret: 0, pc=0xffffffff814f253e
unwind:1452: pc=ffffffff814f253d, ffffffff814f253e
unwind:1492: trying debug_frame
set_no_state_rule:375: reg=10, where=1
_stp_search_unwind_hdr:777: binary search for ffffffff814f253d
_stp_search_unwind_hdr:839: fde off=26520
_stp_search_unwind_hdr:849: returning fde=ffffffffa14be360
startLoc=ffffffff814f
2500
unwind_frame:1184: kernel: fde=ffffffffa14be360
unwind_frame:1189: kernel: cie=ffffffffa14bde28
parse_fde_cie:282: map retAddrReg value 16 to reg_info idx 16
unwind_frame:1203: startLoc: ffffffff814f2500, endLoc: ffffffff814f2597
unwind_frame:1251: cie=ffffffffa14bde28 fde=ffffffffa14be360
startLoc=ffffffff81
4f2500 endLoc=ffffffff814f2597, pc=ffffffff814f253d
unwind_frame:1271: processCFI for CIE
[...]
unwind_frame:1426: returning 0 (ffffffff814ef8f5)
_stp_get_uregs:194: unwind levels: 16, ret: 0, pc=0xffffffff814ef8f5
unwind:1452: pc=ffffffff814ef8f4, ffffffff814ef8f5
unwind:1492: trying debug_frame
set_no_state_rule:375: reg=10, where=1
_stp_search_unwind_hdr:777: binary search for ffffffff814ef8f4
_stp_search_unwind_hdr:839: fde off=113238
_stp_search_unwind_hdr:849: returning fde=ffffffffa15ab078
startLoc=ffffffff814ef680
unwind_frame:1184: kernel: fde=ffffffffa15ab078
unwind_frame:1189: kernel: cie=ffffffffa15aafb0
parse_fde_cie:282: map retAddrReg value 16 to reg_info idx 16
unwind_frame:1203: startLoc: ffffffff814ef680, endLoc: ffffffff814ef707
unwind_frame:1205: pc (ffffffff814ef8f4) > endLoc(ffffffff814ef707)
unwind:1496: debug_frame failed: 1, trying eh_frame
unwind_frame:1168: Module kernel: no unwind frame data
_stp_get_uregs:194: unwind levels: 15, ret: -5, pc=0xffffffff814ef8f5
_stp_get_uregs:209: failed to recover user reg state

Since do_page_fault is the actual errorentry for page_fault it looks like the
CFI for do_page_fault is wrong, or we don't process is correctly.

The CFI for do_page_fault looks as follows for 2.6.32-220.7.1.el6.x86_64:

 [ 25fe8] CIE length=20
   CIE_id:                   18446744073709551615
   version:                  3
   augmentation:             ""
   code_alignment_factor:    1
   data_alignment_factor:    -8
   return_address_register:  16

   Program:
     def_cfa r7 (rsp) at offset 8
     offset_extended_sf r16 (rip) at cfa-8
     nop
     nop
     nop
     nop
     nop

 [ 26520] FDE length=76 cie=[ 25fe8]
   CIE_pointer:              155624
   initial_location:         0xffffffff814f2500 <do_page_fault>
   address_range:            0x97

   Program:
     advance_loc4 1 to 0x1
     def_cfa_offset 16
     offset_extended_sf r6 (rbp) at cfa-16
     advance_loc4 3 to 0x4
     def_cfa_register r6 (rbp)
     advance_loc4 23 to 0x1b
     offset_extended_sf r14 (r14) at cfa-24
     offset_extended_sf r13 (r13) at cfa-32
     offset_extended_sf r12 (r12) at cfa-40
     offset_extended_sf r3 (rbx) at cfa-48
     advance_loc4 83 to 0x6e
     remember_state
     restore r6 (rbp)
     def_cfa r7 (rsp) at offset 8
     restore r14 (r14)
     restore r13 (r13)
     restore r12 (r12)
     restore r3 (rbx)
     advance_loc4 1 to 0x6f
     restore_state
     nop
     nop

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]