My oracle 12c (12.1.0.1) database stop working last night (actually It worked but very very slow) , and started throwing the following exception:
java.sql.SQLException: ORA-00600: internal error code, arguments::
[KGL-heap-size-exceeded], [0x07B292C58], [0], [524314616], [], [], [],
[], [], [], [], []
Have not idea what is causing this problem, and I can't find any useful information. Does anyone knows about this "KGL heap size exceeded"? Thanks
ORA-00600 errors are bugs in Oracle's software and should first be investigated on support.oracle.com. Many of the support documents are not public and cannot be found on any other search engine.
When you get to that site, search for "ora-600 tool", which will bring you to a special page. That page will ask you for the first argument. Enter KGL-heap-size-exceeded, hit "Look-up Error", and it will show a single document with more information - "ORA-600 [KGL-heap-size-exceeded] (Doc ID 1662971.1)".
That document includes links to 5 different bugs. I'm not sure which is the relevant bug, it depends on your version and exactly how the bug happens. And there are many bugs that aren't even published on My Oracle Support.
After you've looked on the website, and tried either solving or avoiding the problem, then you might want to create a ticket. But do not immediately create a ticket for every ORA-00600 error or you will waste a tremendous amount of time.
There is usually a trace file associated with this error which gives a details of the error. in order to resolve you need to set this parameter
alter system set "_kgl_large_heap_warning_threshold"=88608 scope=spfile sid='*';
In the example above I set the value to 8MB.
Related
I'm trying to implement MonetDB in three machines, one master and two replicas in lazy logical replication.
For now I'm trying to implement in only machine with the following commands I took from this old issue in only one machine for now.
Everything goes according to plan until the first problem I have: When trying to create tables or inserting stuff I get the following errors I was not able to find on google:
Error in optimizer wlc: TypeException:user.main[17]:'wlc.predicate' undefined in: X_0:any := wlc.predicate("alpha":str, "id":str);
Error in optimizer wlc: TypeException:user.main[50]:'wlc.predicate' undefined in: X_0:any := wlc.predicate("beta":str, "id":str);
Error in optimizer wlc: TypeException:user.main[77]:'wlc.depend' undefined in: X_0:any := wlc.depend("beta":str, X_1:lng);
I got around this by setting optpipe to minimal_pipe but I wanted to know why this is happening so I don't have to do this.
The second problem I have when trying CALL wlr.replicate:
Perhaps a missing wlr.master() call.
How do I correctly set-up replication?
Thanks in advance.
The wlc/wlr features are experimental and de facto deprecated in current releases of MonetDB and completely removed starting from the next major release. Replication in MonetDB is a topic currently under revision. You might be better off formulating a feature request on MonetDB's githup page.
You might also consider looking into the concepts of replicate and remote tables. But those are definitely not solutions by themselves and if used as such, implement replication on the SQL layer instead of the infrastructural layer.
But on the short run, I do not expect that the open source community can help you out here much. Consider commercial support otherwise if feasible.
I am doing reporting in OTBI (Oracle Cloud). Can any one help me to customize "General Ledger Trial Balance Report". I am getting error as
ORA-20101: ORA-06512: at "FUSION.GL_GLGENLED_XMLP_PKG"
while editing the data model for the standard Report. Any one have any idea.
ORA-20101 isn't Oracle built-in error; codes from -20000 to -20999 are custom-reserved codes, so I suppose that it was used by developer who raised it in package/procedure you named. If you have access to it, search for "20101" and see why it happened.
ORA-06512, on the other hand, means that you hit an unhandled exception at line #4. That's good for troubleshooting (i.e. looking at that piece of code and find the culprit at line #4). But, if you don't/can't review that procedure, huh, you're in trouble. Basically, there are 3 ways out:
fix the error yourself, if you can
write an exception handler which will handle that situation (if you can)
ask your DBA for help
I'm not sure whether you can do anything of above as it looks like Oracle-written procedure, so ...
Finally, your last resort is to contact Oracle Support and ask for assistance.
We have a number of .NET applications that use the Oracle Data Provider for .NET. This generally works fine, but occassionally we get a burst of errors from one particular application (sometimes other but very rarely), where its claiming something went wrong with the Oracle Data Access Client. The errors are sometimes slightly different, but all relate to User Defined Types. One example of a failure would be;
Inner Exception:
Message: Object reference not set to an instance of an object.
Source: Oracle.DataAccess
Stack Trace:
at Oracle.DataAccess.Types.OracleUdtDescriptor.get_UdtTypeName()
at Oracle.DataAccess.Client.OracleDataReader.RetrieveSchemaTable(DataTable&
dataTable, Boolean isFromEx)
at Oracle.DataAccess.Client.OracleDataReader.GetSchemaTableCopy(DataTable&
dataTable, Boolean isFromEx)
at Oracle.DataAccess.Client.OracleDataReader.GetSchemaTable()
The SQL that causes this is;
SELECT a.SECTION_NO,
INITCAP(a.SECTION_NAME) AS SECTION_NAME,
a.SITE_USRN,
a.NETWORK_HIERARCHY,
a.ROAD_CLASS,
a.CENTRAL_ASSET_ID,
a.GEOM,
SDO_NN_DISTANCE(1) AS dist
FROM SCHEMANAME.TABLE_NAME a
WHERE SDO_NN(a.GEOM,
sdo_geometry(2001, 27700, sdo_point_type(366646,101677,NULL), NULL, NULL), 'sdo_num_res=1',1)
= 'TRUE'
There's no pattern to when this happens, and 95% of the time these requests go through with no problem, but at least once a day this will happen. It'll keep occuring for 1 or 2 minutes (so I'll get 10-20 error alerts, all saying about the same thing), then it'll sort itself out and it'll be fine again. I really don't understand what the problem is. I don't know much about User Defined Types, and searching for the particular error results in very few relevant results.
Another example of a similar error message we sometimes get;
Inner Exception:
Message: Object reference not set to an instance of
an object.
Source: Oracle.DataAccess
Stack Trace:
at Oracle.DataAccess.Types.OracleUdtDescriptor.GetMetaDataTable()
at Oracle.DataAccess.Client.OracleDataReader.GetCachedOracleUdtDescriptor(Int32
index)
at Oracle.DataAccess.Client.OracleDataReader.RetrieveSchemaTable(DataTable&
dataTable, Boolean isFromEx)
at Oracle.DataAccess.Client.OracleDataReader.GetSchemaTableCopy(DataTable&
dataTable, Boolean isFromEx)
at Oracle.DataAccess.Client.OracleDataReader.GetSchemaTable()
As you can see, they are similar, but not exactly the same which makes tracking it down even harder. The only possibilities I can think of is it is something to do with pulling back the GEOM column, but we do that in a huge number of places and don't get this error, or possibly something to do with pulling back the SDO_NN number, but again, we do that in multiple places with no errors.
As far as I can tell there are no special or exotic column types being returned there, apart from the GEOM, which, considering we are using Oracle Spatial, shouldn't be a problem.
One fix I have attempted is to add a setting to my Web.config called StatementCacheWithUdts.
<oracle.dataaccess.client>
<settings>
<add name="StatementCacheWithUdts" value="0"/>
</settings>
</oracle.dataaccess.client>
This was based on a similar problem I found somewhere (cannot find the link anymore, stupidly forgot to write it down), but this didn't resolve the problem.
Does anyone have any pointers whatsoever as to what I can try?
Further Details
Oracle version: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
ODP.Net version: 4.121.2.0 ODAC RELEASE 3
The error I'm getting is "no more data to read from socket" on this line
COALESCE( NonRewrite.SALES_LOG_DATE, SYSDATE) "SoldDate"
Oddly, I can just do NonRewrite.SALES_LOG_DATE and there are no null values anyway. If I do SYSDATE alone it gives me the same error.
If I replace SYSDATE with TO_DATE('18-MAR-2016')), I do not receive an error.
"no more data to read from socket" is a generic error that doesn't really tell you the problem. That error means a database process crashed so hard it didn't even raise a proper exception and the connection died unexpectedly.
When that happens Oracle stores an error message in the alert log, which you can find in the path found from this query: select value from v$parameter where name = 'background_dump_dest';. Look for a file named alert*.log.
In that file there will probably be an ORA-600 or ORA-7445 error around the same time as the exception. The error usually has several parameters, for example ORA-00600: internal error code, arguments: [ktfbtgex-7], [1015817], [1024], [1015816], [], [], [], [].
The first parameter is usually the most important one. If you're lucky you can Google it and find an answer. But usually you'll need to login to support.oracle.com and search for that error. There's a special page for that, search for the "ora-600 tool". That will bring up a page to search for the first parameter of the error message.
Hopefully that tool will bring up specific documents that explain the problem. There may be a patch, or a workaround, or possibly no information at all. It's usually easiest to workaround the problem by avoiding some very specific combination of features, possibly by slightly re-writing the query.
Post the error message, the exact Oracle version, and the entire query and someone may be able to help. If the query is large you'll want to shrink it as much as possible. Shrinking the query and making a reproducible test case may take a few hours but is necessary to truly understand the problem. People who don't spend the time doing that usually end up avoiding important features and give bad advice to other developers like "avoid SYSDATE!".
These types of errors may take a long time to fix.
I have a 400 line sql query which is throwing exception withing 30 seconds
ORA-03113: end-of-file on communication channel
Below are things to note:
I have set the timeout as 10 mins
There is one last condition when removed resolves this error.
This error came only recently when I analyzed indexes.
The troubling condition is like this:
AND UPPER (someMultiJoin.someColumn) LIKE UPPER ('%90936%')
So my assumption is that the query is getting terminated from the server side apparently because its identified as a resource hog.
Is my assumption appropriate ? How should I go about to fix this problem ?
EDIT: I tried to get the explain plan of faulty query but the explain plan query also gives me an ORA-03113 error. I understand that my query is not very performant but why should that be a reason for ORA-03113 error. I am trying to run the query from toad and there are no alert log or trace generated, my db version is
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
One possible cause of this error is a thread crash on the server side. Check whether the Oracle server has generated any trace files, or logged any errors in its alert log.
You say that removing one condition from the query causes the problem to go away. How long does the query take to run without that condition? Have you checked the execution plans for both versions of the query to see if adding that condition is causing some inefficient plan to be chosen?
I've had similar connection dropping issues with certain variations on a query. In my case connections dropped when using rownum under certain circumstances. It turned out to be a bug that had a workaround by adjusting a certain Oracle Database configuration setting. We went with a workaround until a patch could be installed. I wish I could remember more specifics or find an old email on this but I don't know that the specifics would help address your issue. I'm posting this just to say that you've probably encountered a bug and if you have access to Oracle's support site (support.oracle.com) you'll likely find that others have reported it.
Edit:
I had a quick look at Oracle support. There are more than 1000 bugs related to ORA-03113 but I found one that may apply:
Bug 5015257: QUERY FAILS WITH ORA-3113 AND COREDUMP WHEN QUERY_REWRITE_ENABLED='TRUE'
To summarize:
Identified in 9.2.0.6.0 and fixed in 10.2.0.1
Running a particular query
(not identified) causes ORA-03113
Running explain on query does the
same
There is a core file in
$ORACLE_HOME/dbs
Workaround is to set
QUERY_REWRITE_ENABLED to false: alter
system set query_rewrite_enabled =
FALSE;
Another possibility:
Bug 3659827: ORA-3113 FROM LONG RUNNING QUERY
9.2.0.5.0 through 10.2.0.0
Problem: Customer has long running query that consistently produces ORA-3113 errros.
On customers system they receive core.log files but do not receive any errors
in the alert.log. On test system I used I receivded ORA-7445 errors.
Workaround: set "_complex_view_merging"=false at session level or instance level.
You can safely remove the "UPPER" on both parts if you are using the like with numbers (that are not case sensitive), this can reduce the query time to check the like sentence
AND UPPER (someMultiJoin.someColumn) LIKE UPPER ('%90936%')
Is equals to:
AND someMultiJoin.someColumn LIKE '%90936%'
Numbers are not affected by UPPER (and % is independent of character casing).
From the information so far it looks like an back-end crash, as Dave Costa suggested some time ago. Were you able to check the server logs?
Can you get the plan with set autotrace traceonly explain? Does it happen from SQL*Plus locally, or only with a remote connection? Certainly sounds like an ORA-600 on the back-end could be the culprit, particularly if it's at parse time. The successful run taking longer than the failing one seems to rule out a network problem. I suspect it's failing quite quickly but the client is taking up to 30 seconds to give up on the dead connection, or the server is taking that long to write trace and core files.
Which probably leaves you the option of patching (if you can find a relevant fix for the specific ORA-600 on Metalink) or upgrading the DB; or rewriting the query to avoid it. You may get some ideas for how to do that from Metalink if it's a known bug. If you're lucky it might be as simple as a hint, if the extra condition is having an unexpected impact on the plan. Is someMultiJoin.someColumn part of an index that's used in the successful version? It's possible the UPPER is confusing it and you could persuade it back on to the successful plan by hinting it to use the index anyway, but that's obviously rather speculative.
It means you have been disconnected. This not likely to be due to being a resource hog.
I have seen where the connection to the DB is running over a NAT and because there is no traffic it closes the tunnel and thus drops the connection. Generally if you use connection pooling you won't get this.
As #Daniel said, the network connection to the server is being broken. You might take a look at End-of-file on communication channel to see if it offers any useful suggestions.
Share and enjoy.
This is often a bug in the Cost Based Optimizer with complex queries.
What you can try to do is to change the execution plan. E.g. use WITH to pull some subquerys out. Or use the SELECT /*+ RULE */ hint to prevent Oracle from using the CBO. Also dropping the statistics helps, because Oracle then uses another execution plan.
If you can update the database, make a test installation of 9.2.0.8 and see if the error is gone there.
Sometimes it helps to make a dump of the schema, drop everything in it and import the dump again.
I was having the same error, in my case what was causing it was the length of the query.
By reducing said length, I had no more problems.