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

pimd segfaults in igmp_read() #29

Closed
timeos opened this issue Jan 20, 2014 · 8 comments
Closed

pimd segfaults in igmp_read() #29

timeos opened this issue Jan 20, 2014 · 8 comments

Comments

@timeos
Copy link

timeos commented Jan 20, 2014

Hello

I am using/testing pimd on centos 6.5 x86_64. But pimd suddently started to segfault. Here I have tried to debug it as much as possible:

$ gdb --args /usr/sbin/pimd -c /etc/pimd.conf -f
Starting program: /usr/sbin/pimd -c /etc/pimd.conf -f
pimd: 12:47:37.659 warning - Ignoring eth6:0, same subnet as eth6
pimd: 12:47:37.659 warning - Ignoring eth6:1, same subnet as eth6
pimd: 12:47:37.659 warning - Ignoring eth6:2, same subnet as eth6
pimd: 12:47:37.659 warning - Ignoring eth6:3, same subnet as eth6
pimd: 12:47:37.660 warning - Ignoring eth6:4, same subnet as eth6
pimd: 12:47:37.660 warning - Ignoring eth6:5, same subnet as eth6
pimd: 12:47:37.660 warning - Ignoring eth6:6, same subnet as eth6
^C
Program received signal SIGINT, Interrupt.
0x0000003c300e15c3 in __select_nocancel () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.x86_64
(gdb) b abort
Breakpoint 1 at 0x3c30033f90
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000401fd8 in igmp_read ()
(gdb) bt
#0 0x0000000000401fd8 in igmp_read ()
#1 0x00000000004058bc in main ()

pimd.conf:
rp_address X.X.X.X
phyint eth3.100 disable
phyint eth3.101 disable
phyint eth3.102 disable
phyint eth3.103 disable
phyint eth3.104 disable
phyint eth3.120 disable
phyint eth3.122 disable
phyint eth2.2 disable
phyint eth2.502 disable
phyint eth2.1000 disable
phyint eth1 disable
phyint eth4 disable
phyint eth5 disable
cand_rp time 30 priority 18
cand_bootstrap_router priority 8
group_prefix 224.0.0.0 masklen 4

we are using this centos server as router between corporate subnets and providing upstream internet connectivity. some of interfaces disabled as you can see above.

list of all interfaces:

eth0
eth1
eth4
eth5
eth6
eth2.10
eth2.1000
eth2.11
eth2.12
eth2.2
eth2.502
eth3.100
eth3.101
eth3.102
eth3.103
eth3.104
eth3.120
eth3.122

is something else needed?

thank you

@timeos
Copy link
Author

timeos commented Jan 20, 2014

as I understand from the back trace, pimd crashing in igmp_read() function which is function for handling incoming igmp packets. now I am trying to capture igmp traffic to be able to relate this crash to some specific igmp packet. hopefully tomorrow morning will provide you more info as currently pimd is not crashing, but there are no people in meantime on network.
the second thing is that as you can see from the interface list above, there are two trunk interfaces connected to this router - eth2 and eth3 with carries several VLAN's. but the eth2 and eth3 interfaces directly does not have any IP address assigned - just the vif's. not sure how pimd behaves if it will see some igmp traffic directly on those interfaces (i.e. for traffic without VLAN tag).

@troglobit
Copy link
Owner

I just found this out myself the other day, haven't been able to track it down yet, though.
Thanks for looking in to it! Any help debugging this bugger is really great! TY

@timeos
Copy link
Author

timeos commented Jan 21, 2014

Ok, I think I got the packet: http://www.kis.fri.uniza.sk/~timeos/things/pimd-igmp-problem.pcap
Problem is with IGMPv3 Report messages with multiple Group records.

@troglobit
Copy link
Owner

Ah, new feature. Thanks a bunch, will look into it tonight! :-)

troglobit added a commit that referenced this issue Jan 27, 2014
@troglobit
Copy link
Owner

Seems to work better now. I couldn't reuse the pcap file with tcpreplay, since it was in a "cooked" format without Ethernet headers, but I tested IGMP v3 reports using Ostinato with the same groups as you did.

Please reopen should the problems persist. I'll continue looking into IGMP v3 querier support with v2 fallback now.

@timeos
Copy link
Author

timeos commented Jan 27, 2014

thank you. I will try and let you know.

@timeos
Copy link
Author

timeos commented Jan 29, 2014

just wanted to confirm that this fix definitely helped with stability of pimd daemon. from today's working pimd not crashed even one time.
thank you very much!

@troglobit
Copy link
Owner

Great to hear! :)

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

2 participants