Comments (5)
Not sure what caused the deadlock as it's just a streamlined implementation of the legacy channels, could it have been false sharing?
Anyway, unused after #21 and e41c927
from weave.
Is this deadlock reproducible with the C version?
from weave.
No it's only my own channel reimplementation.
When I switched to the 1-to-1 reimplementation of your Nim channels (04c355d) it disappeared.
from weave.
So I manage to get it again while changing the implementation of the MPSC queue to yet another one lock-free queue (suitable for batching for my memory manager)
The main difference is that it uses compare-and-swap which are more heavy on cache lines so maybe behave worse under contention. Steal backoff might help here
It's probably a livelock and not a deadlock, it may be unrelated but it's very annoying nonetheless.
It happens reliably even on just a hello world
Lines 138 to 151 in e3a1f29
The main thread always get stucks in this loop in the runtime barrier
Lines 124 to 138 in 9f4abc4
adding some printing in declining or the steal request relay (or uncommenting the debugTermination log) will unstuck the runtime for a 20% perf loss :P.
Lines 79 to 89 in 9f4abc4
Lines 96 to 108 in 9f4abc4
from weave.
False alarm, it's my queue that has an issue, I can reproduce the bug in an isolated bench.
I think I have an ABA problem with the producers' side using exchange and the consumer side using compare-exchange.
from weave.
Related Issues (20)
- parallelFor has arguments that do not fit in the parallel tasks data buffer HOT 9
- a plea for an easier to understand error message HOT 3
- Recent Nim makes Weave crash HOT 8
- affinity_posix should get this patch (for Android/Termux)
- @mratsim
- Cache misses (much) worse for page-aligned (e.g. power of two) accesses
- Raytracing example doesnt compile with threads HOT 1
- UX: auto-transform captured seq to ptr UncheckedArray behind the scenes HOT 3
- functions with no arguments fail parsing HOT 1
- Is there a manual or tutorial for weave? HOT 2
- Weave doesn't compile on MacOS with arm64 HOT 2
- Error: undeclared identifier: 'gebb_ukernel_int_x86_AVX512' HOT 2
- Feature Request: Cores as init parameter, respect core perf levels
- Vastly simplify and accelerate memory management. HOT 1
- Use Lnear Congruential Generator to generate work-stealing permutation HOT 1
- randomly "off values" HOT 2
- error: special identifier '_' ignored HOT 4
- Can Weave spawn a thread that sends a Channel message to the main channel without blocking the main thread? HOT 3
- "nimble install weave" fails on Ubuntu 18 HOT 3
- Examples in README.md do not compile HOT 5
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 weave.