Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault #2

Closed
yruss972 opened this issue Mar 26, 2014 · 7 comments
Closed

Segmentation Fault #2

yruss972 opened this issue Mar 26, 2014 · 7 comments

Comments

@yruss972
Copy link

Hi,
I'm trying to setup vippy on a SmartOS base64 13.4.0 zone in the JPC.
Node v0.10.26
When I run vippy, it segfaults in seconds.
It doesn't seem to be dumping a core file any where and I'm not sure how to go about debugging but I'm happy to help debug if you tell me what to do.

Here is the end of truss -wall -rall -f
32744/1: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFFFFFF7, 0x000000FF, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: read(3, " *", 1) = 1
32744/1: sigaction(SIGINT, 0xFFDFF1B0, 0x00000000) = 0
32744/1: write(4, " *", 1) = 1
32744/1: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFFFFFF7, 0x000000FF, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: read(3, " *", 1) = 1
32744/1: sigaction(SIGQUIT, 0xFFDFF1B0, 0x00000000) = 0
32744/1: write(4, " *", 1) = 1
32744/1: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: lwp_unpark(2) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/1: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFFFFFF7, 0x000000FF, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: read(3, " *", 1) = 1
32744/1: sigaction(SIGTERM, 0xFFDFF270, 0x00000000) = 0
32744/1: write(4, " *", 1) = 1
32744/1: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/1: lwp_unpark(2) = 0
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: lwp_unpark(2) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: lwp_unpark(2) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/1: open("/", O_RDONLY) = 11
32744/1: fcntl(11, F_GETFD, 0x00000000) = 0
32744/1: fcntl(11, F_SETFD, 0x00000001) = 0
32744/1: lwp_unpark(2) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/1: so_socket(PF_UNIX, SOCK_STREAM, 0, 0x00000000, SOV_XPG4_2) = 12
32744/1: fcntl(12, F_GETFL) = 2
32744/1: fcntl(12, F_SETFL, FWRITE|FNONBLOCK) = 0
32744/1: fcntl(12, F_GETFD, 0x2D8DC800) = 0
32744/1: fcntl(12, F_SETFD, 0x00000001) = 0
32744/1: bind(12, 0xFFDFF090, 110, SOV_XPG4_2) Err#125 EADDRINUSE
32744/1: close(12) = 0
32744/1: close(-1) Err#9 EBADF
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: lwp_unpark(2) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/2: lwp_park(0x00000000, 0) = 0
32744/1: lwp_unpark(2) = 0
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFFFFFF7, 0x000000FF, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: read(3, " *", 1) = 1
32744/1: sigaction(SIGHUP, 0xFFDFF2C0, 0x00000000) = 0
32744/1: write(4, " *", 1) = 1
32744/1: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: open("/dev/arp", O_RDWR) = 12
32744/1: ioctl(12, I_PUSH, "tcp") = 0
32744/1: ioctl(12, I_PUSH, "udp") = 0
32744/1: ioctl(12, I_PUSH, "icmp") = 0
32744/2: nanosleep(0xFEA3EF20, 0x00000000) = 0
32744/1: putmsg(12, 0xFFDFF0A0, 0x00000000, 0x0008) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: getmsg(12, 0xFFDFF0A0, 0x00000000, 0xFFDFF09C) = 2
32744/1: getmsg(12, 0x00000000, 0xFFDFF0B0, 0xFFDFF09C) = 0
32744/1: brk(0x0166E000) = 0
32744/1: brk(0x017EF000) = 0
32744/1: brk(0x01AF0000) = 0
32744/1: brk(0x020F1000) = 0
32744/1: brk(0x02CF2000) = 0
32744/1: brk(0x044F3000) = 0
32744/1: brk(0x074F4000) = 0
32744/1: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFFFFFF7, 0x000000FF, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/1: mmap(0x00000000, 2088960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFE631000
32744/1: uucopy(0xFFDFE460, 0xFE82EFE8, 24) = 0
32744/1: lwp_create(0xFFDFE570, LWP_DAEMON|LWP_DETACHED|LWP_SUSPENDED, 0xFFDFE8DC) = 3
32744/1: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
32744/3: lwp_create() (returning as new lwp ...) = 0
32744/1: lwp_continue(3) = 0
32744/3: setustack(0xFE830AE8)
32744/1: brk(0x0D4F5000) = 0
32744/3: schedctl() = 0xFF0A1020
32744/2: lwp_park(0x00000000, 0) (sleeping...)
32744/1: brk(0x194F6000) = 0
32744/3: lwp_park(0xFE82EE70, 0) (sleeping...)
32744/1: brk(0x314F7000) = 0
32744/1: brk(0x614F8000) Err#11 EAGAIN
32744/1: brk(0x914F8000) Err#11 EAGAIN
32744/1: Incurred fault #6, g %pc = 0xFFFFFD7FCC1E73A4
32744/1: siginfo: SIGSEGV SEGV_MAPERR addr=0x314F7000
32744/1: Received signal #11, SIGSEGV [default]
32744/1: siginfo: SIGSEGV SEGV_MAPERR addr=0x314F7000

I tried to get something out of gdb:

gdb --args node /opt/local/bin/vippyd -c ./vippy.conf

GNU gdb (GDB) 7.6.1
Copyright (C) 2013 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 "x86_64-sun-solaris2.11".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /opt/local/bin/node...done.
(gdb) run
Starting program: /opt/local/bin/node /opt/local/bin/vippyd -c ./vippy.conf
warning: Cannot initialize thread debugging library: Debugger service failed
warning: Cannot initialize thread debugging library: Debugger service failed
[New LWP 2]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New Thread 2 ]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1 (LWP 1)]
0xfffffd7fff3be9b1 in rtld_db_dlactivity () from /lib/amd64/ld.so.1
(gdb) cont
Continuing.
[New LWP 3 ]

