EXCEPTION_ACCESS_VIOLATION on redis windows server machine
spankaj4 opened this issue · comments
=== REDIS BUG REPORT START: Cut & paste starting from here ===
Redis version: 4.0.2.3
[2312] 04 Sep 00:06:43.773 # --- EXCEPTION_ACCESS_VIOLATION
[2312] 04 Sep 00:06:43.774 # --- STACK TRACE
redis-server.exe!UnhandledExceptiontHandler(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x14002C5C0, 0x14002C5C0, 0x00EEE820, 0x300000044)
KERNELBASE.dll!UnhandledExceptionFilter(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00EEEE40, 0x7FFAD7E833C4, 0x00000000, 0x00000000)
ntdll.dll!memset(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00EEF4B0, 0x00EEEFC0, 0x00EEF4B0, 0x00EEEDE8)
ntdll.dll!_C_specific_handler(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x00EEEDD0, 0x00000000, 0x140000000)
ntdll.dll!_chkstk(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00EEEDD0, 0x00000000, 0x7FFAD7CCBC3C, 0x7FFAD7C20000)
ntdll.dll!RtlWalkFrameChain(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x7FFAD46A7EC6, 0x7FEC3E819133, 0x00000000)
ntdll.dll!KiUserExceptionDispatcher(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0000000F, 0x1400F6970, 0x026BD1D0, 0x004BF680)
redis-server.exe!dictFind(d:\dev\github\redis\src\dict.c:498)(0x7FEC3E819133, 0x00000000, 0x7FEC3EBFB000, 0x1400FEC03)
redis-server.exe!moduleCommand(d:\dev\github\redis\src\module.c:3792)(0x1D5628688B28B10, 0x0000000F, 0x0000000F, 0x1400F6970)
redis-server.exe!call(d:\dev\github\redis\src\server.c:2293)(0x7FEC3EBFB000, 0x00000000, 0x7FEC3EBFB000, 0x1400BC5F0)
redis-server.exe!processCommand(d:\dev\github\redis\src\server.c:2576)(0x00000003, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!processInputBuffer(d:\dev\github\redis\src\networking.c:1443)(0x00000028, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!readQueryFromClient(d:\dev\github\redis\src\networking.c:1537)(0x7FEC3E86F1E0, 0x00000001, 0x00000000, 0x7FEC3E80C100)
redis-server.exe!aeMain(d:\dev\github\redis\src\ae.c:499)(0x1D5623074F56024, 0x591A1C32751BE, 0x1401A8D78, 0x7FEC3E8F8000)
redis-server.exe!redis_main(d:\dev\github\redis\src\server.c:4027)(0x005590D0, 0x00000000, 0x00000000, 0x00000002)
redis-server.exe!main(d:\dev\github\redis\src\win32_interop\win32_qfork.cpp:1285)(0x01D6E210, 0x01D6E210, 0x00000002, 0x005590D0)
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)
[2312] 04 Sep 00:06:44.444 # --- INFO OUTPUT
Server
redis_version:4.0.2.3
redis_git_sha1:f46d3133
redis_git_dirty:0
redis_build_id:1c447179aa2f56e9
redis_mode:standalone
os:Windows
arch_bits:64
multiplexing_api:WinSock_IOCP
atomicvar_api:pthread-mutex
process_id:2312
run_id:ee54b9e78ad9dde39c2bd118d24f137a86ca0a39
tcp_port:6379
uptime_in_seconds:36970
uptime_in_days:0
hz:10
lru_clock:7254715
executable:C:\Redis"c:\redis\redis-server.exe"
config_file:C:\Redis\redis.windows-service.conf
Clients
connected_clients:7
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
Memory
used_memory:818400
used_memory_human:799.22K
used_memory_rss:780408
used_memory_rss_human:762.12K
used_memory_peak:19611568
used_memory_peak_human:18.70M
used_memory_peak_perc:4.17%
used_memory_overhead:786418
used_memory_startup:633848
used_memory_dataset:31982
used_memory_dataset_perc:17.33%
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:0.95
mem_allocator:jemalloc-3.6.0
active_defrag_running:0
lazyfree_pending_objects:0
Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1567522894
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:43
total_commands_processed:147233
instantaneous_ops_per_sec:3
total_net_input_bytes:111164889
total_net_output_bytes:4853667262
instantaneous_input_kbps:0.30
instantaneous_output_kbps:0.14
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:128935
keyspace_misses:4516
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:18863
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:ac96040a2c399808b7f1fc990164a35578eb1464
master_replid2:b63266c3a4f9d7396f2d66d4772590fd9db43b93
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:109.59
used_cpu_user:104.42
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
Commandstats
cmdstat_del:calls=315,usec=31180,usec_per_call=98.98
cmdstat_cluster:calls=19,usec=31,usec_per_call=1.63
cmdstat_echo:calls=37,usec=33,usec_per_call=0.89
cmdstat_get:calls=133451,usec=2374611,usec_per_call=17.79
cmdstat_module:calls=1,usec=2022,usec_per_call=2022.00
cmdstat_auth:calls=37,usec=49,usec_per_call=1.32
cmdstat_client:calls=37,usec=51,usec_per_call=1.38
cmdstat_select:calls=224,usec=627,usec_per_call=2.80
cmdstat_info:calls=1960,usec=62274,usec_per_call=31.77
cmdstat_slaveof:calls=4,usec=7424,usec_per_call=1856.00
cmdstat_ping:calls=6639,usec=8241,usec_per_call=1.24
cmdstat_config:calls=44,usec=185073,usec_per_call=4206.20
cmdstat_subscribe:calls=18,usec=83,usec_per_call=4.61
cmdstat_scan:calls=224,usec=56932,usec_per_call=254.16
cmdstat_set:calls=344,usec=9985,usec_per_call=29.03
cmdstat_unsubscribe:calls=3879,usec=18984,usec_per_call=4.89
Cluster
cluster_enabled:0
Keyspace
[2312] 04 Sep 00:06:44.445 #
=== REDIS BUG REPORT END. Make sure to include from START to END. ===
3052] 06 Sep 05:20:08.107 * SLAVE OF 192.3.70.16:23736 enabled (user request from 'id=28 addr=192.3.70.16:36638 fd=9 name= age=1 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
[3052] 06 Sep 05:20:08.909 * Connecting to MASTER 192.3.70.16:23736
[3052] 06 Sep 05:20:08.910 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:10.446 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:10.447 # Sending command to master in replication handshake: -Writing to master: The specified module could not be found.
[3052] 06 Sep 05:20:10.925 * Connecting to MASTER 192.3.70.16:23736
[3052] 06 Sep 05:20:10.926 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:11.104 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:11.284 * Master replied to PING, replication can continue...
[3052] 06 Sep 05:20:11.645 * Trying a partial resynchronization (request 81215567b3c796d080fe30905fcee39f8f509287:1).
[3052] 06 Sep 05:20:11.834 * Full resync from master: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ:0
[3052] 06 Sep 05:20:11.834 * Discarding previously cached master state.
[3052] 06 Sep 05:20:11.836 * MASTER <-> SLAVE sync: receiving 3372687 bytes from master
[3052] 06 Sep 05:20:13.310 * MASTER <-> SLAVE sync: Flushing old data
[3052] 06 Sep 05:20:13.644 * MASTER <-> SLAVE sync: Loading DB in memory
[3052] 06 Sep 05:20:13.648 # Wrong signature trying to load DB from file
[3052] 06 Sep 05:20:13.648 # Failed trying to load the MASTER synchronization DB from disk
[3052] 06 Sep 05:20:14.363 * Connecting to MASTER 192.3.70.16:23736
[3052] 06 Sep 05:20:14.363 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:14.539 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:14.910 # Setting secondary replication ID to 81215567b3c796d080fe30905fcee39f8f509287, valid up to offset: 1. New replication ID is f0436a64c77fc4eb21b5cab1916f3b28927a7127
[3052] 06 Sep 05:20:14.911 * MASTER MODE enabled (user request from 'id=28 addr=192.3.70.16:36638 fd=9 name= age=7 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
[3052] 06 Sep 05:20:15.470 * 1 changes in 900 seconds. Saving...
[3052] 06 Sep 05:20:15.652 * Background saving started by pid 4736
[3052] 06 Sep 05:20:15.833 * Before turning into a slave, using my master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer.
[3052] 06 Sep 05:20:15.834 * SLAVE OF 192.3.70.16:14171 enabled (user request from 'id=30 addr=192.3.70.16:36760 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
[3052] 06 Sep 05:20:16.057 # fork operation complete
[3052] 06 Sep 05:20:16.061 * Background saving terminated with success
[3052] 06 Sep 05:20:16.563 * Connecting to MASTER 192.3.70.16:14171
[3052] 06 Sep 05:20:16.564 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:18.100 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:18.101 # Sending command to master in replication handshake: -Writing to master: The specified module could not be found.
[3052] 06 Sep 05:20:18.576 * Connecting to MASTER 192.3.70.16:14171
[3052] 06 Sep 05:20:18.577 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:18.755 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:18.935 * Master replied to PING, replication can continue...
[3052] 06 Sep 05:20:19.292 * Trying a partial resynchronization (request f0436a64c77fc4eb21b5cab1916f3b28927a7127:1).
[3052] 06 Sep 05:20:19.472 * Full resync from master: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ:0
[3052] 06 Sep 05:20:19.473 * Discarding previously cached master state.
[3052] 06 Sep 05:20:19.474 * MASTER <-> SLAVE sync: receiving 42680 bytes from master
[3052] 06 Sep 05:20:19.675 * MASTER <-> SLAVE sync: Flushing old data
[3052] 06 Sep 05:20:19.676 * MASTER <-> SLAVE sync: Loading DB in memory
[3052] 06 Sep 05:20:19.677 # Wrong signature trying to load DB from file
[3052] 06 Sep 05:20:19.677 # Failed trying to load the MASTER synchronization DB from disk
[3052] 06 Sep 05:20:19.721 * Connecting to MASTER 192.3.70.16:14171
[3052] 06 Sep 05:20:19.722 * MASTER <-> SLAVE sync started
[3052] 06 Sep 05:20:19.899 * Non blocking connect for SYNC fired the event.
[3052] 06 Sep 05:20:21.477 # Module /tmp/exp_lin.so failed to load: "\tmp\exp_lin.so": The specified module could not be found.
[3052] 06 Sep 05:20:21.657 # Setting secondary replication ID to f0436a64c77fc4eb21b5cab1916f3b28927a7127, valid up to offset: 1. New replication ID is 818954e0ad0a9fbdfa78587f336b6865ad1d713e
[3052] 06 Sep 05:20:21.658 * MASTER MODE enabled (user request from 'id=30 addr=192.3.70.16:36760 fd=12 name= age=6 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
=== REDIS BUG REPORT START: Cut & paste starting from here ===
Redis version: 4.0.2.3
[3052] 06 Sep 05:20:22.738 # --- EXCEPTION_ACCESS_VIOLATION
[3052] 06 Sep 05:20:22.739 # --- STACK TRACE
redis-server.exe!UnhandledExceptiontHandler(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x14002C5C0, 0x14002C5C0, 0x00F7E820, 0x300000044)
KERNELBASE.dll!UnhandledExceptionFilter(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00F7EE40, 0x7FFB758933C4, 0x00000000, 0x00000000)
ntdll.dll!memset(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00F7F4B0, 0x00F7EFC0, 0x00F7F4B0, 0x00F7EDE8)
ntdll.dll!_C_specific_handler(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x00F7EDD0, 0x00000000, 0x140000000)
ntdll.dll!_chkstk(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00F7EDD0, 0x00000000, 0x7FFB72ECBC3C, 0x7FFB72E20000)
ntdll.dll!RtlWalkFrameChain(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x7FFB72907EC6, 0x7FEC3E8191D3, 0x00000000)
ntdll.dll!KiUserExceptionDispatcher(d:\dev\github\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0000000C, 0x1400F6970, 0x01A4E7E0, 0x01A4ED50)
redis-server.exe!dictFind(d:\dev\github\redis\src\dict.c:498)(0x7FEC3E8191D3, 0x00000000, 0x7FEC3FCE5000, 0x1400FEC03)
redis-server.exe!moduleCommand(d:\dev\github\redis\src\module.c:3792)(0x1D56444AE9B9B07, 0x0000000F, 0x0000000C, 0x1400F6970)
redis-server.exe!call(d:\dev\github\redis\src\server.c:2293)(0x7FEC3FCE5000, 0x00000000, 0x7FEC3FCE5000, 0x1400BC5F0)
redis-server.exe!processCommand(d:\dev\github\redis\src\server.c:2576)(0x00000003, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!processInputBuffer(d:\dev\github\redis\src\networking.c:1443)(0x00000028, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!readQueryFromClient(d:\dev\github\redis\src\networking.c:1537)(0x7FEC3E86F180, 0x00000001, 0x00000000, 0x7FEC3E80C100)
redis-server.exe!aeMain(d:\dev\github\redis\src\ae.c:499)(0x1D563C6784461E8, 0x591CA5D14DC26, 0x1401A8D78, 0x7FEC3E8F8000)
redis-server.exe!redis_main(d:\dev\github\redis\src\server.c:4027)(0x0068B5E0, 0x00000000, 0x00000000, 0x00000002)
redis-server.exe!main(d:\dev\github\redis\src\win32_interop\win32_qfork.cpp:1285)(0x01C6BE60, 0x01C6BE60, 0x00000002, 0x0068B5E0)
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)
[3052] 06 Sep 05:20:22.832 # --- INFO OUTPUT
Server
redis_version:4.0.2.3
redis_git_sha1:f46d3133
redis_git_dirty:0
redis_build_id:1c447179aa2f56e9
redis_mode:standalone
os:Windows
arch_bits:64
multiplexing_api:WinSock_IOCP
atomicvar_api:pthread-mutex
process_id:3052
run_id:be64a625c99ec8a83aeea448f571c78530e61146
tcp_port:6379
uptime_in_seconds:54208
uptime_in_days:0
hz:10
lru_clock:7446334
executable:C:\Redis"c:\redis\redis-server.exe"
config_file:C:\Redis\redis.windows-service.conf
Clients
connected_clients:10
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
Memory
used_memory:910808
used_memory_human:889.46K
used_memory_rss:909672
used_memory_rss_human:888.35K
used_memory_peak:30806776
used_memory_peak_human:29.38M
used_memory_peak_perc:2.96%
used_memory_overhead:837834
used_memory_startup:633848
used_memory_dataset:72974
used_memory_dataset_perc:26.35%
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:1
rdb_bgsave_in_progress:0
rdb_last_save_time:1567727416
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:1
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:28
total_commands_processed:180194
instantaneous_ops_per_sec:4
total_net_input_bytes:80951154
total_net_output_bytes:5070966585
instantaneous_input_kbps:0.67
instantaneous_output_kbps:0.18
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:156674
keyspace_misses:5702
pubsub_channels:1
pubsub_patterns:0
latest_fork_usec:180631
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:818954e0ad0a9fbdfa78587f336b6865ad1d713e
master_replid2:f0436a64c77fc4eb21b5cab1916f3b28927a7127
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:102.11
used_cpu_user:99.17
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
Commandstats
cmdstat_module:calls=1,usec=4458,usec_per_call=4458.00
cmdstat_auth:calls=21,usec=3202,usec_per_call=152.48
cmdstat_echo:calls=16,usec=9,usec_per_call=0.56
cmdstat_scan:calls=184,usec=401128,usec_per_call=2180.04
cmdstat_command:calls=1,usec=592,usec_per_call=592.00
cmdstat_info:calls=2147,usec=313150,usec_per_call=145.85
cmdstat_subscribe:calls=8,usec=367,usec_per_call=45.88
cmdstat_keys:calls=1,usec=273,usec_per_call=273.00
cmdstat_client:calls=16,usec=443,usec_per_call=27.69
cmdstat_set:calls=288,usec=212445,usec_per_call=737.66
cmdstat_config:calls=23,usec=159620,usec_per_call=6940.00
cmdstat_unsubscribe:calls=4307,usec=43243,usec_per_call=10.04
cmdstat_select:calls=184,usec=541,usec_per_call=2.94
cmdstat_slaveof:calls=4,usec=14658,usec_per_call=3664.50
cmdstat_get:calls=162376,usec=20645501,usec_per_call=127.15
cmdstat_del:calls=373,usec=742991,usec_per_call=1991.93
cmdstat_ping:calls=10236,usec=26341,usec_per_call=2.57
cmdstat_cluster:calls=8,usec=844,usec_per_call=105.50
Cluster
cluster_enabled:0
Keyspace
db0:keys=1,expires=0,avg_ttl=0
[3052] 06 Sep 05:20:22.833 #
=== REDIS BUG REPORT END. Make sure to include from START to END. ===
Before error it call slave
SLAVE OF 192.3.70.16:23736 i have not configured it
@spankaj4 the version you are using ( 4.0.2.3 from my fork ) does not support modules. Modules support is already implemented, but not released so far. Please note that modules built for Linux (*.so) will not work and will have to be recompiled for Windows (some might need to be adjusted to even compile under Windows).