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

Build and fetch errors with clux/muslrust:1.60.0 #94

Closed
Nutomic opened this issue May 16, 2022 · 18 comments
Closed

Build and fetch errors with clux/muslrust:1.60.0 #94

Nutomic opened this issue May 16, 2022 · 18 comments

Comments

@Nutomic
Copy link

Nutomic commented May 16, 2022

We are suddenly getting some weird failures in our build using clux/muslrust:1.60.0 on cloud.drone.io. First one is this:

+ git fetch --tags

fatal: unable to access 'https://github.com/LemmyNet/lemmy.git/': getaddrinfo() thread failed to start

And second, this:

+ cargo check -p lemmy_api_common
error: could not execute process `rustc -vV` (never executed)

Caused by:
  Operation not permitted (os error 1)

A few days ago the same ci build worked fine, was the image updated to a broken one in the meantime? For now i downgraded to muslrust:1.59.0 and it works fine.

@clux
Copy link
Owner

clux commented May 16, 2022

Ohh. That might be related to the os upgrade yeah. Didn't test that git worked. I'll have a quick look later.

@charlesndalton
Copy link

Also randomly getting "error: could not execute process rustc -vV (never executed)"

@Nutomic
Copy link
Author

Nutomic commented May 20, 2022

FYI it seems the error with getaddrinfo() thread failed to start only happens when running in drone.io (and happens every time). But local builds work fine.

@clux
Copy link
Owner

clux commented May 20, 2022

Ah, thanks a lot for this update. I was struggling to reproduce anything myself.

For anyone with issues with the new jammy version it would be helpful to have a Dockerfile and a link to a how it's built (e.g. github action invocations).

@Nutomic
Copy link
Author

Nutomic commented May 20, 2022

We are using this config for drone.io: https://github.com/LemmyNet/lemmy/blob/main/.drone.yml

You should be able to reproduce by copying it into a new project (or forking), and changing the Docker image version. Then enable cloud.drone.io CI for the repo. The error already happens in the first step at git fetch --tags (example output).

I can also test things if you tell me how to get useful info out of it.

@xD3CODER
Copy link

Same issue for me

@clux
Copy link
Owner

clux commented May 24, 2022

@xD3CODER : you also on drone.io?

not able to do a full test against drone myself since they are no longer accepting new registrations, but can see if i can reproduce via a test case on github actions by emulating what lemmy is doing in gha.

@xD3CODER
Copy link

@xD3CODER : you also on drone.io?

not able to do a full test against drone myself since they are no longer accepting new registrations, but can see if i can reproduce via a test case on github actions by emulating what lemmy is doing in gha.

For me it happens on local Docker build

@clux
Copy link
Owner

clux commented May 24, 2022

@xD3CODER : oh can actually be very helpful. Do you have something public (or a Dockerfile) and what command that is failing (if it's not a git fetch error)?

@clux
Copy link
Owner

clux commented May 24, 2022

Ultimately tests manage to run git fetch fine, both locally and in CI (#100). Possibly this is permission related. The users and groups haven't changed, but maybe caches from a previous container is interacting badly 🤔 maybe cargo clean first? (saw a similar error via rust-lang/cargo#2305)

For the git error, I'm not sure what's exactly is happening there. git was upgraded. Maybe something to do with the git config? People are seeing the same git error in different CI systems. This post suggests setting export SYSTEMD_SECCOMP=0.

@Nutomic
Copy link
Author

Nutomic commented May 24, 2022

@clux I also have a selfhosted drone installation which gave the same errors. Just added your username to allowlist, so you should be able to sign in using Github at https://drone.yerbamate.ml and enable it for your repo.

@xD3CODER
Copy link

@clux The following Dockerfile fails at cargo build with

error: could not execute process `rustc -vV` (never executed)

Caused by:
  Operation not permitted (os error 1)

FROM clux/muslrust:latest as builder
WORKDIR /app
RUN cargo new --bin api
WORKDIR /app/api
RUN cargo build --release

@clux
Copy link
Owner

clux commented May 25, 2022

Thanks both. I have added this trivial dockerfile as a test case in #100 although it is passing both on github actions and locally. My hunch is that this is a security restriction somewhere.

Can't look more until tonight, but any info about setups (id (showing group membership), os setup (selinux / distro)) is helpful in the meantime. Will try the drone setup tonight/tomorrow.

@clux
Copy link
Owner

clux commented May 26, 2022

So... drone actually works fine for me with clux/muslrust:1.61.0; https://drone.yerbamate.ml/clux/muslrust/1/1/3 using simplified drone ci config via 43287ae

@Nutomic
Copy link
Author

Nutomic commented May 27, 2022

Its strange, drone.yerbamate.ml seems to have fixed itself. Dont think i changed anything there except install system updates and reboot. But the same error is still happening on cloud.drone.io.

I opened a thread about this in the Drone Support forum.

@jrd-rocks
Copy link

@xD3CODER I had the same problem, after searching a bit (apt-get upgrade also failed, eg https://askubuntu.com/questions/1408528/apt-update-on-ubuntu22-04-results-in-error-100-on-some-docker-hosts) i found that docker apparently was bugged. I upgraded docker 2.10.7 to 2.10.12 (was docker-ce, i installed docker.io which is in the ubuntu repo) and the problem went away.

@xD3CODER
Copy link

xD3CODER commented Jun 8, 2022

Thank's for your help @jrd-rocks .
I think my problem is due to the fact that I updated my Ubuntu distribution (focal -> jammy) without upgrading Docker

@clux
Copy link
Owner

clux commented Jun 25, 2022

Given the updates on this, going to close this issue. Seems like the new ubuntu incidentally stumbled upon something weird, that's not really our fault.

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

No branches or pull requests

5 participants