Skip to content

Restoring cached folders results in a clock skew error #3097

@karl-az

Description

@karl-az

Snakemake version
8.20.3

Describe the bug

When using cache: True on a rule with directory output, following the symlink to the .snakemake_timestamp on this line

https://github.com/snakemake/snakemake/blame/e9ce4a3c251d39efb02da0615c3b1210a475867d/snakemake/io.py#L527

results in a clock skew error if the input was files. The mtime of cached files do not follow the symlink ==> snakemake finds the input files are newer than the cached folder.

Logs
WorkflowError in rule A in file /pipeline/Snakefile, line 213:
Output folder_out has older modification time (2024-09-17 03:41:24.386847) than file_in (2024-09-17 10:35:20.241993). This could indicate a clock skew problem in your network and would trigger a rerun of this job in the next execution and should therefore be fixed on system level. System time: 2024-09-17 10:35:20.322207 (rule A, line 69, /pipeline/Snakefile)
Removing output files of failed job generate_salmon_index since they might be corrupted:
folder_out

Minimal example

A rule generating a cached folder with a cached file as input.

Additional context

Suggested (alternative) fixes:

  • Do not follow the symlink. (Not sure if that has implications on other parts)
  • Do not copy .snakemake_timestamp to/from the cache

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions