Contents

Backtrace samples in NetBSD kernel

Contents

Here I’ll paste many backtraces I’ve got while debugging the NetBSD kernel with gdb, because it is often the case that I want to see them when I’m so lazy that I can’t startup the debug environment :)

sys/netipsec/key.c

  • key_api_getspi()
  • key_api_register()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(gdb) bt
#0  key_api_getspi (so=0xffff8241b23880c8, m=0xffff8241ab42e778, mhp=0xffff958033193978) at /home/wsh/qc/netbsd/sys/netipsec/key.c:5345
#1  0xffffffff804652d5 in key_parse (m=0xffff8241ab42e778, so=0xffff8241b23880c8) at /home/wsh/qc/netbsd/sys/netipsec/key.c:8025
#2  0xffffffff8047949e in key_output (m=0xffff8241ab42e778, so=0xffff8241b23880c8) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:152
#3  0xffffffff8087178d in raw_send (so=0xffff8241b23880c8, m=0xffff8241ab42e778, nam=0x0, control=0x0, l=0xffff8241acaa7b00, output=0xffffffff804791f0 <key_output>) at /home/wsh/qc/netbsd/sys/net/raw_usrreq.c:182
#4  0xffffffff804791d4 in key_send (so=0xffff8241b23880c8, m=0xffff8241ab42e778, nam=0x0, control=0x0, l=0xffff8241acaa7b00) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:594
#5  0xffffffff8047826f in key_send_wrapper (a=0xffff8241b23880c8, b=0xffff8241ab42e778, c=0x0, d=0x0, e=0xffff8241acaa7b00) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:626
#6  0xffffffff807962a7 in sosend (so=0xffff8241b23880c8, addr=0x0, uio=0xffff958033193e80, top=0xffff8241ab42e778, control=0x0, flags=0, l=0xffff8241acaa7b00) at /home/wsh/qc/netbsd/sys/kern/uipc_socket.c:1077
#7  0xffffffff80768182 in soo_write (fp=0xffff8241aad96240, offset=0xffff8241aad96240, uio=0xffff958033193e80, cred=0xffff8241afa48100, flags=1) at /home/wsh/qc/netbsd/sys/kern/sys_socket.c:119
#8  0xffffffff80754376 in do_filewritev (fd=3, iovp=0x7f7fffcd0bf0, iovcnt=7, offset=0xffff8241aad96240, flags=1, retval=0xffff958033193fb0) at /home/wsh/qc/netbsd/sys/kern/sys_generic.c:480
#9  0xffffffff8075403a in sys_writev (l=0xffff8241acaa7b00, uap=0xffff958033194000, retval=0xffff958033193fb0) at /home/wsh/qc/netbsd/sys/kern/sys_generic.c:389
#10 0xffffffff8026c9ed in sy_call (sy=0xffffffff80c87328 <sysent+2904>, l=0xffff8241acaa7b00, uap=0xffff958033194000, rval=0xffff958033193fb0) at /home/wsh/qc/netbsd/sys/sys/syscallvar.h:65
#11 0xffffffff8026c941 in sy_invoke (sy=0xffffffff80c87328 <sysent+2904>, l=0xffff8241acaa7b00, uap=0xffff958033194000, rval=0xffff958033193fb0, code=121 (0x79 0o171 0b1111001 "y") 2030043136 (0x79000000 0o...000000 0b...00000000 "y")) at /home/wsh/qc/netbsd/sys/sys/syscallvar.h:94
#12 0xffffffff8026c300 in syscall (frame=0xffff958033194000) at /home/wsh/qc/netbsd/sys/arch/x86/x86/syscall.c:138
#13 0xffffffff802096bd in handle_syscall () at /home/wsh/qc/netbsd/sys/arch/amd64/amd64/locore.S:2029
#14 0x0000000000000003 in ?? ()
#15 0x00007f7fffcd0bf0 in ?? ()
#16 0x0000000000000007 in ?? ()
#17 0x00007f7fffcd0bf0 in ?? ()
#18 0x0000000000000002 in ?? ()
#19 0x0000000000500bd9 in ?? ()
#20 0x0000000000000000 in ?? ()

(gdb) bt
#0  key_api_register (so=0xffffe68c9d214338, m=0xffffe68c9668e718, mhp=0xffff978056998978) at /home/wsh/qc/netbsd/sys/netipsec/key.c:7214
#1  0xffffffff804652d5 in key_parse (m=0xffffe68c9668e718, so=0xffffe68c9d214338) at /home/wsh/qc/netbsd/sys/netipsec/key.c:8025
#2  0xffffffff8047949e in key_output (m=0xffffe68c9668e718, so=0xffffe68c9d214338) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:152
#3  0xffffffff8087178d in raw_send (so=0xffffe68c9d214338, m=0xffffe68c9668e718, nam=0x0, control=0x0, l=0xffffe68c974d5700, output=0xffffffff804791f0 <key_output>) at /home/wsh/qc/netbsd/sys/net/raw_usrreq.c:182
#4  0xffffffff804791d4 in key_send (so=0xffffe68c9d214338, m=0xffffe68c9668e718, nam=0x0, control=0x0, l=0xffffe68c974d5700) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:594
#5  0xffffffff8047826f in key_send_wrapper (a=0xffffe68c9d214338, b=0xffffe68c9668e718, c=0x0, d=0x0, e=0xffffe68c974d5700) at /home/wsh/qc/netbsd/sys/netipsec/keysock.c:626
#6  0xffffffff807962a7 in sosend (so=0xffffe68c9d214338, addr=0x0, uio=0xffff978056998e80, top=0xffffe68c9668e718, control=0x0, flags=0, l=0xffffe68c974d5700) at /home/wsh/qc/netbsd/sys/kern/uipc_socket.c:1077
#7  0xffffffff80768182 in soo_write (fp=0xffffe68c9e980700, offset=0xffffe68c9e980700, uio=0xffff978056998e80, cred=0xffffe68c9a488400, flags=1) at /home/wsh/qc/netbsd/sys/kern/sys_socket.c:119
#8  0xffffffff80754376 in do_filewritev (fd=3, iovp=0x7f7fff257840, iovcnt=1, offset=0xffffe68c9e980700, flags=1, retval=0xffff978056998fb0) at /home/wsh/qc/netbsd/sys/kern/sys_generic.c:480
#9  0xffffffff8075403a in sys_writev (l=0xffffe68c974d5700, uap=0xffff978056999000, retval=0xffff978056998fb0) at /home/wsh/qc/netbsd/sys/kern/sys_generic.c:389
...