My Oracle Support Banner

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 MARCH 03, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information 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

create table NEWTAB1 parallel compress nologging pctfree 0 as select * from EX_TABLE1;

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:

ORA-07445: exception encountered: core dump [kpmalloc()+120] [SIGSEGV] [ADDR:0x11] [PC:0x39229F8] [Address not mapped to object] []

3.  The Call Stack Trace in the associated incident trace file shows:

skudmio <- mic <- kudmrOpenCBK <- qerxtIOWaitEventCommon <- qerxtIOWaitEventCBK  <- kudmrOpenWaitEventStub <- kudmlgo <- kudmxif <- kudmxo <- kpxsOpen <- qxxqOpen <- spefcpfa <- spefmccallstd <- pextproc <- pgmcetc_execute_trusted_c <- pgmccc_call_c <- pciccc_call_c <- kkxmcexe <- kgmexcb <- rpiswu2 <- kkxmswu <- kgmexwi <- kgmexec <- evapls <- evaopn2 <- qximeop_fbk <- qximeop <- qxxmeop <- qerxtAgentOpen <- qerxtFetch <- rwsfcd <- qerltcFetch <- insexe <- opiexe <- opiodr <- rpidrus <- skgmstack <- rpiswu2 <- rpidrv <- rpiexe <- kqpinvTableCb 

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


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.