Skip to content

This is a minimal example for reproducing bug #347

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

vmx/cbindgen-expand-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cbindgen-expand-bug

This is a minimal example for reproducing Bug #347.

I ran into #347 on a different repository. I now tried to reproduce it with a minimal example. The problem seems to have to do with locking files.

Even if you let the expansion happen in a different directory, there seems to be a locking deadlock.

$ lslocks|grep cargo
cargo           10199  FLOCK       WRITE  0          0          0 /home/vmx/src/rust/cbindgen/hello/target/debug/.carg -lock
cargo           12301  FLOCK       WRITE* 0          0          0 /home/vmx/src/rust/cbindgen/hello/expanded/debug/.cargo-lock
cargo           10204  FLOCK       WRITE  0          0          0 /home/vmx/src/rust/cbindgen/hello/expanded/debug/.cargo-lock

Process 12301 tries to get the lock, but can't.

This is easily repoducible with this repo. Just run it like that:

$ CARGO_EXPAND_TARGET_DIR=./expanded cargo build

   Compiling cbindgen-expand-bug v0.1.0 (/home/vmx/src/rust/cbindgen/cbindgen-expand-bug)
    Building [====================================================>  ] 101/103: cbindgen-expand-bug(build)

You can now start to watch the locks:

$ watch 'lslocks|grep cargo
Every 2.0s: lslocks|grep cargo                                                           gene: Fri Jun 28 17:16:15 2019

cargo           29961  FLOCK       WRITE* 0          0          0 /tmp/cbindgen-expand-bug/expanded/debug/.cargo-lock
cargo           27746  FLOCK       WRITE  0          0          0 /tmp/cbindgen-expand-bug/expanded/debug/.cargo-lock
cargo           25472  FLOCK       WRITE  0          0          0 /tmp/cbindgen-expand-bug/target/debug/.cargo-lock

In the beginning you will only see a WRITE lock on the target directory. Next will be the lock on expanded and finally a second WRITE lock will appear on expanded.

License

Licensed under either of

at your option.

About

This is a minimal example for reproducing bug #347

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages