Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis 4.0.14 on Windows Server 2008 #46

Closed
ap86fn opened this issue Dec 9, 2019 · 7 comments
Closed

Redis 4.0.14 on Windows Server 2008 #46

ap86fn opened this issue Dec 9, 2019 · 7 comments

Comments

@ap86fn
Copy link

ap86fn commented Dec 9, 2019

Hi, I have installed Redis 4.0.14 on Windows Server 2008 when I try to save a json (about 7 MB) in Redis Cache, I have the attached exception "EXCEPTION_INT_DIVIDE_BY_ZERO" and the windows service stop to run. I don't have this problem on Windows 10 with the same data. I have the maximum default size of Redis Memory set to 100MB in the operating systems.

Could you help me , please? Thank you.

========LOG===========
[8688] 28 Nov 09:18:55.510 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[8688] 28 Nov 09:18:55.510 # Redis version=4.0.14, bits=64, commit=ac17be3c, modified=0, pid=8688, just started
[8688] 28 Nov 09:18:55.510 # Configuration loaded
[8688] 28 Nov 09:18:55.510 * Running mode=standalone, port=6379.
[8688] 28 Nov 09:18:55.510 # Server initialized
[8688] 28 Nov 09:18:55.510 * Ready to accept connections
[8344] 28 Nov 09:20:30.981 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[8344] 28 Nov 09:20:30.981 # Redis version=4.0.14, bits=64, commit=ac17be3c, modified=0, pid=8344, just started
[8344] 28 Nov 09:20:30.981 # Configuration loaded
[8344] 28 Nov 09:20:30.997 * Running mode=standalone, port=6379.
[8344] 28 Nov 09:20:30.997 # Server initialized
[8344] 28 Nov 09:20:30.997 * Ready to accept connections
[8344] 28 Nov 10:03:46.700 * 1 changes in 900 seconds. Saving...
[8344] 28 Nov 10:03:46.731 * Background saving started by pid 7468
[8344] 28 Nov 10:03:46.840 # fork operation complete
[8344] 28 Nov 10:03:46.840 * Background saving terminated with success

[8344] 28 Nov 10:18:47.048 * 1 changes in 900 seconds. Saving...

=== REDIS BUG REPORT START: Cut & paste starting from here ===
Redis version: 4.0.14

[8344] 28 Nov 10:18:47.064 # --- EXCEPTION_INT_DIVIDE_BY_ZERO

[8344] 28 Nov 10:18:47.064 # --- STACK TRACE
redis-server.exe!StackTraceInfo(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:153)(0x1401699D0, 0x013AFF90, 0x00000001, 0x013AE8F0)
redis-server.exe!UnhandledExceptiontHandler(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x00000001, 0x00000000, 0x00000001, 0x013AE900)
kernel32.dll!UnhandledExceptionFilter(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x013AE8F0, 0x00000006, 0x00000000, 0x100000001)
ntdll.dll!longjmp(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x013AF040, 0x013AE9F0, 0x14016FBD0, 0x00000000)
ntdll.dll!_C_specific_handler(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x013B0000, 0x013AFF90, 0x013AFF90, 0x7789892C)
ntdll.dll!_chkstk(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x013B0000, 0x7774DD58, 0x0000DDDC, 0x00000000)
ntdll.dll!RtlInitializeResource(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x013AF530, 0x013AF040, 0x00000000, 0x00000000)
ntdll.dll!KiUserExceptionDispatcher(D:\dev\GitHub\redis\src\Win32_Interop\Win32_StackTrace.cpp:186)(0x000AB2F0, 0x00000000, 0x7F4F7406050, 0xFFFFFFFFFFFFFFFF)
redis-server.exe!rdbSaveBackground(D:\dev\GitHub\redis\src\rdb.c:1130)(0xFFFFFFFF, 0x1401B1980, 0x00000001, 0x00000384)
redis-server.exe!serverCron(D:\dev\GitHub\redis\src\server.c:1133)(0x00000000, 0x20C49BA5E353F7CF, 0x7F4F7411150, 0x000000D4)
redis-server.exe!aeMain(D:\dev\GitHub\redis\src\ae.c:530)(0x002F4DB0, 0x59863C95C2747, 0x1401A9308, 0x7F4F74FE000)
redis-server.exe!redis_main(D:\dev\GitHub\redis\src\server.c:4013)(0x002FC550, 0x000002B8, 0x00000000, 0x00000002)
redis-server.exe!main(D:\dev\GitHub\redis\src\Win32_Interop\Win32_QFork.cpp:1285)(0x002FA6F0, 0x002FA6F0, 0x00000002, 0x002FC550)
redis-server.exe!ServiceWorkerThread(D:\dev\GitHub\redis\src\Win32_Interop\Win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
kernel32.dll!BaseThreadInitThunk(D:\dev\GitHub\redis\src\Win32_Interop\Win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(D:\dev\GitHub\redis\src\Win32_Interop\Win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(D:\dev\GitHub\redis\src\Win32_Interop\Win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
[8344] 28 Nov 10:18:47.142 # --- INFO OUTPUT

Server

redis_version:4.0.14
redis_git_sha1:ac17be3c
redis_git_dirty:0
redis_build_id:6730cd93e7a0b74b
redis_mode:standalone
os:Windows
arch_bits:64
multiplexing_api:WinSock_IOCP
atomicvar_api:pthread-mutex
process_id:8344
run_id:67269ea068178b7a7852bac04dc13f7e93de8e69
tcp_port:6379
uptime_in_seconds:3497
uptime_in_days:0
hz:10
lru_clock:14651639
executable:C:\Program Files\Redis"c:\program files\redis\redis-server.exe"
config_file:C:\Program Files\Redis\redis.windows-service.conf

Clients

connected_clients:2
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

Memory

used_memory:702448
used_memory_human:685.98K
used_memory_rss:701168
used_memory_rss_human:684.73K
used_memory_peak:17479208
used_memory_peak_human:16.00M
used_memory_peak_perc:4.02%
used_memory_overhead:693988
used_memory_startup:659744
used_memory_dataset:8460
used_memory_dataset_perc:19.81%
total_system_memory:0
total_system_memory_human:0B
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:1.00
mem_allocator:jemalloc-3.6.0
active_defrag_running:0
lazyfree_pending_objects:0

Persistence

loading:0
rdb_changes_since_last_save:3
rdb_bgsave_in_progress:0
rdb_last_save_time:1574931826
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

Stats

total_connections_received:2
total_commands_processed:57
instantaneous_ops_per_sec:1
total_net_input_bytes:14309696
total_net_output_bytes:28623640
instantaneous_input_kbps:0.04
instantaneous_output_kbps:0.21
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:4
keyspace_misses:4
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

Replication

role:master
connected_slaves:0
master_replid:faa3ee89c588b3a62bd495bf2d9b3027c3f87c81
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

CPU

used_cpu_sys:0.08
used_cpu_user:0.09
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

Commandstats

cmdstat_unsubscribe:calls=15,usec=0,usec_per_call=0.00
cmdstat_get:calls=8,usec=15600,usec_per_call=1950.00
cmdstat_config:calls=3,usec=0,usec_per_call=0.00
cmdstat_client:calls=2,usec=0,usec_per_call=0.00
cmdstat_cluster:calls=1,usec=0,usec_per_call=0.00
cmdstat_info:calls=17,usec=0,usec_per_call=0.00
cmdstat_del:calls=2,usec=0,usec_per_call=0.00
cmdstat_subscribe:calls=1,usec=0,usec_per_call=0.00
cmdstat_set:calls=2,usec=0,usec_per_call=0.00
cmdstat_ping:calls=2,usec=0,usec_per_call=0.00
cmdstat_echo:calls=2,usec=0,usec_per_call=0.00
cmdstat_auth:calls=2,usec=0,usec_per_call=0.00

Cluster

cluster_enabled:0

Keyspace

[8344] 28 Nov 10:18:47.142 #
=== REDIS BUG REPORT END. Make sure to include from START to END. ===

   Please report this bug by following the instructions at:

 https://github.com/tporadowski/redis/wiki/Submitting-an-Issue

Suspect RAM error? Use redis-server --test-memory to verify it.

[5592] 28 Nov 10:28:57.909 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[5592] 28 Nov 10:28:57.909 # Redis version=4.0.14, bits=64, commit=ac17be3c, modified=0, pid=5592, just started
[5592] 28 Nov 10:28:57.909 # Configuration loaded
[5592] 28 Nov 10:28:57.925 * Running mode=standalone, port=6379.
[5592] 28 Nov 10:28:57.925 # Server initialized
[5592] 28 Nov 10:28:57.940 * DB loaded from disk: 0.016 seconds
[5592] 28 Nov 10:28:57.940 * Ready to accept connections

@tporadowski
Copy link
Owner

@ap86fn unfortunately I have no access to Windows Server 2008, so I just tested this on Win10, but as you wrote - it works fine. Issue seems however to be related to obtaining the value for:
PORT_LONGLONG stat_fork_time; /* Time needed to perform latest fork() */
In your case it gets set to 0, hence the exception "EXCEPTION_INT_DIVIDE_BY_ZERO" as that value is used in calculation of value for stat_fork_rate; /* Fork rate in GB/sec. */. I doubt it could be so fast to yield almost no time, so it might be either related to accuracy/value rounding or some difference in Windows API.

@ap86fn
Copy link
Author

ap86fn commented Dec 11, 2019

Hi @tporadowski thank you very much for the answer. Have a nice day!

@tporadowski
Copy link
Owner

@ap86fn if you desperately need it running on WS 2008 R2 - please re-open this ticket and I'll try to test it in such environment

@ap86fn
Copy link
Author

ap86fn commented Dec 11, 2019

@ap86fn if you desperately need it running on WS 2008 R2 - please re-open this ticket and I'll try to test it in such environment

@tporadowski Yes please, If it is possible, I need to run Redis on WS 2008 R2. Thank You!!!

tporadowski added a commit that referenced this issue Dec 28, 2019
- in Windows prior to 8 and Server 2012 there is no GetSystemTimePreciseAsFileTime(), so in case of
  very fast forking - we take 100ms for calculation of "stat_fork_rate"
- fixes #46
@tporadowski
Copy link
Owner

HI @ap86fn,

After some investigation it turned out that a WinAPI function GetSystemTimePreciseAsFileTime is available only from Windows 8/Server 2012, so in case RDB/AOF were created fast enough - duration measured with default GetSystemTimeAsFileTime (used when the former is not available) yields 0, which caused this exception. Now, as a workaround (as I don't think it is that important to have that statistical value perfectly correct) - a 100ms duration is assumed, which does not make any problems anymore. I will release a hotfix for 4.0.14 this week then.

tporadowski added a commit that referenced this issue Dec 28, 2019
- in Windows prior to 8 and Server 2012 there is no GetSystemTimePreciseAsFileTime(), so in case of
  very fast forking - we take 100ms for calculation of "stat_fork_rate"
- fixes #46
@ap86fn
Copy link
Author

ap86fn commented Jan 13, 2020

Hi @tporadowski thank you to your support.

@tporadowski
Copy link
Owner

@ap86fn release 4.0.14.1 that fixes this issue is now ready.

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

No branches or pull requests

2 participants