Skip to content

Segmentation Fault #261

@fixedd

Description

@fixedd

Our script is dying with a Segmentation Fault in some cases (but not all). It seems to happen in executions of our script which cause a very high number (a few thousand) of messages to be delivered into our queue and it's 100% reproducable with those sets of data. I don't really know how to work with GDB, but I was able to get the following out of it:

0 zend_std_get_method (object_ptr=0x2959ac0, method_name=0x1f425e0 "connectionClose", method_len=15) at /build/buildd/php5-5.3.10/Zend/zend_object_handlers.c:847

847 /build/buildd/php5-5.3.10/Zend/zend_object_handlers.c: No such file or directory.

connectionClose() is called by AbstractConnection's close()method. I tried adding some more sanity checks, such as changing

if (!$this->protocolWriter || !$this->isConnected()) {

to

if (!$this->protocolWriter || !$this->isConnected() || !is_object($this->protocolWriter) || !method_exists($this->protocolWriter, 'connectionClose')) {

to no avail. I'm not really sure what GDB is telling me the problem is, so I'm not really sure of the right way to address it. Immediately returning null from the close method has solved our problem in the short-term, but I fear this will end up causing more problems than it solves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions