You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: buildkit container loose sync when tgz archive #1143
If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
container stop buildkit; container rm buildkit.
cd Tools; ./run.sh.
edit Dockerfile.sh, change "Hello World" to "Hello World 2".
./run.sh.
After the second run, instead of "Hello World 2" output you'll get "Hello World". This is because fssync breaks in buildkit container. It never updates files anymore. I tried different archives but can't reproduce it nowhere except the one attached.
Interestingly, my superpower is finding bugs, and this is literally the first docker image I've ever built on Apple Containers, and it took me a whole day to figure out the cause and create this bug report.
container system stop
git clone -b send-tar-hash https://github.com/JaewonHur/container
cd container
make all install
container system start
Set custom buildit image as default
container system property set image.builder builder:latest
Hi @JaewonHur! Thank you very much for reaching out in a very prompt manner. I have installed the debug branch. It works when editing Dockerfile.sh, though when I add a new file:
cd ./Tools
touch cool.file
[edit Dockerfile and add "COPY cool.file /root" to it right before "WORKDIR" line]
./run.sh
I am getting an error:
#9 [linux/arm64/v8 stage-1 3/5] COPY cool.file /root
#9 ERROR: failed to calculate checksum of ref cunbz8gtsjeof1ekmio2f58i4::wxnhqk9abuz8zsfyruzak9rx3: "/cool.file": not found
------
> [linux/arm64/v8 stage-1 3/5] COPY cool.file /root:
------
Error: unknown (2): failed to solve: failed to compute cache key: failed to calculate checksum of ref cunbz8gtsjeof1ekmio2f58i4::wxnhqk9abuz8zsfyruzak9rx3: "/cool.file": not found
Warning! Running debug build. Performance may be degraded.
The general schedule is to release the last Monday of every month, so 0.10.0 is planned for Feb 23.
Unless something really odd happens we'll tag a container-builder-shim release once the shim-side fix for this issue is in, and the bump the default builder shim version over here in the container-side PR for the issue, so everything should be running in main today.
Activity
jglogan commentedon Feb 3, 2026
@m-emelchenkov Can you post the contents of a
Dockerfilethat reproduces this issue, along with thecontainercommands you used?Fix apple#1143: Add content hash to build context metadata to prevent…
jglogan commentedon Feb 3, 2026
Also could you try posting a zip archive instead of tgz? If we need to repackage it as tgz, we can do that after downloading.
jglogan commentedon Feb 3, 2026
@m-emelchenkov this made me smile:
I've known others with that superpower. It's a very valuable talent!
Fix apple#1143: Add content hash to build context metadata to prevent…
m-emelchenkov commentedon Feb 3, 2026
Please download zip from Google Drive link — it's a self-contained example to reproduce the bug.
JaewonHur commentedon Feb 3, 2026
Thanks, let me take a look at it.
JaewonHur commentedon Feb 3, 2026
Hi @m-emelchenkov,
I just made a PR for fixing this issue. Could you give a try?
...
m-emelchenkov commentedon Feb 4, 2026
Hi @JaewonHur! Thank you very much for reaching out in a very prompt manner. I have installed the debug branch. It works when editing Dockerfile.sh, though when I add a new file:
I am getting an error:
JaewonHur commentedon Feb 4, 2026
Hi @m-emelchenkov,
Thank you for catching it!
I just updated to hash the metadata also.
Could you please git it another try?
m-emelchenkov commentedon Feb 4, 2026
Hi @JaewonHur! I have tested it and I like it. I tested:
a) changing Dockerfile.sh;
b) adding file;
c) adding directory with file.
All works OK.
Thanks a lot!!!
By the way, when to expect this fix in stable branch? I mean, the probable version number? Because I mainly use Homebrew so will await it there.
jglogan commentedon Feb 4, 2026
Hi @m-emelchenkov, first thank you for catching this!
The general schedule is to release the last Monday of every month, so 0.10.0 is planned for Feb 23.
Unless something really odd happens we'll tag a container-builder-shim release once the shim-side fix for this issue is in, and the bump the default builder shim version over here in the container-side PR for the issue, so everything should be running in main today.
Send tar hash in the first BuildTransfer packet (#1149)
Squashed commit of the following: