ORA-07445 Exception Encountered - Core Dump Analysis Guide
ORA-07445: Exception Encountered
Section titled “ORA-07445: Exception Encountered”Error Overview
Section titled “Error Overview”Error Text: ORA-07445: exception encountered: core dump [string] [string] [string] [string] [string] [string]
The ORA-07445 error indicates an Oracle process has encountered an exception causing a core dump. This is a serious error typically caused by software bugs, memory corruption, or OS-level issues. Like ORA-00600, this usually requires Oracle Support assistance.
Understanding ORA-07445
Section titled “Understanding ORA-07445”Error Structure
Section titled “Error Structure”ORA-07445: exception encountered: core dump [kglic0()+1100] [SIGSEGV] [ADDR:0x0] [PC:0x1234567] [Address not mapped to object] [] ^^^^^^^^^^^^^^^^ ^^^^^^^^ Function+offset Signal type
Common Signal Types
Section titled “Common Signal Types”Signal | Description | Common Cause |
---|---|---|
SIGSEGV | Segmentation violation | Invalid memory access |
SIGBUS | Bus error | Memory alignment issues |
SIGFPE | Floating point exception | Division by zero |
SIGILL | Illegal instruction | Corrupted code |
SIGABRT | Abort signal | Process self-termination |
Initial Response
Section titled “Initial Response”1. Assess Impact
Section titled “1. Assess Impact”-- Check if database is still runningSELECT instance_name, status, database_statusFROM v$instance;
-- Check for other affected sessionsSELECT COUNT(*) as active_sessionsFROM v$sessionWHERE status = 'ACTIVE' AND type = 'USER';
-- Recent errorsSELECT originating_timestamp, message_textFROM x$dbgalertextWHERE message_text LIKE '%ORA-07445%' OR message_text LIKE '%ORA-00600%'ORDER BY originating_timestamp DESCFETCH FIRST 20 ROWS ONLY;
2. Locate Core Dump and Trace Files
Section titled “2. Locate Core Dump and Trace Files”# Find core dump locationcd $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/cdumpls -la core*
# Alternative locationsfind $ORACLE_BASE -name "core*" -mtime -1 2>/dev/null
# Find associated trace filecd $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/tracels -lt | grep -E "(ora_|j00)" | head -20
# Check incidentcd $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/incidentls -la
3. Gather Diagnostic Information
Section titled “3. Gather Diagnostic Information”# Using ADRCIadrci
ADRCI> set home diag/rdbms/mydb/mydbADRCI> show incident -mode detail -p "error_text like '%07445%'"
# Create incident packageADRCI> ips create package incident <incident_id>ADRCI> ips add file <core_dump_path> package 1ADRCI> ips generate package 1 in /tmp/ora7445_package
# Manual collectiontar -czf ora7445_diag.tar.gz \ $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/*ora*.trc \ $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/cdump/core* \ $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/alert/alert*.log
Common Scenarios and Solutions
Section titled “Common Scenarios and Solutions”Scenario 1: Memory Corruption
Section titled “Scenario 1: Memory Corruption”-- Check memory parametersSHOW PARAMETER memory_targetSHOW PARAMETER sga_targetSHOW PARAMETER pga_aggregate_target
-- Flush memory structuresALTER SYSTEM FLUSH SHARED_POOL;ALTER SYSTEM FLUSH BUFFER_CACHE;
-- If recurring, reduce memory to avoid bad memory regionALTER SYSTEM SET sga_target = 8G SCOPE=SPFILE;ALTER SYSTEM SET pga_aggregate_target = 2G SCOPE=SPFILE;-- Restart requiredSHUTDOWN IMMEDIATE;STARTUP;
Scenario 2: OS Resource Issues
Section titled “Scenario 2: OS Resource Issues”# Check system resourcesfree -mdf -hulimit -a
# Check for OS errorsdmesg | tail -50grep -i error /var/log/messages | tail -20
# Verify Oracle user limits (/etc/security/limits.conf)oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle soft stack 10240oracle hard stack 32768
Scenario 3: Known Bug Patterns
Section titled “Scenario 3: Known Bug Patterns”-- Common bug indicators-- Function names often indicate the area:-- kgl* - Library cache-- kks* - SQL Execution-- ktb* - Table access-- ktu* - Undo management-- kcb* - Buffer cache
-- Check for known patchesSELECT patch_id, action, status, descriptionFROM sys.dba_registry_sqlpatchWHERE description LIKE '%07445%'ORDER BY action_time DESC;
Workarounds and Temporary Fixes
Section titled “Workarounds and Temporary Fixes”1. Disable Problematic Features
Section titled “1. Disable Problematic Features”-- Common feature workaroundsALTER SYSTEM SET "_cursor_features_enabled"=2 SCOPE=BOTH;ALTER SYSTEM SET "_optimizer_adaptive_plans"=FALSE SCOPE=BOTH;ALTER SYSTEM SET "_px_adaptive_dist_method"='OFF' SCOPE=BOTH;
-- Disable specific optimizer featuresALTER SYSTEM SET "_optimizer_null_aware_antijoin"=FALSE SCOPE=BOTH;ALTER SYSTEM SET "_optimizer_ansi_rearchitecture"=FALSE SCOPE=BOTH;
2. Session-Level Workarounds
Section titled “2. Session-Level Workarounds”-- For specific sessions experiencing issuesALTER SESSION SET optimizer_mode = RULE;ALTER SESSION SET "_complex_view_merging"=FALSE;ALTER SESSION SET workarea_size_policy = MANUAL;ALTER SESSION SET sort_area_size = 524288000;
3. SQL-Level Workarounds
Section titled “3. SQL-Level Workarounds”-- Use hints to avoid problematic code pathsSELECT /*+ NO_MERGE USE_NL(t1 t2) */ t1.col1, t2.col2FROM table1 t1, table2 t2WHERE t1.id = t2.id;
-- Rewrite problematic queries-- Instead of complex MERGEMERGE INTO target tUSING source s ON (t.id = s.id)WHEN MATCHED THEN UPDATE...WHEN NOT MATCHED THEN INSERT...;
-- Use separate UPDATE and INSERTUPDATE target tSET ...WHERE EXISTS (SELECT 1 FROM source s WHERE s.id = t.id);
INSERT INTO targetSELECT * FROM source sWHERE NOT EXISTS (SELECT 1 FROM target t WHERE t.id = s.id);
Analysis Techniques
Section titled “Analysis Techniques”Stack Trace Analysis
Section titled “Stack Trace Analysis”# Extract function call stackgrep -A 20 "Call Stack" <trace_file>
# Common problematic call stacks# Buffer cache issues:kcbgtcr -> kcbgcur -> ktbgcur -> ktrget
# Library cache issues:kglLock -> kglget -> kksfbc -> kkspsc0
# Memory issues:kghalf -> kghalp -> kghfnd -> kghalo
Using GDB for Core Analysis
Section titled “Using GDB for Core Analysis”# Basic core dump analysisgdb $ORACLE_HOME/bin/oracle core.<pid>
(gdb) where(gdb) info registers(gdb) x/10i $pc-20(gdb) quit
# Extract readable informationstrings core.<pid> | grep -E "(SELECT|INSERT|UPDATE|DELETE)" | head -20
Preventive Measures
Section titled “Preventive Measures”System Health Monitoring
Section titled “System Health Monitoring”-- Create monitoring procedureCREATE OR REPLACE PROCEDURE monitor_system_health AS v_count NUMBER;BEGIN -- Check for recent ORA-07445 SELECT COUNT(*) INTO v_count FROM x$dbgalertext WHERE message_text LIKE '%ORA-07445%' AND originating_timestamp > SYSTIMESTAMP - INTERVAL '1' HOUR;
IF v_count > 0 THEN -- Send alert DBMS_OUTPUT.PUT_LINE('CRITICAL: ORA-07445 detected in last hour'); -- Can integrate with email/monitoring system END IF;
-- Check core dump directory -- Use UTL_FILE to check for new core filesEND;/
-- Schedule monitoringBEGIN DBMS_SCHEDULER.CREATE_JOB( job_name => 'MONITOR_SYSTEM_HEALTH', job_type => 'STORED_PROCEDURE', job_action => 'monitor_system_health', repeat_interval => 'FREQ=HOURLY', enabled => TRUE );END;/
Patch Management
Section titled “Patch Management”# Regular patch checks$ORACLE_HOME/OPatch/opatch lsinventory -detail > patch_inventory.txt
# Check for recommended patches# Search MOS for:# - Database version + "recommended patches"# - "ORA-07445" + first argument function# - Platform-specific bundle patches
# Apply patches proactivelycd $ORACLE_HOME$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph <patch_location>$ORACLE_HOME/OPatch/opatch apply <patch_location>
Oracle Support Interaction
Section titled “Oracle Support Interaction”Information to Provide
Section titled “Information to Provide”- Complete error message from alert log
- Stack trace from trace file
- Core dump file (if under 2GB)
- System information:
Terminal window uname -acat /etc/os-releasefree -mulimit -a - Recent changes (patches, upgrades, application changes)
SR Template for ORA-07445
Section titled “SR Template for ORA-07445”Problem: ORA-07445 [function_name]
Environment:- Database Version: 19.15.0.0- OS: Oracle Linux 7.9- Platform: x86_64
Error Frequency: [Once/Intermittent/Frequent]First Occurrence: [Date/Time]Business Impact: [Critical/High/Medium]
Error Details:ORA-07445: exception encountered: core dump [full_error_text]
Associated SQL: [If available from trace]
Troubleshooting Done:1. [List steps taken]2. [Workarounds attempted]
Diagnostic Files Uploaded:- Incident package: [filename]- Core dump: [filename]- Alert log: [filename]
Recovery Procedures
Section titled “Recovery Procedures”Instance Recovery
Section titled “Instance Recovery”-- If instance crashedSTARTUP MOUNT;ALTER DATABASE RECOVER;ALTER DATABASE OPEN;
-- Check for corruptionRMAN> VALIDATE DATABASE;
-- Review alert log for additional errorsSELECT originating_timestamp, message_textFROM x$dbgalertextWHERE originating_timestamp > SYSTIMESTAMP - INTERVAL '1' HOURORDER BY originating_timestamp;
Session Cleanup
Section titled “Session Cleanup”-- Find and clean up affected sessionsSELECT s.sid, s.serial#, s.username, s.program, s.status, p.spid, p.pidFROM v$session s, v$process pWHERE s.paddr = p.addr AND s.status = 'KILLED';
-- Force cleanup if neededALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
-- OS level cleanup-- kill -9 <spid>
Related Errors
Section titled “Related Errors”- ORA-00600 - Internal error code
- ORA-03113 - End-of-file on communication channel
- ORA-00603 - ORACLE server session terminated
- ORA-04030 - Out of process memory
Quick Reference
Section titled “Quick Reference”Emergency Response Checklist
Section titled “Emergency Response Checklist”- ✓ Check database status
- ✓ Locate core dump and traces
- ✓ Create incident package
- ✓ Check for known bugs
- ✓ Apply workarounds if available
- ✓ Open Oracle SR with Severity 1 if production
- ✓ Monitor for recurrence
- ✓ Plan patching strategy
Common Functions and Areas
Section titled “Common Functions and Areas”kgl*
- Library Cachekks*
- SQL Compilationkxs*
- SQL Executionkcb*
- Buffer Cachektb*
- Table Accessktu*
- Undo/Transactionkge*
- Error Handlingkgh*
- Memory Management