[hipl-dev] [Bug 790679] Re: Minor segfault on failed startup

  • From: Jookos <790679@xxxxxxxxxxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Wed, 01 Jun 2011 07:41:14 -0000

This has been an interesting morning.. At first I couldn't, but I was
starting hipd through sudo which seems (?) to supress those. Now,
running hipd on my laptop logged in as as su (not through sudo) I get it
here also. So yes, I'm able to repeat it on any machine I try it on.

Here's a gdb trace:

GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jookos/projects/hipl/new-lp/hipl/hipd/hipd...done.
(gdb) r
Starting program: /home/jookos/projects/hipl/new-lp/hipl/hipd/hipd 
info(hipd/hipd.c:338@hipd_main): hipd pid=18353 starting
error(hipd/init.c:402@hip_probe_kernel_modules): Unable to load crypto_null!
error(hipd/init.c:1053@hipd_init): Unable to load the required kernel modules!
error(hipd/hipd.c:345@hipd_main): hipd_init() failed!

Program received signal SIGSEGV, Segmentation fault.
netlink_talk (nl=0x0, n=0xbffff0d0, peer=0, groups=0, answer=0x0, junk=0, 
arg=0x0) at lib/tool/nlink.c:251
251         n->nlmsg_seq = seq = ++nl->seq;
(gdb) bt
#0  netlink_talk (nl=0x0, n=0xbffff0d0, peer=0, groups=0, answer=0x0, junk=0, 
arg=0x0) at lib/tool/nlink.c:251
#1  0x080901a4 in hip_xfrm_policy_delete (rth=0x0, hit_our=<value optimized 
out>, hit_peer=0xbffff190, dir=0, 
    hit_prefix=<value optimized out>, preferred_family=<value optimized out>) 
at lib/tool/xfrmapi.c:381
#2  0x0809022a in hip_delete_hit_sp_pair (src_hit=0xbffff190, 
dst_hit=0xbffff180, use_full_prefix=0) at lib/tool/xfrmapi.c:820
#3  0x080902be in hip_delete_default_prefix_sp_pair () at lib/tool/xfrmapi.c:838
#4  0x0805dd8b in hip_exit () at hipd/init.c:882
#5  0x0805afc1 in hipd_main (argc=1, argv=0xbffff394) at hipd/hipd.c:416
#6  main (argc=1, argv=0xbffff394) at hipd/hipd.c:464
(gdb)

-- 
You received this bug notification because you are a member of HIPL core
team, which is subscribed to HIPL.
https://bugs.launchpad.net/bugs/790679

Title:
  Minor segfault on failed startup

Status in Host Identity Protocol for Linux:
  New

Bug description:
  If the kernel module checks during startup fails, hipd segfaults
  instead of exiting nicely. This because the hip_xfrmapi_nl_ipsec
  (lib/tool/xfrmapi.c:49) hasn't been initialized before it is used in
  hip_delete_hit_sp_pair() [which is called on exit].

  quick & dirty patch attached

Other related posts: