tporadowski / redis

Native port of Redis for Windows. Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs. This repository contains unofficial port of Redis to Windows.
http://redis.io
Other
8.88k stars 1.09k forks source link

Snapshot fork operation failed #130

Open catchtechnologies opened 2 years ago

catchtechnologies commented 2 years ago

Thanks for the v1.0.6.1 release. However, I get the following error when Redis For Windows 5.0.10 or 5.0.14 tries to save a snapshot.

Any ideas?

[8184] 02 Feb 08:00:15.048 * 1 changes in 10 seconds. Saving...
[8184] 02 Feb 08:00:15.080 * Background saving started by pid 6340

=== REDIS BUG REPORT START: Cut & paste starting from here ===
Redis version: 5.0.14
[6340] 02 Feb 08:00:15.180 # --- EXCEPTION_ACCESS_VIOLATION
[6340] 02 Feb 08:00:15.182 # --- STACK TRACE
service-node-db-server.exe!((null):0)(0x14018C230, 0x0014FF60, 0x1400DD900, 0x0014DF80)
service-node-db-server.exe!((null):0)(0x0014DF80, 0x1400DD901, 0x00000000, 0x00000000)
KERNELBASE.dll!UnhandledExceptionFilter((null):0)(0x0014E030, 0x7FF846A7662C, 0x00000000, 0x0014DFC8)
ntdll.dll!memset((null):0)(0x7FF846AA2A24, 0x7FF846930000, 0x0014E030, 0x7FF846960E7B)
ntdll.dll!_C_specific_handler((null):0)(0x00000000, 0x0014E530, 0x0014EBF0, 0x00000000)
ntdll.dll!_chkstk((null):0)(0x00000000, 0x0014E530, 0x0014EBF0, 0x00000000)
ntdll.dll!RtlRaiseException((null):0)(0x00400000, 0x14009B762, 0x7FE60FC02400, 0x03813328)
ntdll.dll!KiUserExceptionDispatcher((null):0)(0x14004A278, 0x7FE60FC02400, 0x2C91DF3852E245, 0x1401F7A81)
ntdll.dll!KiUserExceptionDispatcher((null):0)(0x7FE60FC02400, 0x2C91DF3852E245, 0x1401F7A81, 0x7FE60F82A2D0)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x0014F118, 0x00000007, 0x7FE613000800, 0x0014F1F0)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x0014F1F0, 0x00000000, 0x06C00000, 0x00000009)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x00596B90, 0x02060000, 0x00000000, 0x000018C4)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x02B46EF0, 0x02060000, 0x02060000, 0x7FE630800000)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x00000140, 0x00000000, 0x00000140, 0x2AAAAAAAAAAAAAAB)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x00000000, 0x00000000, 0x00575E60, 0x00000000)
service-node-db-server.exe!KiUserExceptionDispatcher((null):0)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
KERNEL32.DLL!BaseThreadInitThunk((null):0)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart((null):0)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart((null):0)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
[6340] 02 Feb 08:00:15.217 # --- INFO OUTPUT
[8184] 02 Feb 08:00:15.437 # fork operation failed
[8184] 02 Feb 08:00:15.458 # Background saving terminated by signal 1
[8184] 02 Feb 08:00:21.055 * 1 changes in 10 seconds. Saving...
[8184] 02 Feb 08:00:21.066 * Background saving started by pid 796
tporadowski commented 2 years ago

I briefly tested SAVE and this works, but indeed asynchronous save does not. I will investigate that.

tporadowski commented 2 years ago

I included a workaround in 223d9e1 that loads the modules in child process spawned for background save. Not ideal as it requires filtering of config file(s) and loading the modules again. Yet, there is only RedisJSON (former ReJSON) known to me and this seems to work fine.