-
-
Notifications
You must be signed in to change notification settings - Fork 737
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
v1.3.5 segmentation fault #558
Comments
At the moment I'm not sure what the problem is, and it doesn't segfault for me. Can you provide the command line options you are running keepalived with. Also, what flavour of Linux are you running. I might be able to reproduce the problem if I can install the same distro as you are using into a VM). Is a core file being generated when keepalived segfaults? If not, can you run keepalived with the Once you have a coredump can you generate a stack trace so we can see where the problem is occurring. |
I've noticed something slightly strange in the configure output. You appear to have Linux 4.8.0 headers, but the output shows
and they have been included in Linux since versions 4.3 and 4.1 respectively. |
I run keepalived in a docker container from an debian jessie image, here is the docker file that compile keepalived before 1.3.5 eveything was ok :S the command run is: i don't know how to get a coredump or generate a stack trace but i will try as soon as i can :) if you have docker installed to reproduce the problem:
to get the logs:
to open a shell in the container:
remove the container:
I'll try to give you more details |
I did manage to build a docker image and I can reproduce this problem using docker, and the stack trace I get is: This looks like a problem with linking to libipset at runtime. Can you try building keepalived with the At the moment I can't build a docker image, since I keep getting error messages like
even though the system on which docker is running can resolve them. Do you have any suggestions how to resolve this issue? |
It seems that the image build problems were due to the system running docker had lost its IPv4 address, but still had its IPv6 address. |
Using the |
it solved the issue :) thanks for your time and this great software ! |
There is still a problem with the segfault when not configured with --disable-dynamic-linking, so reopening this issue. |
@osixia How do I modify the Dockerfile to use a keepalived.tar.gz from the host system rather than downloading it from keepalived.org? |
The tar.gz can be added in the Dockerfile file directory or in any subdirectory of this directory. doc: https://docs.docker.com/engine/reference/builder/#copy For example in osixia/docker-keepalived we would do something like this:
-> Modify the Dockerfile by adding before the first RUN instruction: -> adjust the RUN instruction to use |
Update: The underlying cause of this problem is that a kernel module cannot be loaded from within a docker container. After the attempt to load the module has failed keepalived then doesn't handle it properly. I have produced some patches that I am still testing to ensure that keepalived handles the problem as best it can. It seems to me though that there is an underlying problem that keepalived cannot operate properly if the kernel modules aren't loaded, but from within the container it has no way of loading them. Is there a way for the container to be configured so that it loads the ip_tables, ip6_tables and xt_set modules before the code in the container is executed? |
Commits f7cd991 and dac727e resolve this for me. As referred to above, the problem was around keepalived when running in a container not being able to load a kernel module, and then not handling the error properly. Is there a way to tell the container that the ip_tables, ip6_tables, xt_set and ip_vs modules need to be loaded, so that it loads them before keepalived is run? |
I note in the Dockerfile that iptables-dev, libipset-dev, libnl-3-dev, libnl-genl-3-dev, libnl-route-3-dev, libnfnetlink-dev and libssl-dev are all left installed in the container. Since these packages include the header files, that seems somewhat unnecessary. |
Sorry for the late reply, It seems that a container can load a module itself, but it must be run in privileged mode and mount /lib/modules host directory. That give to the container a lot of capabilities. thanks, i will remove unnecessary packages in Dockerfile for the next release :) |
Would you be interested to provide an official docker image of keepalived ? I can help to add a Dockerfile in this project and setting up a docker hub account with an automated build so when you create a tag on this github repository the corresponding image will be build and made available on the docker hub. |
sure it would be certainly valuable for lot of users. Please make it happen. |
@osixia your Dockerfile is now merged - many thanks for providing this. Can you now set up the docker hub account with the automated build. Where will the docker image be created, and what is the right way to install and run it (I think this information should be added to the website). |
Hello,
not sure what's the error but i have some segmentation fault:
build config:
Keepalived.conf :
does this come from a missing library with the build ?
Thanks
The text was updated successfully, but these errors were encountered: