-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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.