Hi tech@,

I've been using iked for some weeks to tunnel my laptop to home over 3G.
Sunday I upgraded my laptop to the latest snapshot; previous upgrade was
about 2 or 3 weeks ago. When I started iked, it crashed randomly, as in
one time it runs just fine and completes the handshake, the other it
crashes before even sending the first packet.

I ran "ktrace -di /sbin/iked" and kdump'd the resulting file. Of the 5
processes, 4 finished by calling exit(0), one was terminated on a
SIGSEGV. As it is also the only one that do stuff on /var/run/iked.sock,
it is the control process. I repeated the above ktrace 4 times and got
consistent results: SIGSEGV'd control process.

I'll keep the hunt going, but I am not sure how long this will take nor
how much time I'll have to spare, so here is the control process kdump.

Cheers,

--
Vincent


 17866 iked     RET   fork 0
 17866 iked     CALL  getpid()
 17866 iked     RET   getpid 17866/0x45ca
 17866 iked     CALL  setpgid(0,0x45ca)
 17866 iked     RET   setpgid 0
 17866 iked     CALL  socket(PF_LOCAL,0x1<SOCK_STREAM>,0)
 17866 iked     RET   socket 15/0xf
 17866 iked     CALL  unlink(0x631ceb)
 17866 iked     NAMI  "/var/run/iked.sock"
 17866 iked     RET   unlink 0
 17866 iked     CALL  umask(0117<S_IXUSR|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH>)
 17866 iked     RET   umask 18/0x12
 17866 iked     CALL  bind(0xf,0x7f7ffffc8660,0x6a)
 17866 iked     STRU  struct sockaddr { AF_LOCAL, "/var/run/iked.sock" }
 17866 iked     NAMI  "/var/run/iked.sock"
 17866 iked     RET   bind 0
 17866 iked     CALL  umask(022<S_IWGRP|S_IWOTH>)
 17866 iked     RET   umask 79/0x4f
 17866 iked     CALL  chmod(0x631ceb,0660<S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP>)
 17866 iked     NAMI  "/var/run/iked.sock"
 17866 iked     RET   chmod 0
 17866 iked     CALL  fcntl(0xf,F_GETFL)
 17866 iked     RET   fcntl 2
 17866 iked     CALL  fcntl(0xf,F_SETFL,0x6<O_RDWR|O_NONBLOCK>)
 17866 iked     RET   fcntl 0
 17866 iked     CALL  chroot(0x631d39)
 17866 iked     NAMI  "/etc/iked/"
 17866 iked     RET   chroot 0
 17866 iked     CALL  chdir(0x6669f2)
 17866 iked     NAMI  "/"
 17866 iked     RET   chdir 0
 17866 iked     CALL  __sysctl(2.3,0x7f7ffffc8640,0x7f7ffffc8630,0,0)
 17866 iked     RET   __sysctl 0
 17866 iked     CALL  setgroups(0x1,0x9bddb4)
 17866 iked     RET   setgroups 0
 17866 iked     CALL  setresgid(0x65,0x65,0x65)
 17866 iked     RET   setresgid 0
 17866 iked     CALL  setresuid(0x65,0x65,0x65)
 17866 iked     RET   setresuid 0
 17866 iked     CALL  clock_gettime(CLOCK_MONOTONIC,0x7f7ffffc86c0)
 17866 iked     STRU  struct timespec { 150798.566033906 }
 17866 iked     RET   clock_gettime 0
 17866 iked     CALL  clock_gettime(CLOCK_MONOTONIC,0x7f7ffffc8690)
 17866 iked     STRU  struct timespec { 150798.566077766 }
 17866 iked     RET   clock_gettime 0
 17866 iked     CALL  issetugid()
 17866 iked     RET   issetugid 0
 17866 iked     CALL  kqueue()
 17866 iked     RET   kqueue 16/0x10
 17866 iked     CALL  getpid()
 17866 iked     RET   getpid 17866/0x45ca
 17866 iked     CALL  getentropy(0x7f7ffffc8550,0x28)
 17866 iked     RET   getentropy 0
 17866 iked     CALL  issetugid()
 17866 iked     RET   issetugid 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGINT,0x7f7ffffc85f0,0x2817fb150)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_DFL, mask=0<>, flags=0<> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGTERM,0x7f7ffffc85f0,0x2817fcc30)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_DFL, mask=0<>, flags=0<> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGCHLD,0x7f7ffffc85f0,0x2817fa980)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_DFL, mask=0<>, flags=0<> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGHUP,0x7f7ffffc85f0,0x2817fc530)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_DFL, mask=0<>, flags=0<> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGPIPE,0x7f7ffffc85f0,0x2817fc080)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_IGN, mask=0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  kevent(0x10,0x7f7ffffc8640,0x1,0,0,0x7f7ffffc8660)
 17866 iked     STRU  struct timespec { 0 }
 17866 iked     RET   kevent 0
 17866 iked     CALL  sigaction(SIGUSR1,0x7f7ffffc85f0,0x2817fbb10)
 17866 iked     STRU  struct sigaction { handler=0x42f6f0, mask=~0<>, 
flags=0x2<SA_RESTART> }
 17866 iked     STRU  struct sigaction { handler=SIG_DFL, mask=0<>, flags=0<> }
 17866 iked     RET   sigaction 0
 17866 iked     CALL  close(0x3)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0x5)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0x7)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0x4)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0x9)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0xb)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0x6)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0xa)
 17866 iked     RET   close 0
 17866 iked     CALL  close(0xd)
 17866 iked     RET   close 0
 17866 iked     CALL  
mmap(0,0x11000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
 17866 iked     RET   mmap 12732518400/0x2f6ead000
 17866 iked     CALL  getpid()
 17866 iked     RET   getpid 17866/0x45ca
 17866 iked     CALL  
mmap(0,0x11000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
 17866 iked     RET   mmap 8750329856/0x2098f7000
 17866 iked     CALL  getpid()
 17866 iked     RET   getpid 17866/0x45ca
 17866 iked     CALL  
mmap(0,0x11000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
 17866 iked     RET   mmap 10185412608/0x25f191000
 17866 iked     CALL  getpid()
 17866 iked     RET   getpid 17866/0x45ca
 17866 iked     CALL  listen(0xf,0x5)
 17866 iked     RET   listen 0
 17866 iked     CALL  open(0x62e0f8,0x30000<O_RDONLY|O_CLOEXEC|O_DIRECTORY>)
 17866 iked     NAMI  "ca/"
 17866 iked     RET   open 3
 17866 iked     CALL  fstat(0x3,0x7f7ffffc8140)
 17866 iked     STRU  struct stat { dev=1040, ino=2832962, mode=drwxr-xr-x , 
nlink=2, uid=0, gid=0, rdev=11344026, atime=1416911338.536154208, 
mtime=1416698827, ctime=1416759904.740512344, size=512, blocks=4, 
blksize=16384, flags=0x0, gen=0x0 }
 17866 iked     RET   fstat 0
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 64/0x40
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 0
 17866 iked     CALL  close(0x3)
 17866 iked     RET   close 0
 17866 iked     CALL  open(0x62e135,0x30000<O_RDONLY|O_CLOEXEC|O_DIRECTORY>)
 17866 iked     NAMI  "crls/"
 17866 iked     RET   open 3
 17866 iked     CALL  fstat(0x3,0x7f7ffffc8140)
 17866 iked     STRU  struct stat { dev=1040, ino=2832964, mode=drwxr-xr-x , 
nlink=2, uid=0, gid=0, rdev=11349631, atime=1416911338.536154208, 
mtime=1416698827, ctime=1416759904.740512344, size=512, blocks=4, 
blksize=16384, flags=0x0, gen=0x0 }
 17866 iked     RET   fstat 0
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 64/0x40
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 0
 17866 iked     CALL  close(0x3)
 17866 iked     RET   close 0
 17866 iked     CALL  
mmap(0,0x1000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
 17866 iked     RET   mmap 12284043264/0x2dc2fa000
 17866 iked     CALL  mprotect(0x2a3776000,0x1000,0<PROT_NONE>)
 17866 iked     RET   mprotect 0
 17866 iked     CALL  open(0x62e152,0x30000<O_RDONLY|O_CLOEXEC|O_DIRECTORY>)
 17866 iked     NAMI  "certs/"
 17866 iked     RET   open 3
 17866 iked     CALL  fstat(0x3,0x7f7ffffc8140)
 17866 iked     STRU  struct stat { dev=1040, ino=2832963, mode=drwxr-xr-x , 
nlink=2, uid=0, gid=0, rdev=11344639, atime=1416911338.536154208, 
mtime=1416698827, ctime=1416759904.740512344, size=512, blocks=4, 
blksize=16384, flags=0x0, gen=0x0 }
 17866 iked     RET   fstat 0
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 64/0x40
 17866 iked     CALL  getdents(0x3,0x23680d000,0x4000)
 17866 iked     RET   getdents 0
 17866 iked     CALL  close(0x3)
 17866 iked     RET   close 0
 17866 iked     PSIG  SIGSEGV SIG_DFL code SEGV_MAPERR<1> addr=0x1eac trapno=6

Attachment: pgpWBxIe31jcI.pgp
Description: PGP signature

Reply via email to