Skip to content

Fix bug with module GIL being released prematurely#8061

Merged
oranagra merged 1 commit intoredis:unstablefrom
oranagra:fix_gil_race
Nov 22, 2020
Merged

Fix bug with module GIL being released prematurely#8061
oranagra merged 1 commit intoredis:unstablefrom
oranagra:fix_gil_race

Conversation

@oranagra
Copy link
Member

This is hopefully usually harmles.
The server.ready_keys will usually be empty so the code after releasing
the GIL will soon be done.
The only case where it'll actually process things is when a module
releases a client (or module) blocked on a key, by triggering this NOT
from within a command (e.g. a timer event).

This bug was introduced in redis 6.0.9, see #7903

This is hopefully usually harmles.
The server.ready_keys will usually be empty so the code after releasing
the GIL will soon be done.
The only case where it'll actually process things is when a module
releases a client (or module) blocked on a key, by triggering this NOT
from within a command (e.g. a timer event).

This bug was introduced in redis 6.0.9, see #7903
@oranagra oranagra requested review from guybe7 and yossigo November 17, 2020 21:40
@oranagra oranagra added the state:to-be-merged The PR should be merged soon, even if not yet ready, this is used so that it won't be forgotten label Nov 17, 2020
@oranagra oranagra merged commit e6fa473 into redis:unstable Nov 22, 2020
@oranagra oranagra deleted the fix_gil_race branch November 22, 2020 12:00
@oranagra oranagra mentioned this pull request Jan 11, 2021
oranagra added a commit that referenced this pull request Jan 12, 2021
This is hopefully usually harmles.
The server.ready_keys will usually be empty so the code after releasing
the GIL will soon be done.
The only case where it'll actually process things is when a module
releases a client (or module) blocked on a key, by triggering this NOT
from within a command (e.g. a timer event).

This bug was introduced in redis 6.0.9, see #7903

(cherry picked from commit e6fa473)
@oranagra oranagra mentioned this pull request Jan 13, 2021
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 2, 2021
This is hopefully usually harmles.
The server.ready_keys will usually be empty so the code after releasing
the GIL will soon be done.
The only case where it'll actually process things is when a module
releases a client (or module) blocked on a key, by triggering this NOT
from within a command (e.g. a timer event).

This bug was introduced in redis 6.0.9, see redis#7903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:to-be-merged The PR should be merged soon, even if not yet ready, this is used so that it won't be forgotten

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants