Skip to content

Fix crash on loading AOF with timed out script.#8284

Merged
oranagra merged 3 commits intoredis:unstablefrom
MeirShpilraien:fix_crash_on_aof_long_script_loading
Jan 4, 2021
Merged

Fix crash on loading AOF with timed out script.#8284
oranagra merged 3 commits intoredis:unstablefrom
MeirShpilraien:fix_crash_on_aof_long_script_loading

Conversation

@MeirShpilraien
Copy link

If AOF file contains a long Lua script that timed out, then the evalCommand calls blockingOperationEnds which sets server.blocked_last_cron to 0. later on, the AOF whileBlockedCron function asserts that this value is not 0.

The fix allows nesting call to blockingOperationStarts and blockingOperationEnds.

The issue was first introduce in this commit: 9ef8d2f

If AOF file contains a long Lua script that timed out, then the `evalCommand` calls
`blockingOperationEnds` which sets` server.blocked_last_cron` to 0. later on,
the AOF `whileBlockedCron` function asserts that this value is not 0.

The fix allows nesting call to `blockingOperationStarts` and `blockingOperationEnds`.

The issue was first introduce in this commit: 9ef8d2f
Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MeirShpilraien you forgot to initialize the new member at startup.

Meir Shpilraien (Spielrein) and others added 2 commits January 4, 2021 13:16
@MeirShpilraien
Copy link
Author

@MeirShpilraien you forgot to initialize the new member at startup.

@oranagra thanks, done.

@oranagra oranagra merged commit ecd5351 into redis:unstable Jan 4, 2021
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label Jan 10, 2021
@oranagra oranagra mentioned this pull request Jan 10, 2021
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 2, 2021
If AOF file contains a long Lua script that timed out, then the `evalCommand` calls
`blockingOperationEnds` which sets `server.blocked_last_cron` to 0. later on,
the AOF `whileBlockedCron` function asserts that this value is not 0.

The fix allows nesting call to `blockingOperationStarts` and `blockingOperationEnds`.

The issue was first introduce in this commit: 9ef8d2f (Redis 6.2 RC1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants