Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Zookeeper protocol weirdness and pure Python kazoo client


+
Ben Bangert 2012-08-30, 23:00
+
Ben Bangert 2012-08-30, 23:02
+
Michi Mutsuzaki 2012-08-30, 23:50
+
Ben Bangert 2012-08-31, 00:06
+
Henry Robinson 2012-08-31, 00:10
+
Ben Bangert 2012-08-31, 04:00
+
Ben Bangert 2012-08-31, 05:04
+
Henry Robinson 2012-08-31, 06:57
+
Ben Bangert 2012-08-31, 16:39
+
Michi Mutsuzaki 2012-08-31, 21:30
+
Ted Dunning 2012-08-31, 20:02
Copy link to this message
-
Re: Zookeeper protocol weirdness and pure Python kazoo client
On Aug 30, 2012, at 4:00 PM, Ben Bangert <[EMAIL PROTECTED]> wrote:
> So far, I've found that if I send malformed Auth packets that are missing the auth_type int, after a few times I can get the Zookeeper server to segfault. I'll attach some more log scripts and a test script to trigger it next.

If you checkout the pure-python kazoo branch, this script will segfault Zookeeper immediately on my machine:
import logging

from kazoo.client import KazooClient
from kazoo.protocol.serialization import (
    Auth,
    write_buffer,
    write_string
)

logging.basicConfig(level=logging.DEBUG)
class BadAuth(Auth):
    type = 100

    def serialize(self):
        return (write_string(self.scheme) + write_buffer(self.auth))

k = KazooClient()
k.start()
k._queue.put((BadAuth(0, 'digest', 'user:password'), None))
It apparently really really doesn't like the fact that the auth_type is missing from the payload. A proper message length is provided though (for the admittedly malformed request), whatever Zookeeper is doing to read the buffer fails to account for the string being where it expected the int. Shouldn't this return a marshaling error?

- Ben
+
Michi Mutsuzaki 2012-08-30, 23:37
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB