Comments (3)
実行時エラーのメッセージから、 crossbeam-epochクレート v0.3.1 でエラーが起きていることがわかる。
thread '<unnamed>' panicked at 'attempted to leave type `nodrop::NoDrop<(epoch::Epoch, garbage::Bag)>` uninitialized,
which is invalid', ... /.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.3.1/src/sync/queue.rs:57:28
依存関係
$ cargo tree -i crossbeam-epoch
crossbeam-epoch v0.3.1
└── crossbeam-deque v0.2.0
├── rayon v1.0.3
│ └── bitonic-sorter v0.1.0 (... /rustbook/ch03/bitonic-sorter)
└── rayon-core v1.4.1
└── rayon v1.0.3 (*)
from rustbook.
Cargo.lock
で指定されている crossbeam-epoch のバージョンが古いことが関係している。
cargo update
を実行すると解決した。
$ cargo update
Updating crates.io index
...
Adding crossbeam-channel v0.5.1
Updating crossbeam-deque v0.2.0 -> v0.8.1
Updating crossbeam-epoch v0.3.1 -> v0.9.5
Updating crossbeam-utils v0.2.2 -> v0.8.5
...
Updating rayon v1.0.3 -> v1.5.1
Updating rayon-core v1.4.1 -> v1.9.1
...
$ cargo run --release --example benchmark -- 25
...
sorting 33554432 integers (128.0 MB)
cpu info: 8 physical cores, 8 logical cores
seq_sort: sorted 33554432 integers in 12.119723875 seconds
par_sort: sorted 33554432 integers in 2.450031041 seconds
speed up: 4.95x
おそらく crossbeam-epoch v0.3.1に既知の問題があり、最近のバージョンでは解決しているのだと思われる。
from rustbook.
Windows 10でも同じようにパニックしました。
sorting 33554432 integers (128.0 MB)
cpu info: 2 physical cores, 4 logical cores
seq_sort: sorted 33554432 integers in 65.8484445 seconds
thread '<unnamed>' panicked at 'attempted to leave type `nodrop::NoDrop<(epoch::Epoch, garbage::Bag)>` uninitialized, which is invalid', C:\Users\ykoma\.cargo\registry\src\github.com-1ecc6299db9ec823\crossbeam-epoch-0.3.1\src\sync\queue.rs:57:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\release\examples\benchmark.exe 25` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
rustc 1.56.1 (59eed8a2a 2021-11-01)
binary: rustc
commit-hash: 59eed8a2aac0230a8b53e89d4e99d55912ba6b35
commit-date: 2021-11-01
host: x86_64-pc-windows-msvc
release: 1.56.1
LLVM version: 13.0.0
GitHub上の Cargo.lock
をアップデートしておけば、新規にクローンする人については問題ないと思いますので、後は既にクローンしている人向けに正誤表か README.md
で事前に cargo update
してもらうよう説明を入れておくのがいいのではないかと思いました。
from rustbook.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustbook.