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

Docker exited : ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. #412

Closed
hgb1995 opened this issue Oct 27, 2022 · 1 comment

Comments

@hgb1995
Copy link

hgb1995 commented Oct 27, 2022

Hi,

I want to run the containers with libfaketime. According to this link(https://hub.docker.com/r/trajano/ubuntu-faketime), I understand this flowing these steps.

  1. Add environment to docker-file
    "FROM alpine
    COPY --from=trajano/alpine-libfaketime /faketime.so /lib/faketime.so
    ENV LD_PRELOAD=/lib/faketime.so
    "

    Note : For Java, I attached that DONT_FAKE_MONOTONIC=1
  2. Then build dockerfile
    "docker build -f fakedemo.Dockerfile. -t fakedemo"
  3. Add specific faketime configuration as the environment when running docker
    "docker run --rm -e FAKETIME=+15d fakedemo date"

But some containers do not run successfully. When the 1 and 2 steps apply to the docker file, all docker files are built successfully. But when I run the container, the container immediately exited. According to the docker log:

ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

I don't understand, I try some solutions from forum sites. But I can't solve the problem. Do you have any ideas about this problem?

Thank you,

@wolfcw
Copy link
Owner

wolfcw commented Oct 27, 2022

I did not build that Docker image and don't know how current / up-to-date it is.

The error you get indicates that libasan is involved. libfaketime apparently does not work in conjunction with a few other preloaded libraries, such as jemalloc and libasan (see #130 and #365). There is no known solution for that, but it's not related to Docker.

Usually, you should try to get your program working with libfaketime on a regular system, and then it should also work within a container. I don't think your problem is related to Docker / running within a container at all.

@wolfcw wolfcw closed this as completed Jan 28, 2023
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