Skip to content

fix(aws): stop s3fs caching missing FC/kernel/envd objects - #3510

Closed
tomassrnka wants to merge 2 commits into
mainfrom
fix/g1-s3fs-noobj
Closed

tomassrnka wants to merge 2 commits into
mainfrom
fix/g1-s3fs-noobj

Conversation

@tomassrnka

@tomassrnka tomassrnka commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Linear: https://linear.app/e2b/issue/EN-386

Broken: on AWS BYOC hosts, an FC version (or kernel/envd build) uploaded to S3 after a host had already tried to read it stayed invisible on that host — sandboxes kept failing; only known workaround was unmount → clean dir → remount.

Root cause: all four s3fs mounts in start-client.sh pass -o enable_noobj_cache, which is a no-op — negative ("does not exist") caching is the s3fs default and the real toggle is -o disable_noobj_cache. Every missed lookup is remembered for stat_cache_expire (default 900 s), and these buckets are written out-of-band, so a cached miss outlives the upload by up to 15 minutes.

Fix: replace (not append — later flag wins) enable_noobj_cache with disable_noobj_cache on the four mounts.

Repro (MinIO + s3fs 1.93, the Ubuntu 24.04 base-AMI version, exact production flags): miss → upload → read: production flags not found for >100 s; flag removed, identical (confirms the no-op); stat_cache_expire=20 visible after ~40 s (confirms the expiry is the bound); disable_noobj_cache visible after ~1 s. With no prior lookup the object is always visible immediately, isolating the negative cache as the cause.

Verification: the disable_noobj_cache run above is the passing case. shellcheck -S warning reports only the pre-existing SC2155 on line 43.

The four s3fs mounts passed "-o enable_noobj_cache", which is the s3fs
default rather than an override, so negative lookups were cached for
stat_cache_expire (900s). A host that looked for a Firecracker/kernel/envd
version before it was uploaded kept returning ENOENT for 15 minutes after
the upload landed, and the only workaround was to unmount and remount.

Pass "-o disable_noobj_cache" instead so a missed lookup is retried against
S3 on the next access. Positive stat cache entries are unaffected.
@cla-bot cla-bot Bot added the cla-signed label Aug 1, 2026
@cursor

cursor Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Boot-time mount option change only; slightly more S3 traffic on repeated misses but fixes correctness for pipeline uploads.

Overview
Fixes BYOC hosts failing to see new envd, kernel, Firecracker, and busybox objects on S3 after an earlier miss on that host. The boot script now passes disable_noobj_cache on those four s3fs mounts instead of enable_noobj_cache, which did not turn off negative caching, so lookups could stay “missing” for up to the default stat_cache_expire window. A short comment explains why negative caching is disabled for out-of-band bucket writes.

Reviewed by Cursor Bugbot for commit ed2d6bb. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment on lines +78 to +85
#
# disable_noobj_cache: s3fs caches "this object does not exist" answers for
# stat_cache_expire (900s by default). These buckets are written out-of-band -
# a new Firecracker/kernel/envd version is uploaded after a host has already
# looked for it - so a cached miss makes the freshly uploaded object invisible
# on that host until the entry expires or the mount is recreated.
# Note that "enable_noobj_cache" is the s3fs default, so passing it was a no-op;
# "disable_noobj_cache" is the option that actually turns the negative cache off.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove slop comment

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jakubno
jakubno force-pushed the fix/g1-s3fs-noobj branch from 63effc2 to ed2d6bb Compare August 3, 2026 13:33
@tvi tvi closed this Aug 4, 2026
@ValentaTomas
ValentaTomas deleted the fix/g1-s3fs-noobj branch September 11, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants