{"action":"created","issue":{"url":"https://api.github.com/repos/MSOpenTech/redis/issues/376","labels_url":"https://api.github.com/repos/MSOpenTech/redis/issues/376/labels{/name}","comments_url":"https://api.github.com/repos/MSOpenTech/redis/issues/376/comments","events_url":"https://api.github.com/repos/MSOpenTech/redis/issues/376/events","html_url":"https://github.com/MSOpenTech/redis/issues/376","id":122057547,"number":376,"title":"Service crash on Redis 3.0.500 (7th Dec 2015) EXCEPTION_ACCESS_VIOLATION","user":{"login":"DavidADoran","id":14232715,"avatar_url":"https://avatars.githubusercontent.com/u/14232715?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidADoran","html_url":"https://github.com/DavidADoran","followers_url":"https://api.github.com/users/DavidADoran/followers","following_url":"https://api.github.com/users/DavidADoran/following{/other_user}","gists_url":"https://api.github.com/users/DavidADoran/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidADoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidADoran/subscriptions","organizations_url":"https://api.github.com/users/DavidADoran/orgs","repos_url":"https://api.github.com/users/DavidADoran/repos","events_url":"https://api.github.com/users/DavidADoran/events{/privacy}","received_events_url":"https://api.github.com/users/DavidADoran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-12-14T14:51:17Z","updated_at":"2015-12-24T08:30:46Z","closed_at":null,"body":"I was seeing these errors with the previous, RC2, version so have just updated and can still reproducibly cause the service to crash.\r\n\r\nThe crash dump is pasted below. It's happened on several machines so I don't suspect memory faults. \r\n\r\nOriginally I was working within a component I've been developing but decided to isolate the problem using the code below. This is C# using the NuGet package StackExchange.Redis.StrongName, version 1.0.488.  Usually takes between 5 and 100 calls to StressRedis() to provoke failure. \r\n\r\n    static class Program\r\n    {\r\n        public static void Main()\r\n        {\r\n            var connection = ConnectionMultiplexer.Connect(\"localhost,syncTimeout=5000\");\r\n            var i = 0;\r\n            while (true)\r\n            {\r\n                ++i;\r\n                Console.WriteLine(\"Stressing Redis. Run \" + i);\r\n                StressRedis(connection);\r\n            }\r\n        }\r\n\r\n        private static void StressRedis(IConnectionMultiplexer connection)\r\n        {\r\n            var db = connection.GetDatabase();\r\n            var ids = new List<string>();\r\n            for (var i = 0; i < 10000; i++)\r\n            {\r\n                var id = Guid.NewGuid().ToString();\r\n                ids.Add(id);\r\n                db.StringSet(id, \"Test\");\r\n            }\r\n\r\n            foreach (var id in ids)\r\n            {\r\n                db.KeyDelete(id);\r\n            }\r\n        }\r\n    }\r\n\r\nRegards,\r\nDavid Doran\r\n\r\n=== REDIS BUG REPORT START: Cut & paste starting from here ===\r\n[1332] 14 Dec 14:29:35.253 # Redis version: 3.0.500\r\n[1332] 14 Dec 14:29:35.253 # --- EXCEPTION_ACCESS_VIOLATION\r\n[1332] 14 Dec 14:29:35.253 # --- STACK TRACE\r\nredis-server.exe!LogStackTrace(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:95)(0x012CE690, 0x012CFF90, 0x00000001, 0x40123730)\r\nredis-server.exe!UnhandledExceptiontHandler(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x00000001, 0x00000000, 0x00000001, 0xFD7AABC0)\r\nkernel32.dll!UnhandledExceptionFilter(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x012CE690, 0x00000006, 0x00000000, 0x00000001)\r\nntdll.dll!EtwEventSetInformation(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x012CF2D0, 0x00000000, 0x401297C8, 0x00000000)\r\nntdll.dll!_C_specific_handler(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x012D0000, 0x012CFF90, 0x012CFF90, 0x774AEAAC)\r\nntdll.dll!RtlDecodePointer(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x012D0000, 0x7725EDAC, 0x00012A98, 0x000001B0)\r\nntdll.dll!RtlUnwindEx(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x012CF2D0, 0x012CEDE0, 0x00000000, 0x00000000)\r\nntdll.dll!KiUserExceptionDispatcher(c:\\release\\redis\\src\\win32_interop\\win32_stacktrace.cpp:185)(0x40032F9B, 0xFFFFFFE0, 0xF50F1000, 0x02811B9A)\r\nredis-server.exe!je_bitmap_set(c:\\release\\redis\\deps\\jemalloc-win\\include\\jemalloc\\internal\\bitmap.h:101)(0xFFFFFFE0, 0xF50F1000, 0x02811B9A, 0x02811B9B)\r\nredis-server.exe!arena_run_reg_alloc(c:\\release\\redis\\deps\\jemalloc-win\\src\\arena.c:289)(0x00000000, 0xF4C00250, 0x00000020, 0x40170F10)\r\nredis-server.exe!je_arena_malloc_small(c:\\release\\redis\\deps\\jemalloc-win\\src\\arena.c:1608)(0xF506E290, 0x012CF570, 0x00000010, 0x00000011)\r\nredis-server.exe!je_arena_ralloc(c:\\release\\redis\\deps\\jemalloc-win\\src\\arena.c:2180)(0x012CF570, 0x00000011, 0x00000010, 0x0000000F)\r\nredis-server.exe!je_iralloct(c:\\release\\redis\\deps\\jemalloc-win\\include\\jemalloc\\internal\\jemalloc_internal.h:1023)(0x00000011, 0x00000010, 0x00000020, 0x40170F10)\r\nredis-server.exe!je_realloc(c:\\release\\redis\\deps\\jemalloc-win\\src\\jemalloc.c:1302)(0x00000010, 0x00000020, 0x00000011, 0x00000000)\r\nredis-server.exe!zrealloc(c:\\release\\redis\\src\\zmalloc.c:179)(0x00000008, 0x00000004, 0x02811AD8, 0x00000000)\r\nredis-server.exe!sdscatlen(c:\\release\\redis\\src\\sds.c:248)(0xF506E298, 0x4015E7B0, 0x00000000, 0xF50F1220)\r\nredis-server.exe!catAppendOnlyGenericCommand(c:\\release\\redis\\src\\aof.c:462)(0x00000003, 0x02811AB8, 0x00000000, 0xF50F1FA0)\r\nredis-server.exe!feedAppendOnlyFile(c:\\release\\redis\\src\\aof.c:544)(0x000264E1, 0xDAF07CEC, 0x00000007, 0x4008DB5C)\r\nredis-server.exe!call(c:\\release\\redis\\src\\redis.c:2163)(0x566ED24F, 0x400A4CF0, 0x566ED24F, 0x0000000B)\r\nredis-server.exe!processCommand(c:\\release\\redis\\src\\redis.c:2368)(0x00000004, 0x0000000B, 0x00000000, 0x00000000)\r\nredis-server.exe!processInputBuffer(c:\\release\\redis\\src\\networking.c:1291)(0x00000000, 0x0000000B, 0x00000042, 0x00000000)\r\nredis-server.exe!readQueryFromClient(c:\\release\\redis\\src\\networking.c:1344)(0xF506F160, 0x00000001, 0xF5018150, 0x000000E4)\r\nredis-server.exe!aeMain(c:\\release\\redis\\src\\ae.c:481)(0x566ED0B1, 0xF5006FA8, 0x00000002, 0x00288E40)\r\nredis-server.exe!redis_main(c:\\release\\redis\\src\\redis.c:3765)(0x00000000, 0x00283160, 0x566ED093, 0x00288E40)\r\nredis-server.exe!main(c:\\release\\redis\\src\\win32_interop\\win32_qfork.cpp:1241)(0x00000016, 0xFFFFFFFF, 0x00000016, 0x00000000)\r\nredis-server.exe!ServiceWorkerThread(c:\\release\\redis\\src\\win32_interop\\win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)\r\nkernel32.dll!BaseThreadInitThunk(c:\\release\\redis\\src\\win32_interop\\win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)\r\nntdll.dll!RtlUserThreadStart(c:\\release\\redis\\src\\win32_interop\\win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)\r\nntdll.dll!RtlUserThreadStart(c:\\release\\redis\\src\\win32_interop\\win32_service.cpp:484)(0x00000000, 0x00000000, 0x00000000, 0x00000000)\r\n[1332] 14 Dec 14:29:35.283 # --- INFO OUTPUT\r\n# Server\r\nredis_version:3.0.500\r\nredis_git_sha1:00000000\r\nredis_git_dirty:0\r\nredis_build_id:e18d443f4404273c\r\nredis_mode:standalone\r\nos:Windows  \r\narch_bits:64\r\nmultiplexing_api:WinSock_IOCP\r\nprocess_id:1332\r\nrun_id:9518e8586af6b72bcf4cdde7f9006d445ac9482a\r\ntcp_port:6379\r\nuptime_in_seconds:444\r\nuptime_in_days:0\r\nhz:10\r\nlru_clock:7262799\r\nconfig_file:C:\\Program Files\\Redis\\redis.windows-service.conf\r\n\r\n# Clients\r\nconnected_clients:4\r\nclient_longest_output_list:0\r\nclient_biggest_input_buf:0\r\nblocked_clients:0\r\n\r\n# Memory\r\nused_memory:781520\r\nused_memory_human:763.20K\r\nused_memory_rss:849488\r\nused_memory_peak:12633048\r\nused_memory_peak_human:12.05M\r\nused_memory_lua:36864\r\nmem_fragmentation_ratio:1.09\r\nmem_allocator:jemalloc-3.6.0\r\n\r\n# Persistence\r\nloading:0\r\nrdb_changes_since_last_save:156898\r\nrdb_bgsave_in_progress:0\r\nrdb_last_save_time:1450103343\r\nrdb_last_bgsave_status:ok\r\nrdb_last_bgsave_time_sec:0\r\nrdb_current_bgsave_time_sec:-1\r\naof_enabled:1\r\naof_rewrite_in_progress:0\r\naof_rewrite_scheduled:0\r\naof_last_rewrite_time_sec:-1\r\naof_current_rewrite_time_sec:-1\r\naof_last_bgrewrite_status:ok\r\naof_last_write_status:ok\r\naof_current_size:637589141\r\naof_base_size:590005669\r\naof_pending_rewrite:0\r\naof_buffer_length:0\r\naof_rewrite_buffer_length:0\r\naof_pending_bio_fsync:0\r\naof_delayed_fsync:0\r\n\r\n# Stats\r\ntotal_connections_received:4\r\ntotal_commands_processed:780275\r\ninstantaneous_ops_per_sec:5865\r\ntotal_net_input_bytes:47590366\r\ntotal_net_output_bytes:46178045\r\ninstantaneous_input_kbps:321.00\r\ninstantaneous_output_kbps:22.94\r\nrejected_connections:0\r\nsync_full:0\r\nsync_partial_ok:0\r\nsync_partial_err:0\r\nexpired_keys:0\r\nevicted_keys:0\r\nkeyspace_hits:0\r\nkeyspace_misses:2\r\npubsub_channels:1\r\npubsub_patterns:0\r\nlatest_fork_usec:123012\r\nmigrate_cached_sockets:0\r\n\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_repl_offset:0\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n# CPU\r\nused_cpu_sys:64.04\r\nused_cpu_user:43.29\r\nused_cpu_sys_children:0.00\r\nused_cpu_user_children:0.00\r\n\r\n# Commandstats\r\ncmdstat_get:calls=2,usec=0,usec_per_call=0.00\r\ncmdstat_set:calls=390053,usec=1681171,usec_per_call=4.31\r\ncmdstat_del:calls=390000,usec=1481153,usec_per_call=3.80\r\ncmdstat_select:calls=4,usec=0,usec_per_call=0.00\r\ncmdstat_scan:calls=70,usec=380032,usec_per_call=5429.03\r\ncmdstat_ping:calls=130,usec=0,usec_per_call=0.00\r\ncmdstat_echo:calls=2,usec=0,usec_per_call=0.00\r\ncmdstat_flushdb:calls=1,usec=4001,usec_per_call=4001.00\r\ncmdstat_info:calls=5,usec=0,usec_per_call=0.00\r\ncmdstat_config:calls=3,usec=0,usec_per_call=0.00\r\ncmdstat_subscribe:calls=1,usec=0,usec_per_call=0.00\r\ncmdstat_unsubscribe:calls=2,usec=0,usec_per_call=0.00\r\ncmdstat_cluster:calls=1,usec=0,usec_per_call=0.00\r\ncmdstat_client:calls=2,usec=0,usec_per_call=0.00\r\n\r\n# Cluster\r\ncluster_enabled:0\r\n\r\n# Keyspace\r\ndb0:keys=53,expires=0,avg_ttl=0\r\n[1332] 14 Dec 14:29:35.284 # \r\n=== REDIS BUG REPORT END. Make sure to include from START to END. ==="},"comment":{"url":"https://api.github.com/repos/MSOpenTech/redis/issues/comments/167067981","html_url":"https://github.com/MSOpenTech/redis/issues/376#issuecomment-167067981","issue_url":"https://api.github.com/repos/MSOpenTech/redis/issues/376","id":167067981,"user":{"login":"enricogior","id":3206696,"avatar_url":"https://avatars.githubusercontent.com/u/3206696?v=3","gravatar_id":"","url":"https://api.github.com/users/enricogior","html_url":"https://github.com/enricogior","followers_url":"https://api.github.com/users/enricogior/followers","following_url":"https://api.github.com/users/enricogior/following{/other_user}","gists_url":"https://api.github.com/users/enricogior/gists{/gist_id}","starred_url":"https://api.github.com/users/enricogior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricogior/subscriptions","organizations_url":"https://api.github.com/users/enricogior/orgs","repos_url":"https://api.github.com/users/enricogior/repos","events_url":"https://api.github.com/users/enricogior/events{/privacy}","received_events_url":"https://api.github.com/users/enricogior/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T08:30:46Z","updated_at":"2015-12-24T08:30:46Z","body":"Hi @johnwonder \r\nthe log you posted shows a different problem.\r\nCan you please open a new issue, adding the configuration file (if you made any change to the default config file) and describing your environment (OS, ram, virtual or physical etc.).\r\nCan you provide repro steps for the crash?\r\nThank you.\r\n"}}