Skip to content

sccache-dist: cache can end up somehow corrupted #2122

@lissyx

Description

@lissyx

I have no STR unfortunately, but I was using sccache-dist circa ~0.7.1pre and it was running fine. Recently updated to 0.7.4 and intermittently I end up with mozilla-central failing to perform some link step, at various places.

After long and extensible debugging, one should note the following:

  • need to remove the offending .o from objdir (pppolicy.o for the example)
  • sccache (built only with dist-client feature set) log shows cache it on the same .o

Looking at it closely:

$ ll obj-browser-dbg/security/nss/cmd/lib/lib_sectool/pppolicy.o
-rw-rw-r-- 1 alex alex 704 mars   4 12:52 obj-browser-dbg/security/nss/cmd/lib/lib_sectool/pppolicy.o

On a successfull builds, it's bigger:

$ ll obj-browser-dbg/security/nss/cmd/lib/lib_sectool/pppolicy.o
-rw-r--r-- 1 alexandre alexandre 47K  4 mars  10:02 obj-browser-dbg/security/nss/cmd/lib/lib_sectool/pppolicy.o

The bogus one content's through objdump -tTC shows no symbol

Checking the local sccache content,

$ zipinfo -l ~/.cache/sccache/a/6/a60422ee74380eb71dd55572d4a4fd2c43ad2b611ddbb322c105462e9ec4115e
Archive:  /home/alex/.cache/sccache/a/6/a60422ee74380eb71dd55572d4a4fd2c43ad2b611ddbb322c105462e9ec4115e
Zip file size: 589 bytes, number of entries: 2
-rw-rw-r--  4.6 unx      277 b-      277 stor 80-Jan-01 00:00 obj
-rw-r--r--  4.6 unx      120 b-      120 stor 80-Jan-01 00:00 stderr

277 bytes is obviously weird. Getting rid of this cache key and the matching objdir file, issuing a rebuild:

$ zipinfo -l ~/.cache/sccache/a/6/a60422ee74380eb71dd55572d4a4fd2c43ad2b611ddbb322c105462e9ec4115e
Archive:  /home/alex/.cache/sccache/a/6/a60422ee74380eb71dd55572d4a4fd2c43ad2b611ddbb322c105462e9ec4115e
Zip file size: 14154 bytes, number of entries: 2
-rw-rw-r--  4.6 unx    13842 b-    13842 stor 80-Jan-01 00:00 obj
-rw-r--r--  4.6 unx      120 b-      120 stor 80-Jan-01 00:00 stderr

And no more linkage failure (on this file at least). I have no idea how it got corrupted at first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions