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

oor crashes with segmentation fault #40

Open
v0101 opened this issue Aug 22, 2019 · 6 comments
Open

oor crashes with segmentation fault #40

v0101 opened this issue Aug 22, 2019 · 6 comments

Comments

@v0101
Copy link

v0101 commented Aug 22, 2019

We are using the newest version of oor. On one machine it is working, but on another one it always crashes. The only difference we found so far is that the IP addresses are different.
I have the config and log files attached.
oor.zip

@albert-lopez
Copy link
Member

Could you send me a back trace of the segmentation fault using valgrind? Which version are you using? master or testing?

@v0101
Copy link
Author

v0101 commented Sep 2, 2019

Hey,
Thanks for your answer.
We are using version 1.3
The information I can give right now is:
Program terminated with signal 11, Segmentation fault.  #0  0x000000000044aef6 in sockmstr_wait_on_all_read (m=0x142a190) at lib/sockets.c:255 255             FD_SET(sit->fd, &m->readfds);
Is that of any help? If not, we must try to get valgrind to the system.

BR

@albert-lopez
Copy link
Member

I have tried to reproduce the error without success and according to the provided data, the segmenetion is produced in a part of the code very hard to debug.
Could you give me some more details about the platform you are using? (linux, openWrt, cpu architecture ...) . Is the crash produced always? Does it crash If you start the machine isolated from other LISP devices (no packet received from other devices)
In the oor.c file, can you replace:

#if !defined(ANDROID) && !defined(OPENWRT)
/* Initialize API for external access */
oor_api_init_server(&oor_api_connection);

for (;;) {
    sockmstr_wait_on_all_read(smaster);
    sockmstr_process_all(smaster);
    oor_api_loop(&oor_api_connection);
}

#else
for (;;) {
sockmstr_wait_on_all_read(smaster);
sockmstr_process_all(smaster);
}
#endif

By

for (;;) {
    sockmstr_wait_on_all_read(smaster);
    sockmstr_process_all(smaster);
}

This disable the netconf part of OOR and simplify the scenario.

@v0101
Copy link
Author

v0101 commented Sep 3, 2019

The system is a RHEL 6. Weird thing is, that on one system it is working, on the other one it isn't. So I guess it has to do something with the network configuration. But there we also couldn't find any difference.
valgrind-leak-check.log
valgrind-track-origins.log
valgrind.log

@albert-lopez
Copy link
Member

I see a strange thing in your LOGs line 71. It is trying to open an IPv6 socket but it fails. Could you try to run oor using the parameter -a 4? This will force to only use IPv4. Let me know if with this option the system also crashes or not

@v0101
Copy link
Author

v0101 commented Sep 9, 2019

With the option -a 4 it is working. There is no IPv6 anywhere in the configuration, so is still weird, since on the other machine it is working, with, which looks like, the same configuration. There IPv6 is also disabled.

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