missing stack info in _dl_tlsdesc_dynamic
Shuo Wang
wangshuo47@huawei.com
Tue Dec 22 10:20:22 GMT 2020
test in glibc-2.28
Stack info misses when running in _dl_tlsdesc_dynamic.
The debuginfo package has been installed normally.
Before entering _dl_tlsdesc_dynamic:
(gdb) bt
#0 _dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:149
#1 0x0000ffffbe4fbb44 in UfpOsalThreadIdInit (threadId=3194870184) at /usr1/test/MSS/src/eal/osal/src/osal_thread.c:30
#2 0x0000000000400c08 in initaaa () at thread.c:55
#3 0x0000000000400c40 in thread_proc (param=0x0) at thread.c:67
#4 0x0000ffffbf6918bc in start_thread (arg=0xfffffffff2af) at pthread_create.c:486
#5 0x0000ffffbf5669ec in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
After entering _dl_tlsdesc_dynamic:
(gdb) ni
_dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:150
150 stp x3, x4, [sp, #16]
(gdb) bt
#0 _dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:150
#1 0x0000ffffbe4fbb44 in UfpOsalThreadIdInit (threadId=3194870184) at /usr1/test/MSS/src/eal/osal/src/osal_thread.c:30
#2 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
This is the whole debug message:
(gdb) b _dl_tlsdesc_dynamic
Function "_dl_tlsdesc_dynamic" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_dl_tlsdesc_dynamic) pending.
(gdb) r
Starting program: /home/liqingqing/tqm/thread
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
xxxxx= handle=0x4212c0 errno=0
UfpOsalThreadIdInit = 0xffffbe4fbb28
3
[New Thread 0xffffbe20c1d0 (LWP 13948)]
[Switching to Thread 0xffffbe20c1d0 (LWP 13948)]
Thread 2 "xxxxxxx" hit Breakpoint 1, _dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:149
149 stp x1, x2, [sp, #-32]!
Missing separate debuginfos, use: dnf debuginfo-install libgcc-7.3.0-20190804.aarch64
(gdb) disassemble
Dump of assembler code for function _dl_tlsdesc_dynamic:
=> 0x0000ffffbf6d3ea8 <+0>: stp x1, x2, [sp, #-32]!
0x0000ffffbf6d3eac <+4>: stp x3, x4, [sp, #16]
0x0000ffffbf6d3eb0 <+8>: mrs x4, tpidr_el0
0x0000ffffbf6d3eb4 <+12>: ldr x1, [x0, #8]
0x0000ffffbf6d3eb8 <+16>: ldr x0, [x4]
0x0000ffffbf6d3ebc <+20>: ldr x3, [x1, #16]
0x0000ffffbf6d3ec0 <+24>: ldr x2, [x0]
0x0000ffffbf6d3ec4 <+28>: cmp x3, x2
0x0000ffffbf6d3ec8 <+32>: b.hi 0xffffbf6d3ef4 <_dl_tlsdesc_dynamic+76> // b.pmore
0x0000ffffbf6d3ecc <+36>: ldp x2, x3, [x1]
0x0000ffffbf6d3ed0 <+40>: add x0, x0, x2, lsl #4
0x0000ffffbf6d3ed4 <+44>: ldr x0, [x0]
0x0000ffffbf6d3ed8 <+48>: cmn x0, #0x1
0x0000ffffbf6d3edc <+52>: b.eq 0xffffbf6d3ef4 <_dl_tlsdesc_dynamic+76> // b.none
0x0000ffffbf6d3ee0 <+56>: sub x3, x3, x4
0x0000ffffbf6d3ee4 <+60>: add x0, x0, x3
0x0000ffffbf6d3ee8 <+64>: ldp x3, x4, [sp, #16]
0x0000ffffbf6d3eec <+68>: ldp x1, x2, [sp], #32
0x0000ffffbf6d3ef0 <+72>: ret
0x0000ffffbf6d3ef4 <+76>: stp x29, x30, [sp, #-128]!
0x0000ffffbf6d3ef8 <+80>: mov x29, sp
0x0000ffffbf6d3efc <+84>: stp x5, x6, [sp, #16]
0x0000ffffbf6d3f00 <+88>: stp x7, x8, [sp, #32]
0x0000ffffbf6d3f04 <+92>: stp x9, x10, [sp, #48]
0x0000ffffbf6d3f08 <+96>: stp x11, x12, [sp, #64]
0x0000ffffbf6d3f0c <+100>: stp x13, x14, [sp, #80]
0x0000ffffbf6d3f10 <+104>: stp x15, x16, [sp, #96]
0x0000ffffbf6d3f14 <+108>: stp x17, x18, [sp, #112]
0x0000ffffbf6d3f18 <+112>: stp q0, q1, [sp, #-512]!
0x0000ffffbf6d3f1c <+116>: stp q2, q3, [sp, #32]
0x0000ffffbf6d3f20 <+120>: stp q4, q5, [sp, #64]
0x0000ffffbf6d3f24 <+124>: stp q6, q7, [sp, #96]
0x0000ffffbf6d3f28 <+128>: stp q8, q9, [sp, #128]
0x0000ffffbf6d3f2c <+132>: stp q10, q11, [sp, #160]
0x0000ffffbf6d3f30 <+136>: stp q12, q13, [sp, #192]
0x0000ffffbf6d3f34 <+140>: stp q14, q15, [sp, #224]
0x0000ffffbf6d3f38 <+144>: stp q16, q17, [sp, #256]
0x0000ffffbf6d3f3c <+148>: stp q18, q19, [sp, #288]
0x0000ffffbf6d3f40 <+152>: stp q20, q21, [sp, #320]
0x0000ffffbf6d3f44 <+156>: stp q22, q23, [sp, #352]
0x0000ffffbf6d3f48 <+160>: stp q24, q25, [sp, #384]
0x0000ffffbf6d3f4c <+164>: stp q26, q27, [sp, #416]
0x0000ffffbf6d3f50 <+168>: stp q28, q29, [sp, #448]
0x0000ffffbf6d3f54 <+172>: stp q30, q31, [sp, #480]
0x0000ffffbf6d3f58 <+176>: mov x0, x1
0x0000ffffbf6d3f5c <+180>: bl 0xffffbf6c0010 <__tls_get_addr@plt>
0x0000ffffbf6d3f60 <+184>: mrs x1, tpidr_el0
0x0000ffffbf6d3f64 <+188>: sub x0, x0, x1
0x0000ffffbf6d3f68 <+192>: ldp q2, q3, [sp, #32]
0x0000ffffbf6d3f6c <+196>: ldp q4, q5, [sp, #64]
0x0000ffffbf6d3f70 <+200>: ldp q6, q7, [sp, #96]
0x0000ffffbf6d3f74 <+204>: ldp q8, q9, [sp, #128]
0x0000ffffbf6d3f78 <+208>: ldp q10, q11, [sp, #160]
0x0000ffffbf6d3f7c <+212>: ldp q12, q13, [sp, #192]
0x0000ffffbf6d3f80 <+216>: ldp q14, q15, [sp, #224]
0x0000ffffbf6d3f84 <+220>: ldp q16, q17, [sp, #256]
0x0000ffffbf6d3f88 <+224>: ldp q18, q19, [sp, #288]
0x0000ffffbf6d3f8c <+228>: ldp q20, q21, [sp, #320]
0x0000ffffbf6d3f90 <+232>: ldp q22, q23, [sp, #352]
0x0000ffffbf6d3f94 <+236>: ldp q24, q25, [sp, #384]
0x0000ffffbf6d3f98 <+240>: ldp q26, q27, [sp, #416]
0x0000ffffbf6d3f9c <+244>: ldp q28, q29, [sp, #448]
0x0000ffffbf6d3fa0 <+248>: ldp q30, q31, [sp, #480]
0x0000ffffbf6d3fa4 <+252>: ldp q0, q1, [sp], #512
0x0000ffffbf6d3fa8 <+256>: ldp x5, x6, [sp, #16]
0x0000ffffbf6d3fac <+260>: ldp x7, x8, [sp, #32]
0x0000ffffbf6d3fb0 <+264>: ldp x9, x10, [sp, #48]
0x0000ffffbf6d3fb4 <+268>: ldp x11, x12, [sp, #64]
0x0000ffffbf6d3fb8 <+272>: ldp x13, x14, [sp, #80]
0x0000ffffbf6d3fbc <+276>: ldp x15, x16, [sp, #96]
0x0000ffffbf6d3fc0 <+280>: ldp x17, x18, [sp, #112]
0x0000ffffbf6d3fc4 <+284>: ldp x29, x30, [sp], #128
0x0000ffffbf6d3fc8 <+288>: b 0xffffbf6d3ee8 <_dl_tlsdesc_dynamic+64>
End of assembler dump.
(gdb) bt
#0 _dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:149
#1 0x0000ffffbe4fbb44 in UfpOsalThreadIdInit (threadId=3194870184) at /usr1/test/MSS/src/eal/osal/src/osal_thread.c:30
#2 0x0000000000400c08 in initaaa () at thread.c:55
#3 0x0000000000400c40 in thread_proc (param=0x0) at thread.c:67
#4 0x0000ffffbf6918bc in start_thread (arg=0xfffffffff2af) at pthread_create.c:486
#5 0x0000ffffbf5669ec in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
(gdb) ni
_dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:150
150 stp x3, x4, [sp, #16]
(gdb) bt
#0 _dl_tlsdesc_dynamic () at ../sysdeps/aarch64/dl-tlsdesc.S:150
#1 0x0000ffffbe4fbb44 in UfpOsalThreadIdInit (threadId=3194870184) at /usr1/test/MSS/src/eal/osal/src/osal_thread.c:30
#2 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
More information about the Libc-alpha
mailing list