Skip to content

Conversation

KristofferC
Copy link
Member

@Keno
Copy link
Member

Keno commented Sep 26, 2025

Could we use atime for this rather than mtime (still explicitly bumping the atime here in case the fs is mounted with noatime). Would that fix the OP? Does docker invalidate layers for atime changes?

@KristofferC
Copy link
Member Author

KristofferC commented Sep 26, 2025

Good idea, however:

julia/src/sys.c

Lines 199 to 207 in 23cfff2

/*
// atime is stupid, let's not support it
JL_DLLEXPORT double jl_stat_atime(char *statbuf)
{
uv_stat_t *s;
s = (uv_stat_t*)statbuf;
return (double)s->st_atim.tv_sec + (double)s->st_atim.tv_nsec * 1e-9;
}
*/

Although see #59665.

@vtjnash
Copy link
Member

vtjnash commented Sep 26, 2025

Could we use atime for this rather than mtime

I don't know if that will safely work. We need to read these files to see if they have applicable content, and that will immediately also muck up atime. The comment about atime being stupid seems still quite apropos.

@Keno
Copy link
Member

Keno commented Sep 26, 2025

We're just using a time to tell us which file worked most recently though

@vtjnash
Copy link
Member

vtjnash commented Sep 26, 2025

Right, but atime won't tell you that, since it is the most recent time it was examined and possibly failed, not the most recent time it worked

@Keno
Copy link
Member

Keno commented Sep 26, 2025

Well, we could set O_NOATIME on the read side, but regardless my question was primarily about the docker behavior. My concern is that is behavior is not particularly general. As soon as you build a docker container with a bunch of precompile files, the same issue will happen to them in the next layer. I don't think there's anything special about the stdlib files with respect to this, so it seems a bit weird to special case them.

@vtjnash
Copy link
Member

vtjnash commented Sep 26, 2025

we could set O_NOATIME on the read side

I had the same thought, but it is only on linux, and even so it gets ignored by various filesystems

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

Successfully merging this pull request may close these issues.

Bundled compile cache modified if writeable
3 participants