PHP SDK Segfault


#1

Latest Couchbase PHP extension is crashing too often to be used in production.

Faulting application name: php-cgi.exe, version: 5.6.14.0, time stamp: 0x560c5522
Faulting module name: php_couchbase.dll, version: 5.6.7.0, time stamp: 0x563a6d2b
Exception code: 0xc0000005
Fault offset: 0x0000271b
Faulting process id: 0x37f4
Faulting application start time: 0x01d149be391d7134
Faulting application path: D:\php_runtime\php5_6\php-cgi.exe
Faulting module path: D:\php_runtime\php5_6\ext\php_couchbase.dll
Report Id: 8e9bea43-c74e-4059-bfe0-bc57a0f8eeda
Faulting package full name:
Faulting package-relative application ID:

I got a full memory user dump for further investigation.

https://onedrive.live.com/redir?resid=44AA4CD7858C0134!5668&authkey=!AFNymu4ELs_kMpw&ithint=file%2Czip


#2

Just for the record, I can reproduce this consistently. It is happening during a call to upsert. Reproducing consistently does not mean that I can build a simpel demo script.

It looks like it’s not the specific call to upsert what is making it crash, but a specific sequence of operations on the Couchbase bucket.


#3

This was it: using a custom transcoder and operating on the bucket in a destruct() call, the transcoder was being destroyed by PHP before calling the bucket.

Basically this happens when operating on a bucket who’s transcoder has already been destroyed by PHP…