{"comment":{"created_at":"2011-10-10T21:30:38Z","body":"Same issue when using PUBLISH to a websocket SUBSCRIBEd channel : seg fault\r\nI was using Chromium 13.0.782.215 on Ubuntu 11.04 64bits","updated_at":"2011-10-10T21:30:38Z","url":"https://api.github.com/repos/nicolasff/webdis/issues/comments/2352557","id":2352557,"user":{"avatar_url":"https://secure.gravatar.com/avatar/80061d98e1ec601f49dc4cc02fbb5823?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/PhE","id":1107924,"login":"PhE"}},"action":"created","issue":{"number":31,"created_at":"2011-09-02T20:23:19Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Test page:\r\n\r\n```\r\n<script type=\"text/javascript\"> \r\nfunction testJSON() {\r\n    var jsonSocket = new WebSocket(\"ws://localhost:7379/.json\");\r\n    jsonSocket.onopen = function() {\r\n \r\n        console.log(\"JSON socket connected!\");\r\n        jsonSocket.send(JSON.stringify([\"SUBSCRIBE\", \"chan\"]));\r\n    };\r\n    jsonSocket.onmessage = function(messageEvent) {\r\n        console.log(\"JSON received:\", messageEvent.data);\r\n    };\r\n}\r\ntestJSON();\r\n</script>\r\n```\r\n\r\n1) Loaded test page on Google Chrome\r\n2) WIth another connection to Redis sent the message: PUBLISH chan Moo4\r\n\r\nWebdis shuts down, this is what gets printed:\r\n\r\n```{\"\":[\"message\",\"chan\",\"Moo4\"]}?*** glibc detected *** ./webdis: double free or corruption (fasttop): 0x00007f8e440011a0 ***\r\n======= Backtrace: =========\r\n/lib64/libc.so.6(+0x75386)[0x7f8e4eb6b386]\r\n./webdis[0x408b5d]\r\n./webdis[0x407bb1]\r\n./webdis[0x4103b2]\r\n/usr/lib64/libevent-1.4.so.2(event_base_loop+0x3e4)[0x7f8e4f08bb44]\r\n./webdis[0x402f1f]\r\n/lib64/libpthread.so.0(+0x77e1)[0x7f8e4ee6f7e1]\r\n/lib64/libc.so.6(clone+0x6d)[0x7f8e4ebd727d]\r\n======= Memory map: ========\r\n00400000-0041f000 r-xp 00000000 ca:01 151681                             /tmp/webdis/webdis\r\n0061f000-00620000 rw-p 0001f000 ca:01 151681                             /tmp/webdis/webdis\r\n0093b000-0095c000 rw-p 00000000 00:00 0                                  [heap]\r\n7f8e38000000-7f8e38021000 rw-p 00000000 00:00 0 \r\n7f8e38021000-7f8e3c000000 ---p 00000000 00:00 0 \r\n7f8e40000000-7f8e40021000 rw-p 00000000 00:00 0 \r\n7f8e40021000-7f8e44000000 ---p 00000000 00:00 0 \r\n7f8e44000000-7f8e44021000 rw-p 00000000 00:00 0 \r\n7f8e44021000-7f8e48000000 ---p 00000000 00:00 0 \r\n7f8e48000000-7f8e48021000 rw-p 00000000 00:00 0 \r\n7f8e48021000-7f8e4c000000 ---p 00000000 00:00 0 \r\n7f8e4c2a1000-7f8e4c2b7000 r-xp 00000000 ca:01 428                        /lib64/libgcc_s-4.4.4-20100726.so.1\r\n7f8e4c2b7000-7f8e4c4b6000 ---p 00016000 ca:01 428                        /lib64/libgcc_s-4.4.4-20100726.so.1\r\n7f8e4c4b6000-7f8e4c4b7000 rw-p 00015000 ca:01 428                        /lib64/libgcc_s-4.4.4-20100726.so.1\r\n7f8e4c4b7000-7f8e4c4b8000 ---p 00000000 00:00 0 \r\n7f8e4c4b8000-7f8e4ccb8000 rw-p 00000000 00:00 0 \r\n7f8e4ccb8000-7f8e4ccb9000 ---p 00000000 00:00 0 \r\n7f8e4ccb9000-7f8e4d4b9000 rw-p 00000000 00:00 0 \r\n7f8e4d4b9000-7f8e4d4ba000 ---p 00000000 00:00 0 \r\n7f8e4d4ba000-7f8e4dcba000 rw-p 00000000 00:00 0 \r\n7f8e4dcba000-7f8e4dcbb000 ---p 00000000 00:00 0 \r\n7f8e4dcbb000-7f8e4e4bb000 rw-p 00000000 00:00 0 \r\n7f8e4e4bb000-7f8e4e4d1000 r-xp 00000000 ca:01 8115                       /lib64/libresolv-2.12.so\r\n7f8e4e4d1000-7f8e4e6d1000 ---p 00016000 ca:01 8115                       /lib64/libresolv-2.12.so\r\n7f8e4e6d1000-7f8e4e6d2000 r--p 00016000 ca:01 8115                       /lib64/libresolv-2.12.so\r\n7f8e4e6d2000-7f8e4e6d3000 rw-p 00017000 ca:01 8115                       /lib64/libresolv-2.12.so\r\n7f8e4e6d3000-7f8e4e6d5000 rw-p 00000000 00:00 0 \r\n7f8e4e6d5000-7f8e4e6dc000 r-xp 00000000 ca:01 8117                       /lib64/librt-2.12.so\r\n7f8e4e6dc000-7f8e4e8db000 ---p 00007000 ca:01 8117                       /lib64/librt-2.12.so\r\n7f8e4e8db000-7f8e4e8dc000 r--p 00006000 ca:01 8117                       /lib64/librt-2.12.so\r\n7f8e4e8dc000-7f8e4e8dd000 rw-p 00007000 ca:01 8117                       /lib64/librt-2.12.so\r\n7f8e4e8dd000-7f8e4e8f3000 r-xp 00000000 ca:01 8099                       /lib64/libnsl-2.12.so\r\n7f8e4e8f3000-7f8e4eaf2000 ---p 00016000 ca:01 8099                       /lib64/libnsl-2.12.so\r\n7f8e4eaf2000-7f8e4eaf3000 r--p 00015000 ca:01 8099                       /lib64/libnsl-2.12.so\r\n7f8e4eaf3000-7f8e4eaf4000 rw-p 00016000 ca:01 8099                       /lib64/libnsl-2.12.so\r\n7f8e4eaf4000-7f8e4eaf6000 rw-p 00000000 00:00 0 \r\n7f8e4eaf6000-7f8e4ec5f000 r-xp 00000000 ca:01 8089                       /lib64/libc-2.12.so\r\n7f8e4ec5f000-7f8e4ee5e000 ---p 00169000 ca:01 8089                       /lib64/libc-2.12.so\r\n7f8e4ee5e000-7f8e4ee62000 r--p 00168000 ca:01 8089                       /lib64/libc-2.12.so\r\n7f8e4ee62000-7f8e4ee63000 rw-p 0016c000 ca:01 8089                       /lib64/libc-2.12.so\r\n7f8e4ee63000-7f8e4ee68000 rw-p 00000000 00:00 0 \r\n7f8e4ee68000-7f8e4ee7f000 r-xp 00000000 ca:01 8113                       /lib64/libpthread-2.12.so\r\n7f8e4ee7f000-7f8e4f07f000 ---p 00017000 ca:01 8113                       /lib64/libpthread-2.12.so\r\n7f8e4f07f000-7f8e4f080000 r--p 00017000 ca:01 8113                       /lib64/libpthread-2.12.so\r\n7f8e4f080000-7f8e4f081000 rw-p 00018000 ca:01 8113                       /lib64/libpthread-2.12.so\r\n7f8e4f081000-7f8e4f085000 rw-p 00000000 00:00 0 \r\n7f8e4f085000-7f8e4f09e000 r-xp 00000000 ca:01 9887                       /usr/lib64/libevent-1.4.so.2.1.3\r\n7f8e4f09e000-7f8e4f29e000 ---p 00019000 ca:01 9887                       /usr/lib64/libevent-1.4.so.2.1.3\r\n7f8e4f29e000-7f8e4f29f000 rw-p 00019000 ca:01 9887                       /usr/lib64/libevent-1.4.so.2.1.3\r\n7f8e4f29f000-7f8e4f2a0000 rw-p 00000000 00:00 0 \r\n7f8e4f2a0000-7f8e4f2be000 r-xp 00000000 ca:01 8081                       /lib64/ld-2.12.so\r\n7f8e4f4b0000-7f8e4f4b5000 rw-p 00000000 00:00 0 \r\n7f8e4f4bd000-7f8e4f4be000 rw-p 00000000 00:00 0 \r\n7f8e4f4be000-7f8e4f4bf000 r--p 0001e000 ca:01 8081                       /lib64/ld-2.12.so\r\n7f8e4f4bf000-7f8e4f4c0000 rw-p 0001f000 ca:01 8081                       /lib64/ld-2.12.so\r\n7f8e4f4c0000-7f8e4f4c1000 rw-p 00000000 00:00 0 \r\n7fff239d1000-7fff239f2000 rw-p 00000000 00:00 0                          [stack]\r\n7fff239ff000-7fff23a00000 r-xp 00000000 00:00 0                          [vdso]\r\nffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]```","comments":4,"title":"Dies when sending a message to a client listening through a websocket","updated_at":"2011-10-10T21:30:39Z","url":"https://api.github.com/repos/nicolasff/webdis/issues/31","id":1554777,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/ddc7efb10e912f8b87a9050fdf291abf?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/okko","id":485375,"login":"okko"},"html_url":"https://github.com/nicolasff/webdis/issues/31","labels":[],"state":"open"},"legacy":{"issue_id":1554777,"comment_id":2352557}}