Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86448 invoked from network); 26 Feb 2014 15:58:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2014 15:58:01 -0000 Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.47.236 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.47.236 uk1rly2283.eechost.net Linux 2.6 Received: from [217.69.47.236] ([217.69.47.236:51940] helo=uk1rly2283.eechost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/31-12475-70F0E035 for ; Wed, 26 Feb 2014 10:58:00 -0500 Received: from [82.152.109.199] (helo=[192.168.0.106]) by uk1rly2283.eechost.net with esmtpa (Exim 4.72) (envelope-from ) id 1WIgsE-0001d9-Qz for internals@lists.php.net; Wed, 26 Feb 2014 15:58:18 +0000 Message-ID: <530E0F02.2060707@saxonica.com> Date: Wed, 26 Feb 2014 15:57:54 +0000 Organization: Saxonica User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------000305030004050703050300" X-Auth-Info: oneil@saxonica.com (plain) Subject: Thread safety issue in C++ extension module From: oneil@saxonica.com (O'Neil Delpratt) --------------000305030004050703050300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I hope I am submitting this message to the correct list. I have a blocking issue on thread safety in our PHP extension module that we have developed at Saxonica called Saxon/C, which provides XSLT 2.0 and XQuery support in PHP. The extension is built in C++ using Zend module framework. The aplication is quite involved as it was cross-compiled from Java using Excelsior JET, with its own JVM. The JVM can only be accessed in one os process. The issue is I get some intermittent crashes in my php scripts, which I believe is due to more than one process accessing same JET JVM resource. It seems like my global objects are getting reused in another php request. I am wondering if someone could give me some advice on how to build the Saxon/C extension library to overcome this problem or just point me in the right direction. I have tried to follow some forum posts in regards to creating a TSRM layer but I am not getting very far with this. kind regards, -- O'Neil Delpratt Software Developer, Saxonica Limited Email: oneil@saxonica.com Tel: +44 118 946 5894 Web: http://www.saxonica.com Saxonica Community Site: http://dev.saxonica.com Saxonica Bug tracking System: https://saxonica.plan.io/ --------------000305030004050703050300--