{"action":"created","issue":{"url":"https://api.github.com/repos/antirez/disque/issues/31","labels_url":"https://api.github.com/repos/antirez/disque/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/antirez/disque/issues/31/comments","events_url":"https://api.github.com/repos/antirez/disque/issues/31/events","html_url":"https://github.com/antirez/disque/issues/31","id":72182378,"number":31,"title":"Disque sometimes crashes when the client closes the connection","user":{"login":"djanowski","id":2268,"avatar_url":"https://avatars.githubusercontent.com/u/2268?v=3","gravatar_id":"","url":"https://api.github.com/users/djanowski","html_url":"https://github.com/djanowski","followers_url":"https://api.github.com/users/djanowski/followers","following_url":"https://api.github.com/users/djanowski/following{/other_user}","gists_url":"https://api.github.com/users/djanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/djanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djanowski/subscriptions","organizations_url":"https://api.github.com/users/djanowski/orgs","repos_url":"https://api.github.com/users/djanowski/repos","events_url":"https://api.github.com/users/djanowski/events{/privacy}","received_events_url":"https://api.github.com/users/djanowski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/antirez/disque/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-30T14:38:19Z","updated_at":"2015-05-04T22:06:29Z","closed_at":null,"body":"~~I can trigger this after a few iterations of my script, which closes the socket somewhat abruptly (`socket.end()` in Node.js).~~ See comments, script to reproduce is this: https://gist.github.com/djanowski/cfc662d64585b284db9c\r\n\r\n```\r\n=== DISQUE BUG REPORT START: Cut & paste starting from here ===\r\n27560:P 30 Apr 11:35:15.459 # ------------------------------------------------\r\n27560:P 30 Apr 11:35:15.459 # !!! Software Failure. Press left mouse button to continue\r\n27560:P 30 Apr 11:35:15.459 # Guru Meditation: \"Unknown btype in unblockClient().\" #blocked.c:136\r\n27560:P 30 Apr 11:35:15.459 # (forcing SIGSEGV in order to print the stack trace)\r\n27560:P 30 Apr 11:35:15.460 # ------------------------------------------------\r\n27560:P 30 Apr 11:35:15.460 #     Disque 0.0.1 crashed by signal: 11\r\n27560:P 30 Apr 11:35:15.460 #     Failed assertion: <no assertion failed> (<no file>:0)\r\n27560:P 30 Apr 11:35:15.460 # --- STACK TRACE\r\n0   disque-server                       0x00000001056a1757 logStackTrace + 103\r\n1   disque-server                       0x00000001056a14ec _serverPanic + 172\r\n2   libsystem_platform.dylib            0x00007fff92b55f1a _sigtramp + 26\r\n3   libsystem_c.dylib                   0x00007fff8517820a vsnprintf + 80\r\n4   disque-server                       0x00000001056a8857 unblockClient + 135\r\n5   disque-server                       0x00000001056abd00 jobReplicationAchieved + 208\r\n6   disque-server                       0x00000001056a47ca clusterProcessPacket + 1578\r\n7   disque-server                       0x00000001056a30f6 clusterReadHandler + 262\r\n8   disque-server                       0x0000000105686ee4 aeProcessEvents + 548\r\n9   disque-server                       0x00000001056871db aeMain + 43\r\n10  disque-server                       0x000000010568ecfc main + 860\r\n11  libdyld.dylib                       0x00007fff8b8e05c9 start + 1\r\n12  ???                                 0x0000000000000013 0x0 + 19\r\n27560:P 30 Apr 11:35:15.461 # --- INFO OUTPUT\r\n27560:P 30 Apr 11:35:15.461 # # Server\r\ndisque_version:0.0.1\r\ndisque_git_sha1:b3652518\r\ndisque_git_dirty:0\r\ndisque_build_id:8710da5c468ed4fd\r\nos:Darwin 14.3.0 x86_64\r\narch_bits:64\r\nmultiplexing_api:kqueue\r\ngcc_version:4.2.1\r\nprocess_id:27560\r\nrun_id:c65db17757d8653fe9976eb7efc262ff00b0d816\r\ntcp_port:7712\r\nuptime_in_seconds:22\r\nuptime_in_days:0\r\nhz:10\r\nconfig_file:\r\n\r\n# Clients\r\nconnected_clients:1\r\nclient_longest_output_list:0\r\nclient_biggest_input_buf:117\r\nblocked_clients:1\r\n\r\n# Memory\r\nused_memory:964704\r\nused_memory_human:942.09K\r\nused_memory_rss:1351680\r\nused_memory_peak:964704\r\nused_memory_peak_human:942.09K\r\nmem_fragmentation_ratio:1.40\r\nmem_allocator:libc\r\n\r\n# Jobs\r\nregistered_jobs:2\r\n\r\n# Queues\r\nregistered_queues:1\r\n\r\n# Persistence\r\nloading:0\r\naof_enabled:0\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\n\r\n# Stats\r\ntotal_connections_received:30\r\ntotal_commands_processed:80\r\ninstantaneous_ops_per_sec:23\r\ntotal_net_input_bytes:2368\r\ntotal_net_output_bytes:13304\r\ninstantaneous_input_kbps:0.66\r\ninstantaneous_output_kbps:3.75\r\nrejected_connections:0\r\nlatest_fork_usec:0\r\n\r\n# CPU\r\nused_cpu_sys:0.12\r\nused_cpu_user:0.04\r\nused_cpu_sys_children:0.00\r\nused_cpu_user_children:0.00\r\n\r\n# Commandstats\r\ncmdstat_ping:calls=2,usec=8,usec_per_call=4.00\r\ncmdstat_debug:calls=24,usec=325,usec_per_call=13.54\r\ncmdstat_cluster:calls=1,usec=20,usec_per_call=20.00\r\ncmdstat_hello:calls=41,usec=347,usec_per_call=8.46\r\ncmdstat_addjob:calls=12,usec=322,usec_per_call=26.83\r\nhash_init_value: 1431059163\r\n\r\n27560:P 30 Apr 11:35:15.461 # --- CLIENT LIST OUTPUT\r\n27560:P 30 Apr 11:35:15.461 # id=30 addr=127.0.0.1:64888 fd=11 name= age=0 idle=0 flags=b qbuf=117 qbuf-free=32651 obl=51 oll=0 omem=0 events=rw cmd=addjob\r\n\r\n27560:P 30 Apr 11:35:15.461 # --- REGISTERS\r\n27560:P 30 Apr 11:35:15.461 # \r\nRAX:4c008c55a4f8b912 RBX:00000001056b4dec\r\nRCX:00007fff73ba7070 RDX:00007fff5a579a50\r\nRDI:0002a5000002a603 RSI:0002a6000002a600\r\nRBP:00007fff5a579ec0 RSP:00007fff5a579ea0\r\nR8 :00007fff5a5798a0 R9 :00007fff75317300\r\nR10:00000001056ea668 R11:0000000000000040\r\nR12:00000001056b3a6d R13:00000001056b9830\r\nR14:0000000000000088 R15:00000001056b4de2\r\nRIP:00000001056a14ec EFL:0000000000010206\r\nCS :000000000000002b FS:0000000000000000  GS:0000000000000000\r\n27560:P 30 Apr 11:35:15.462 # (00007fff5a579eaf) -> 00007f9243500ff8\r\n27560:P 30 Apr 11:35:15.462 # (00007fff5a579eae) -> 0000000000000001\r\n27560:P 30 Apr 11:35:15.462 # (00007fff5a579ead) -> 00007f9243601260\r\n27560:P 30 Apr 11:35:15.462 # (00007fff5a579eac) -> 4c008c55a4f8b912\r\n27560:P 30 Apr 11:35:15.462 # (00007fff5a579eab) -> 0000000000000005\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579eaa) -> 00007f92436008f0\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea9) -> 00000001056abd00\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea8) -> 00007fff5a579f30\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea7) -> 00007f9243601260\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea6) -> 00007f92440014f5\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea5) -> 00000001056a8857\r\n27560:P 30 Apr 11:35:15.463 # (00007fff5a579ea4) -> 00007fff5a579ee0\r\n27560:P 30 Apr 11:35:15.464 # (00007fff5a579ea3) -> 00007f9243601380\r\n27560:P 30 Apr 11:35:15.464 # (00007fff5a579ea2) -> 00007f9244001400\r\n27560:P 30 Apr 11:35:15.464 # (00007fff5a579ea1) -> 00007fff73ba7070\r\n27560:P 30 Apr 11:35:15.464 # (00007fff5a579ea0) -> 00007f9244001400\r\n27560:P 30 Apr 11:35:15.464 # \r\n=== DISQUE BUG REPORT END. Make sure to include from START to END. ===\r\n\r\n       Please report the crash by opening an issue on github:\r\n\r\n           http://github.com/antirez/disque/issues\r\n\r\n  Suspect RAM error? Use disque-server --test-memory to verify it.\r\n```"},"comment":{"url":"https://api.github.com/repos/antirez/disque/issues/comments/98864074","html_url":"https://github.com/antirez/disque/issues/31#issuecomment-98864074","issue_url":"https://api.github.com/repos/antirez/disque/issues/31","id":98864074,"user":{"login":"antirez","id":65632,"avatar_url":"https://avatars.githubusercontent.com/u/65632?v=3","gravatar_id":"","url":"https://api.github.com/users/antirez","html_url":"https://github.com/antirez","followers_url":"https://api.github.com/users/antirez/followers","following_url":"https://api.github.com/users/antirez/following{/other_user}","gists_url":"https://api.github.com/users/antirez/gists{/gist_id}","starred_url":"https://api.github.com/users/antirez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antirez/subscriptions","organizations_url":"https://api.github.com/users/antirez/orgs","repos_url":"https://api.github.com/users/antirez/repos","events_url":"https://api.github.com/users/antirez/events{/privacy}","received_events_url":"https://api.github.com/users/antirez/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T22:06:29Z","updated_at":"2015-05-04T22:06:29Z","body":"Can reproduce perfectly :ok_hand:.. now I need to track down the beast :-) Hopefully tomorrow."}}