Bug #74223 [NEW]: db2 table locks during commit after hitting max_execution_time
| From: | giacomo dot fontanella at carige dot it | Date: | Wed, 08 Mar 2017 10:04:33 +0000 |
| Subject: | Bug #74223 [NEW]: db2 table locks during commit after hitting max_execution_time | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-207743@lists.php.net to get a copy of this message | ||
From: giacomo dot fontanella at carige dot it
Operating system: windows server 2008 R2
PHP version: 5.6.30
Package: PDO ODBC
Bug Type: Bug
Bug description:db2 table locks during commit after hitting max_execution_time
Description:
------------
Any script invoked through an Apache webserver that includes odbc calls
to a IBM db2 database leaves an open application on it if
max_execution_timeout is reached. This can lead to db locks impossible
to resolve, unless either you kill the hanging process on db2 or you
restart the webserver service.
For example, a Reorg operation that should take just few seconds
wouldn't start unless the hanging process is resolved.
Seems similar to bug #63576, reported for php 5.3.16.
My configuration is as follows:
WEBSERVER
OS: Windows server 2008 R2
webserver: Apache 2.4.23, VC11 compiler
PHP: 5.6.30, MSVC11 compiler
DBSERVER
OS: Windows server 2008 R2
database: IBM DB2 9.7.8
Test script:
---------------
<?php
set_time_limit (1);
include("../gestione_connessione.php");
$i = 0;
while(1){
$rs = odbc_exec($cn,"SELECT COUNT(*) as N_RECORD FROM
DBTEST.TB_TEST");
echo "<br>".$i." ".odbc_result($rs,"N_RECORD");
$i++;
}
?>
Expected result:
----------------
Loading halted after 1 second, no after effects.
Actual result:
--------------
Loading halted after 1 second, this is the error in log file:
[Wed Mar 08 10:13:32.744279 2017] [:error] [pid 4872:tid 2064] [client
xx.xx.xx.xx:62549] PHP Fatal error: Maximum execution time of 1 second
exceeded in [PATH]\\test_lock.php on line 8
On the db2 server remains a httpd.exe application in UOW waiting
status:
(taken from db2 monitor)
ID: 7679
Application name: httpd.exe
OS user: [Account assigned to apache service]
DB user: [db2 user]
Status: UOW witing
Last operation: SQL fetch
DB: [db instance]
Connect time: 08/03/2017 10.13.33
This application hangs indefinitely; if I launch a REORG on
DBTEST.TB_TEST, this is what I get from the db2 monitor for the related
process:
ID: 7712
Application name: db2bp.exe
OS user: [admin account]
DB user: [admin account]
Status: Lock wait
Last operation: Reorg
DB: [db instance]
Connect Time: 08/03/2017 10.51.08
--
Edit bug report at https://bugs.php.net/bug.php?id=74223&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74223&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74223&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74223&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74223&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74223&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74223&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74223&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74223&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74223&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74223&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74223&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74223&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74223&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74223&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74223&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74223&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74223&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74223&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74223&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74223&r=mysqlcfg