Rachel,
Thank you for the log file!
My understanding of your initial post is that the issue is not the memory errors themselves, but the way they are dealt with. (In this sense, the title of the topic is a misnomer.) Please, correct me, if I misunderstand.
After checking the code and performing multiple tests with simulated errors, I am strongly inclined to say that our INDEX REBUILD implementation does catch the kind of errors you were having and re-throws them to the calling procedure -- if it has a chance to do so.
The simulation in my test case consists of starting to throw artificial errors (with the message "Simulated error") for each new row to be indexed after a pre-defined number of rows have been successfully indexed. Here is the error message which was returned to the calling procedure in my test case:
-------------------------
00:20:35 SQL> alter index jcx&&table_name rebuild;
old 1: alter index jcx&&table_name rebuild
new 1: alter index jcxnci_100k rebuild
alter index jcxnci_100k rebuild
*
ERROR at line 1:
ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
ORA-20101: Error while processing ROWID=AAA6XzAAEAAOuiZAAl: Simulated error,
C[N+](C)(C)CCOCC[N+](C)(C)C
ORA-06512: at "PKOVACS_TRUNK.JCHEM_CORE_PKG", line 31
ORA-06512: at "PKOVACS_TRUNK.JC_IDXTYPE_IM", line 48
-------------------------
I am also attaching the log file generated by my test case. Its structure is very similar to the structure of the log file you uploaded and can be divided into the following four main sections:
1. there are a number of lines starting with
SEVERE: Error while processing
(There are 32 such lines in your log file, 4 lines in mine -- one for each indexing thread having run into the error. This number is basically equal to the number of cores available for JChem Server for indexing. It might be less (depending on a number of factors and timing differences in thread scheduling), since the controller thread starts cancelling the indexing thread at the first sign of error, so not all indexing threads may run into the problem.)
2. followed by a number of lines starting with
SEVERE: Error in worker
(This is where the controller thread is reaping the aborted indexing threads and outputs the errors which caused the indexing threads to fail. The number of the reaped threads is less then the failing thread, because at the first aborted indexing thread the controller thread started to cancel the remaining threads and started to remove them from the active set as part of the cancelling.)
3. followed by a single line for the failed roll-back starting with
SEVERE: Io exception: End of TNS data channel
in your case
SEVERE: Simulated error in rollback
(This is the main RMI request thread already taking over from the controller thread and trying to roll-back the work done before the error occurred.)
4. followed by the last SEVERE log line
which introduces the stack trace including the JCartIndexCreate.buildIndexConcurrently method) in the sequence where the error is basically re-thrown to Oracle.
If Oracle is still working at this point, the error is propagated to the client process -- as in my case. But in your case, Oracle has crashed (as you said), so the error might have well been lost under the wreckage and that might be why it never made to the client process.
Peter