Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@eigenraven
Copy link
Collaborator

This fixes a rare "race" condition I encountered when the gid counter overflows due to many messages flowing through the system, and two executors collide with the same id. With this fix the executor IDs are not used for comparing them anymore, just for debug printing where the collisions don't matter for the correctness of the runtime (though the gids should probably be 64-bit integers and include some sort of configurable machine id, it doesn't take that long to overflow 32-bit counters - especially as one gid counter is shared to generate IDs for all kinds of objects, including messages).

The pointers are guaranteed to be the same because they're both generated from the same shared_ptr pointee address, adjusted for the position of the Executor* vtable.

@Shillaker Shillaker merged commit 7578073 into faasm:master Sep 28, 2021
@eigenraven eigenraven deleted the fix-executor-cleanup branch September 28, 2021 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants