Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001472 [Quercus] major always 11-24-06 08:52 05-02-08 16:39
Reporter foxtango View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.0
Summary 0001472: OutOfMemoryError with OCIFetchStatement
Description On using OCIFetchStatement in a php page that runs over quercus we receive an OutOfMemoryError exception: "java.lang.OutOfMemoryError: Java heap space"

We created a very simple case to reproduce this bug. See in additional info please.
Additional Information <?

function getConnection() {
    $db = OCILogon('user', 'pass', '//server:1521/ORCL');
    return $db;
}


$db = getConnection();

$curs = OCINewCursor($db);
$sql = OCIParse($db, 'BEGIN user.package.sp_xxxx(:return_cursor); END;');
OCIBindByName($sql, ':return_cursor', &$curs, -1, OCI_B_CURSOR);
OCIExecute($sql);
OCIExecute($curs);

$pes = array();
// !!! HERE THE PROBLEM OCCOURS !!!
OCIFetchStatement($curs, $pes);

?>
Attached Files

- Relationships

- Notes
(0002172)
nam
08-02-07 01:49

(rep by osmedd)

I developed a very short program that replicates the problem, it appears to be in the return from the oci_fetch_all() php call (it doesn't seem to get to the 'never get here' line when logging is added in). I don't see any references to the OracleModule in the stack trace, so I think I've gone about as far as I can go.

php file:
<?
$conn = oci_connect("USERID", "PASSWD", "java:com/env/jdbc/DB");
$stmt = oci_parse($conn, "select client_id, client_name from client where client_id = 'XYZZY' and client_status = 'A' order by client_name");
oci_execute($stmt);
$rows = oci_fetch_all($stmt, $oraresults);
// never get here...
if ($rows == 0) {
echo 'No results.';
}
else {
echo 'Got results!';
}
oci_free_statement($stmt);
?>

We are alive.

Stack trace:

com.caucho.quercus.QuercusModuleException: java.lang.OutOfMemoryError: Java heap space
com.caucho.quercus.QuercusModuleException.create(QuercusModuleException.java:60)
com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:109)
com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:614)
com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:487)
com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:473)
com.caucho.quercus.env.JavaInvoker.callCopy(JavaInvoker.java:482)
com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:178)
com.caucho.quercus.expr.FunctionExpr.evalCopy(FunctionExpr.java:149)
com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:77)
com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64)
com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:99)
com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:239)
com.caucho.quercus.page.InterpretedPage.execute(InterpretedPage.java:61)
com.caucho.quercus.page.QuercusPage.executeTop(QuercusPage.java:115)
com.caucho.quercus.servlet.QuercusServletImpl.service(QuercusServletImpl.java:121)
com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:341)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
(0003128)
ferg
05-02-08 16:39

php/440d
 

- Issue History
Date Modified Username Field Change
11-24-06 08:52 foxtango New Issue
08-02-07 01:49 nam Note Added: 0002172
05-02-08 16:39 ferg Note Added: 0003128
05-02-08 16:39 ferg Assigned To  => ferg
05-02-08 16:39 ferg Status new => closed
05-02-08 16:39 ferg Resolution open => fixed
05-02-08 16:39 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker