Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ParentCache doesn't seem to be generated correctly in circleci #1495

Closed
qy3u opened this issue Aug 18, 2021 · 1 comment
Closed

The ParentCache doesn't seem to be generated correctly in circleci #1495

qy3u opened this issue Aug 18, 2021 · 1 comment

Comments

@qy3u
Copy link
Contributor

qy3u commented Aug 18, 2021

Hi @cryptonemo @dignifiedquire . I just saw the CI test failure on my previous PR #1477 .

After checking the detail of the failure in https://circleci.com/api/v1.1/project/github/filecoin-project/rust-fil-proofs/74927/output/106/0?file=true&allocation-id=611544a9648d5f76edbe1b19-0-build%2F7693C729
I found the error message: 'Error: corrupted cache: /var/tmp/filecoin-parents/v28-sdr-parent-3f0eef38bb48af1f48ad65e14eb85b4ebfc167cec18cd81764f6d998836c9899.cache, expected at least 3584, got 0 bytes'

According to the message, it seems that the test failed because the ParentCache file doesn't generated correctly(or flush to disk) in circleci. Besides,I have checkout to the commit that contains my PR and run the test locally, here is my command: FIL_PROOFS_USE_MULTICORE_SDR=1 RUST_LOG=trace cargo test lifecycle_2kib --no-default-features --features gpu,blst --verbose --package filecoin-proofs --release -- --ignored --nocapture . The test passed on my ubuntu machine.

I don't know a lot about circleci.I don't know in what environment it run these tests, but I saw it generate '/var/tmp/filecoin-parents/v28-sdr-parent-3f0eef38bb48af1f48ad65e14eb85b4ebfc167cec18cd81764f6d998836c9899.cache' and other cache multi times. In my sense, It's a little weired because while generating the cache, It use an exclusive file lock:

with_exclusive_lock(&path.to_path_buf(), |file| {
According to the implemention of the LockFile, it use create_new not create
pub fn open_exclusive<P: AsRef<Path>>(p: P) -> io::Result<Self> {
let f = OpenOptions::new()
.read(true)
.write(true)
.create_new(true)
.open(p)?;
f.lock_exclusive()?;
Ok(LockedFile(f))
}
create_new will failed if the file exists.So, it makes me a little confused that how can these tests passed while multiple generating onto the same path exist (for example generating /var/tmp/filecoin-parents/v28-sdr-parent-b43672d2166d241418debd08d351335b3aa264f729125470f2eeb68f7a11fb20.cache appear 3 times on the log above)? Looking forward to your opinion!

@cryptonemo
Copy link
Collaborator

Resolved by #1496

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

No branches or pull requests

2 participants