Executing an External Table fails with the ORA-29913 ORA-29400 KUP-04095 and ORA-07445 [kpmalloc] Errors in the alert log
(Doc ID 2449764.1)
Last updated on APRIL 17, 2023
Applies to:
Oracle Database - Enterprise Edition - Version 12.1.0.2 and laterInformation in this document applies to any platform.
.
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
Symptoms
1. Running a external table reports with the following errors
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04095: preprocessor command /<DIR>/myUnzip.sh encountered error "pipe read: select failed"
2. The associated error in the alert log is:
3. The Call Stack Trace in the associated incident trace file shows:
4. The issue can be reproduced at will
Sample Script:
#!/usr/bin/python
import gzip
import sys
file_content = ""
file_name = sys.argv[1]
with open("/tmp/myUnzip1.log", "a") as log:
try:
f = gzip.open(file_name,"r")
file_content = f.read()
f.close()
except Exception as e:
log.write("Error while read %s: %s\n" % ( file_name, str(e)))
try:
print file_content
except Exception as e:
log.write("Error while write in stdout(%s): %s\n" % ( file_name, str(e)))
The issue can be reproduced at ct. environment.
Looks like that database is closing the read pipe (stdout of script) and when script tries to write in stdout the error happens.
Tried the following pre processor script:
#!/usr/bin/python
import gzip
import sys
file_content = ""
file_name = sys.argv[1]
with open("/tmp/myUnzip1.log", "a") as log:
try:
f = gzip.open(file_name,"r")
file_content = f.read()
f.close()
except Exception as e:
log.write("Error while read %s: %s\n" % ( file_name, str(e)))
try:
print file_content
except Exception as e:
log.write("Error while write in stdout(%s): %s\n" % ( file_name, str(e)))
The following is reported in script log:
Error while write in stdout(/<DIR>/<FILENAME1>.gz): [Errno 32] Broken pipe
Error while write in stdout(/<DIR>/<FILENAME2>.gz): [Errno 32] Broken pipe
Error while write in stdout(/<DIR>/<FILENAME3>.gz): [Errno 32] Broken pipe
Error while write in stdout(/<DIR>/<FILENAME4>.gz): [Errno 32] Broken pipe
Error while write in stdout(/<DIR>/<FILENAME5>.gz): [Errno 32] Broken pipe
The error is happening in a print, when the script tries to write in stdout.
The issue doesn't reproduce when we limit the select:
select count(1) from EX_TABLE1 where rownum < 100;
But when we do not limit the select, the error reproduces
select count(1) from EX_TABLE1;
Note: The ORA-07445 [kpmalloc] errors appear to be a side effect of 'skudmio.o' being corrupted as the failing argument and the file name are same.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |