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

Socket files left over from 'dotnet restore' cause buildkit to fail #115

Euphoric opened this issue Jul 17, 2020 · 4 comments
type:bug Something isn't working


Copy link

Euphoric commented Jul 17, 2020

I'm trying to make an example for .NET Core/C#

I've created sample code based on Java/Scala, but I'm getting extremely confusing error.

radek@radek-ThinkPad-T490s:~/develop/earthly/examples$ earth --no-cache ./dotnet+docker
buildkitd | Found buildkit daemon as docker container (earthly-buildkitd)
context | --> local context ./dotnet
./dotnet+base | --> FROM
./dotnet+base | resolve 0%
./dotnet+base | resolve 100%
context | transferring ./dotnet: 0%
context | transferring ./dotnet: 0%
context | transferring ./dotnet: 100%
./dotnet+base | sha256:c991f9f4493de37a1051238d7a1758d68955d4e0b1261fb3e2a87abe94b1a839 100%
./dotnet+base | sha256:a3a43191d31d4956f69774ee89eeea8ceb47b259f7fe0325a6472774cdb8595b 100%
./dotnet+base | sha256:ac47820464eb6c4cde48d5c77047b25ed5d1c629fea54e58ac6604b37bf37bf3 100%
./dotnet+base | sha256:1d4fe617e70734bb22a0d97301c2b87d36cdd66050d3855f74b69f875ba423a3 100%
./dotnet+base | sha256:a6977770fb5ad9b7535ef867362bb056fa92439a161c2353702440249c2d46dd 100%
./dotnet+base | sha256:b0d5a04473425774ee4803fd9c3a89087a60f332c7da8c137ae29a0a48cfe64d 100%
./dotnet+base | sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c 100%
./dotnet+base | sha256:eff32e99990ceb80c49cb2a8037af3f9b53d2f69763f419018bcc02abc930b23 100%
./dotnet+base | sha256:bb9fc6048a9dd25ab6a26f64809be519e91cca2cf15d4e0cdddd0a8f99a3cd94 100%
./dotnet+base | unpacking 0%
./dotnet+base | unpacking 100%
./dotnet+base | --> WORKDIR /dotnet-example
./dotnet+build | --> COPY [src] src
./dotnet+build | --> RUN [dotnet publish src/HelloEarthly -o publish]
./dotnet+build | Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
./dotnet+build | Copyright (C) Microsoft Corporation. All rights reserved.
./dotnet+build | 
./dotnet+build |   Determining projects to restore...
./dotnet+build |   Restored /dotnet-example/src/HelloEarthly/HelloEarthly.csproj (in 146 ms).
./dotnet+build |   HelloEarthly -> /dotnet-example/src/HelloEarthly/bin/Debug/netcoreapp3.1/HelloEarthly.dll
./dotnet+build |   HelloEarthly -> /dotnet-example/publish/
./dotnet+build | --> SAVE ARTIFACT publish ./dotnet+build/publish
./dotnet+docker | --> COPY ([]) ./dotnet+build/publish .
Error: solve side effects: build error group: solve: failed to solve: rpc error: code = Unknown desc = failed to compute cache key: failed to create hash for /tmp/PiDh3VmOno5IZWwRHV_oNjZ+jcby9Rt5wuWKeDyQUJY: archive/tar: sockets not supported

My OS is Ubuntu 18
Earthly version 0.1.3
When running the Java and Scala examples, nothing is wrong and the build succeeds.

My code is here : Euphoric@da9d9cc

@vladaionescu vladaionescu added the type:bug Something isn't working label Jul 17, 2020
Copy link

alexcb commented Jul 17, 2020

Thanks for giving earthly a try and reporting the issue @Euphoric

I opened up a PR against your example in Euphoric#2

I too was rather confused by the error as none of the files being copied over were sockets. After some digging around I found two socket files which were left over by the dotnet publish command under /tmp".

The underlying error is being returned by buildkit; we'll investigate if we can make it more clear to the user which socket file was found.

Thanks again for the feedback and creating a dotnet example.

Copy link
Contributor Author

Euphoric commented Jul 17, 2020

@alexcb Thanks for figuring it out!

I'll get to this next monday.

A better error message would defnitely be helpful.

You can close this issue, as I have my workaround and if you want to create another issue for the better error message fix.

Copy link

vladaionescu commented Jul 17, 2020

FTR, the workaround is appending the following:

&& find / -type s | xargs rm

to any command that may be creating socket files. This is needed until the underlying buildkit issue is addressed.

@Euphoric Euphoric changed the title Confusing error Socket files left over from 'dotnet restore' cause buildkit to fail Jul 20, 2020
Copy link

alexcb commented Jul 24, 2020

The underlying issue has been fixed in buildkit; see moby/buildkit#1581 and we've updated our version of buildkit in #135 and finally updated the example to remove the workaround #137

This fix has been released under

@alexcb alexcb closed this as completed Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type:bug Something isn't working
None yet

No branches or pull requests

3 participants