Program received signal SIGSEGV, Segmentation fault.
0xfffffd7fcc1e73a4 in sample_arp_cache(_arp_entry**) ()
from /opt/local/lib/node_modules/vippy/node_modules/ife/build/Release/IFEBinding.node
(gdb) bt
#0 0xfffffd7fcc1e73a4 in sample_arp_cache(_arp_entry**) ()

from /opt/local/lib/node_modules/vippy/node_modules/ife/build/Release/IFEBinding.node
#1 0xfffffd7fcc1e5207 in node::IFE::arpcache(v8::Arguments const&) ()

from /opt/local/lib/node_modules/vippy/node_modules/ife/build/Release/IFEBinding.node
#2 0x000000000075a833 in v8::internal::Builtin_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) ()
#3 0x00003d339ea06362 in ?? ()
#4 0x00003d339ea062c1 in ?? ()
#5 0xfffffd7fffdff4c0 in ?? ()
#6 0xfffffd7fffdff520 in ?? ()
#7 0x00003d339ea92f2e in ?? ()
#8 0x00001224d62308a1 in ?? ()
#9 0x00001224d6286ee1 in ?? ()
#10 0x000032db73f04121 in ?? ()
#11 0x000032db73f04121 in ?? ()
#12 0x000032db73f04121 in ?? ()
#13 0x000032db73f04121 in ?? ()
#14 0x00001224d6230d99 in ?? ()
#15 0x00001224d62777e9 in ?? ()
#16 0xfffffd7fffdff558 in ?? ()
#17 0x00003d339ea92a23 in ?? ()
#18 0x000018aa0cf041c1 in ?? ()
#19 0x000032db73f04121 in ?? ()
#20 0x000032db73f04121 in ?? ()
#21 0x00001224d6230f01 in ?? ()
#22 0x000018aa0cf04189 in ?? ()
#23 0xfffffd7fffdff5c8 in ?? ()
#24 0x00003d339ea65cbf in ?? ()
#25 0x000018aa0cf041c1 in ?? ()
#26 0x000018aa0cf04239 in ?? ()

---Type to continue, or q to quit---
#27 0x000018aa0cf042b1 in ?? ()
#28 0x0000000400000000 in ?? ()
#29 0x00001224d6251e39 in ?? ()
#30 0x000018aa0cf042c9 in ?? ()
#31 0x000012100c2398e1 in ?? ()
#32 0x000018aa0cf042e9 in ?? ()
#33 0x00001224d6209679 in ?? ()
#34 0x00001224d6251e81 in ?? ()
#35 0x00001224d6251e99 in ?? ()
#36 0x00001224d6251ee1 in ?? ()
#37 0xfffffd7fffdff630 in ?? ()
#38 0x00003d339ea122be in ?? ()
#39 0x00001224d6251f41 in ?? ()
#40 0x000012100c2488d9 in ?? ()
#41 0x00001224d6251f69 in ?? ()
#42 0x00001224d6251fb9 in ?? ()
#43 0x00001224d6252001 in ?? ()
#44 0x00001224d6252001 in ?? ()
#45 0x0000000500000000 in ?? ()
#46 0x0000000500000000 in ?? ()
#47 0x00003d339ea12101 in ?? ()
#48 0x0000000600000000 in ?? ()
#49 0x00001224d6252019 in ?? ()
#50 0xfffffd7fffdff6a0 in ?? ()
#51 0x00003d339ea64a70 in ?? ()
#52 0x00001224d6252239 in ?? ()
#53 0x00001224d6252001 in ?? ()
#54 0x00001224d6251e99 in ?? ()
#55 0x00001224d6252239 in ?? ()
#56 0x00001224d6251e99 in ?? ()

