Comments (5)
Bisecting nightly
releases shows that the issue appears when upgrading RustyHermit from nightly-2021-03-22
to nightly-2021-03-23
as demonstrated in #134. I'll have to investigate, what happened in that night (rust-lang/rust@f826641...5d04957).
from hermit-rs.
Ah, indeed code related to network changed, in hermit-os/kernel@5f2d3b1...44eaa9f, but GitHub does not show the diff nicely.
Edit: Nevermind, I was just confused by the force-push in libhermit and git diff... I have no idea, what could be the cause of this issue. 🤔
from hermit-rs.
I found the cause. Mutable noalias has been enabled by default in rust-lang/rust@39ed643. Reverting to the old behavior via RUSTFLAGS="-Zmutable-noalias=no"
works around the issue and network works again, but can't be considered a proper fix.
Mutable noalias has enabled further optimizations of the reads and writes in ComCfg::dev_features
, even in debug mode. Making them volatile, as they should be, solves the issue. Inserting debugging prints of self.com_cfg.device_feature_select
does too, making this a prime example of a Heisenbug.
I'll look into proper abstractions for volatile memory access, so we can prevent this from happening in other places as well.
from hermit-rs.
May be gnoliyil/fuchsia@914bdaf helps to understand the problem.
from hermit-rs.
Thanks for the Link!
I think, we are not facing a miscompilation here though. A fix for that specific issue is in place since nightly-2021-05-14
(rust-lang/rust#84958 (comment), we are on nightly-2021-05-19
). Also, our issue also exists in debug
.
In the long term we should make sure to make all memory-mapped I/O accesses volatile, but to get things working again as soon as possible, we might want to disable mutable-noalias
until we have a proper fix. I'll create tracking issues and PRs.
from hermit-rs.
Related Issues (20)
- hello_world demo, missing symbols HOT 3
- Request for info: running hermit-based applications on top of Xen HOT 3
- Move cmath to hermit-builtins HOT 1
- rusty-demo fails to build on windows HOT 7
- failed to run rusty-hermit on QEMU qemu-system-aarch64 HOT 1
- Where do we mention that RustyHermit supports `aarch64`?
- Hermit doesn't work on aarch64: rusty-loader can't find DTB for aarch64 HOT 1
- Include `tcp` in the default features of `hermit-sys`
- hermit-abi 0.3.2 git tag and yanking explanation HOT 4
- Add platform support document to Rust docs HOT 1
- Enable generate-link-to-definition
- Support automatic rebuilds for path dependencies of kernel HOT 1
- Can't build with khronos-egl as dependency HOT 3
- Become a Tier 2 Rust target
- Newer kernel submodule required for RISC-V support HOT 4
- Compilation with Hermit dependency as part of a workspace fails HOT 1
- Networking config file HOT 4
- Benchmarking HOT 8
- Hermit randomness API
- Unable to read directory entries
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 hermit-rs.