Comments (10)
Hmm.. I can't think of when that would happen. I would have to toy with it for a bit.. Can you distill this case into something you could send me so I could observe it on my system?
from node-fibers.
No :(
I cannot reproduce it outside of my app business-logic. Think, the bug somewhere in my Sync.async(), but I don't even guess why it may happen.
If you'll explain me a bit more about this assertion, I will try to distill it.
from node-fibers.
This error would get thrown if you have more fibers active than MAX_POOL_SIZE (120) and two of them finish in an abnormal way. If you want to make this easier to test I'd recommend changing "MAX_POOL_SIZE" to 0 in src/coroutine.cc. The assert you're seeing will only get run if more than 120 fibers return in row. By changing it to 0 you can begin testing without needing a lot of circumstance.
from node-fibers.
Ah, great, got it on single request. Digging.
from node-fibers.
Ok, got it:
require('fibers');
var async = function(fn, callback) {
Fiber(function(){
callback(null, true)
}).run();
}
Fiber(function(){
async(function(err, result){
console.log(result)
});
}).run()
-->
Assertion failed: (delete_me == NULL), function fiber_did_finish, file coroutine.cc, line 112.
/Users/octave/bin/node-fibers: line 34: 2939 Abort trap FIBER_SHIM=1 DYLD_INSERT_LIBRARIES="$FIBERS_ROOT/coroutine.dylib" DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_LIBRARY_PATH="$FIBERS_ROOT"
but
require('fibers');
var async = function(callback) {
Fiber(function(){
var fiber = Fiber.current;
process.nextTick(function(){
fiber.run();
})
yield();
callback(null, true);
}).run();
}
Fiber(function(){
async(function(err, result){
console.log(result)
});
}).run()
-->
true
from node-fibers.
Ah great thanks! It seems that without pooling enabled fibers break down quite easily..
require('fibers');
Fiber(function() {
Fiber(function() {}).run();
}).run();
I should be able to fix this for you soon.
from node-fibers.
Thanks in advance!
from node-fibers.
Fix failure when multiple fibers finish together
If multiple fibers finished one after in an unexpected way there would
be a memory leak because delete_me
would get overwritten. There was an
assertion in place to prevent this scenario, and a case was discovered
which triggers this condition. It was actually quite hard to hit because
the coroutine pool masks this issue very well. The issue was fixed by
deleting dead coroutines as soon as possible, instead of at the next
call to run()
Closed by de187c9
from node-fibers.
Great!
The error was gone. Benchmark succeed.
Thank you!
from node-fibers.
Good to hear :)
from node-fibers.
Related Issues (20)
- Binary is not included when installing fibers on Ubuntu 18.04 with Node 15 HOT 1
- ES6 Module support
- NPM install error for fibers HOT 1
- npm install fibers with error(node v12.15.0) HOT 8
- A Big Thank You HOT 3
- Debian9: Assertion `thread_id_key != 0x7777' failed HOT 2
- C++ compile errors trying to install fibers @3.1.1 HOT 4
- node process blocks if you use fiber in proces.once('exit', ...) callback
- not support python3?
- what to do it does not work on node 16 but I really need this package for the code to work HOT 1
- Latest version 5.0.2 is not tagged. HOT 4
- New NPM version released HOT 1
- latest version 5.0.2 won't install HOT 2
- Maintenance
- Whether the node version v16.x.x is supported HOT 1
- Fails to build on debian testing (required for rocket.chat 😕 ) HOT 4
- node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed. Aborted (core dumped)
- When i start my back-end app then saw this error recently
- Node 20.6.1 support HOT 1
- Cannot find module win32-x64-108\fibers
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 node-fibers.