---Type to continue, or q to quit---
#57 0x000012100c248921 in ?? ()
#58 0x000032db73f04121 in ?? ()
#59 0x000032db73f04121 in ?? ()
#60 0x00001224d6251f41 in ?? ()
#61 0x00001224d6251fb9 in ?? ()
#62 0x000032db73f46b79 in ?? ()
#63 0x00001224d6252259 in ?? ()
#64 0xfffffd7fffdff6e0 in ?? ()
#65 0x00003d339ea5f8e5 in ?? ()
#66 0x000012100c2488d9 in ?? ()
#67 0x000012100c2497a9 in ?? ()
#68 0x00001224d6251f69 in ?? ()
#69 0x000012100c24a5f1 in ?? ()
#70 0x000032db73f46bf9 in ?? ()
#71 0x00001224d6252291 in ?? ()
#72 0xfffffd7fffdff728 in ?? ()
#73 0x00003d339ea5ba16 in ?? ()
#74 0x000012100c2488d9 in ?? ()
#75 0x00001224d6251f69 in ?? ()
#76 0x00001224d6252349 in ?? ()
#77 0x000012100c24b451 in ?? ()
#78 0x000012100c24b451 in ?? ()
#79 0x000032db73f46ae9 in ?? ()
#80 0x00001224d6252291 in ?? ()
#81 0xfffffd7fffdff7a8 in ?? ()
#82 0x00003d339ea4a6c7 in ?? ()
#83 0x000012100c2488d9 in ?? ()
#84 0x00001224d6251f69 in ?? ()
#85 0xfffffd7fffdff8e0 in ?? ()
#86 0x00003d339ea4a201 in ?? ()

---Type to continue, or q to quit---
#87 0x0000000000000002 in ?? ()
#88 0xfffffd7fffdff7a8 in ?? ()
#89 0x000032db73f04141 in ?? ()
#90 0x00001224d6251f69 in ?? ()
#91 0x000032db73f04121 in ?? ()
#92 0x000032db73f04121 in ?? ()
#93 0x000012100c2488d9 in ?? ()
#94 0x000032db73f46a59 in ?? ()
#95 0x00001224d6252291 in ?? ()
#96 0xfffffd7fffdff7e8 in ?? ()
#97 0x00003d339ea4a08b in ?? ()
#98 0x000032db73f04141 in ?? ()
#99 0x000032db73f04101 in ?? ()
#100 0x000012100c24b471 in ?? ()
#101 0x00001224d6252361 in ?? ()
#102 0x000032db73f46c89 in ?? ()
#103 0x00001224d6252291 in ?? ()
#104 0xfffffd7fffdff850 in ?? ()
#105 0x00003d339ea2e239 in ?? ()
#106 0x00001224d6252361 in ?? ()
#107 0x000032db73f04121 in ?? ()
#108 0x000032db73f04121 in ?? ()
#109 0x000032db73f04121 in ?? ()
#110 0x00001224d6252361 in ?? ()
#111 0x000032db73f04121 in ?? ()
#112 0x00001224d62523a9 in ?? ()
#113 0x000032db73f04121 in ?? ()
#114 0x00001224d62523c1 in ?? ()
#115 0x00001224d6252409 in ?? ()
#116 0x00001224d6252451 in ?? ()

---Type to continue, or q to quit---
#117 0xfffffd7fffdff888 in ?? ()
#118 0x00003d339ea2d7c5 in ?? ()
#119 0x000032db73f06c91 in ?? ()
#120 0x00001224d6252409 in ?? ()
#121 0x000032db73f35259 in ?? ()
#122 0x00001224d6252489 in ?? ()
#123 0x00001224d62524d1 in ?? ()
#124 0xfffffd7fffdff8c8 in ?? ()
#125 0x00003d339ea0d507 in ?? ()
#126 0x00001224d6251e21 in ?? ()
#127 0x000032db73f06c91 in ?? ()
#128 0x00001224d6252489 in ?? ()
#129 0x00003d339ea0d441 in ?? ()
#130 0x0000000600000000 in ?? ()
#131 0x0000000000000000 in ?? ()

(gdb)

@postwait
Copy link
Owner

Are you running the latest from github or the latest from NPM?

Can you try the latest node-ife from github and see if that "fixes" the issue. It may be related an IPv6 issue.

postwait/node-ife#2

@yruss972
Copy link
Author

I installed from NPM and just saw the IPV6 issue on the node-ife repo.
Unplumbing the ipv6 loopback got me farther.
I'll try to install node-ife from github and let you know.

@yruss972
Copy link
Author

I did the following:

  1. removed the ife directory from /opt/local/lib/node_modules/vippy/node_modules
  2. cloned the node-ife project into my homedir
  3. from inside /opt/local/lib/node_modules/vippy/ ran npm install ~/node-ife/
  4. brought the ipv6 loopback back online
    and now I'm getting what look like configuration errors but no segfault.
    Thanks

@yruss972
Copy link
Author

After installing node-ife from Github I was still receiving the following error:
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1023:19)
at listen (net.js:1064:10)
at Server.listen (net.js:1132:5)
at new VippyController (/opt/local/lib/node_modules/vippy/lib/VippyController.js:64:16)
at Object. (/opt/local/lib/node_modules/vippy/vippyd.js:80:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

It seems that the Segfault left the control communication socket /var/run/vippy.socket in a broken state. I deleted the old file and re-ran vippy. It recreated the socket and it looks like it's working.
Hope that helps someone.

@tylerflint
Copy link

This also fixed vippy running inside a SmartOS zone for me. Any reason you'd not release a new version to npm?

Thanks!

@postwait
Copy link
Owner

This is vippy issue, whereas the reported issue in ife.

@tylerflint
Copy link

Good point. Thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants