상황가정
10261 진단 이벤트 : PGA의 크기가 특정 임계점을 넘어가면 ORA-600 에러 발생 시킴
ORA-10261: Limit the size of the PGA heap
Cause: the limit is one kilobyte times the level of the event. If the pga grows bigger than this signal an internal error.
Action: None
SQL> ------------------------------------------------------------------------------
SQL> -- 10261 diag event
SQL> -- when pga size is over 100MB, you would be hit by ORA-600 error
SQL> alter session set events '10261 trace name context forever, level 100000';
Session altered.
SQL> ------------------------------------------------------------------------------
SQL> -- with 600 error, dump heap dump at level 0x20000001
SQL> alter session set events '600 trace name heapdump level 0x20000001';
Session altered.
>> {PGA 의 크기가 임계점 초과} → {10261 이벤트에 의해 ORA-600 에러 발생} → {600 에러 진단 이벤트에 의해 PGA 힙 덤프 수행}
>> "특정 프로세스의 PGA 크기가 지나치게 커지면 PGA 힙 덤프를 수행함으로써 이 문제를 트러블슈팅할 수 있도록 하라"
SQL> create or replace procedure proc_array(len number)
is
type vtable is table of varchar2(1000);
vt vtable := vtable();
begin
for idx in 1 .. len loop
vt.extend;
vt(idx) := rpad('x', 1000, 'x');
end loop;
end;
/ 2 3 4 5 6 7 8 9 10 11
Procedure created.
SQL> alter session set events '10261 trace name context forever, level 100000';
Session altered.
SQL> alter session set events '600 trace name heapdump level 0x20000001';
Session altered.
SQL> exec proc_array(20000000);
BEGIN proc_array(20000000); END;
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [723], [16424], [pga heap], [], [],
[], [], []
SQL> alter session set events '10261 trace name context off';
Session altered.
SQL> alter session set events '600 trace name context off';
Session altered.
Fri Apr 27 22:06:39 2012
Errors in file /home/owen/app/owen/diag/rdbms/orcl/orcl/incident/incdir_4945/orcl_ora_2808_i4945.trc:
ORA-00600: internal error code, arguments: [723], [82452], [pga heap], [], [], [], [], []
ORA-00600: internal error code, arguments: [723], [16424], [pga heap], [], [], [], [], []
Trace dumping is performing id=[cdmp_20120427220640]
[owen@ol5u811gr1 ~]$ more /home/owen/app/owen/diag/rdbms/orcl/orcl/incident/incdir_4945/orcl_ora_2808_i4945.trc
Dump file /home/owen/app/owen/diag/rdbms/orcl/orcl/incident/incdir_4945/orcl_ora_2808_i4945.trc
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /home/owen/app/owen/product/11.1.0/db_1
System name: Linux
Node name: ol5u811gr1.oracle.com
Release: 2.6.32-300.10.1.el5uek
Version: #1 SMP Wed Feb 22 17:22:40 EST 2012
Machine: i686
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 18
Unix process pid: 2808, image: oracle@ol5u811gr1.oracle.com (TNS V1-V3)
...
Dump continued from file: /home/owen/app/owen/diag/rdbms/orcl/orcl/trace/orcl_ora_2808.trc
ORA-00600: internal error code, arguments: [723], [16424], [pga heap], [], [], [], [], []
========= Dump for incident 4945 (ORA 600 [723]) ========
----- Beginning of Customized Incident Dump(s) -----
****** ERROR: PGA size limit exceeded: 102455604 > 102400000 *****
******************************************************
...
SQL> select * from table(tpack.heap_file_report('/home/owen/app/owen/diag/rdbms/orcl/orcl/incident/incdir_4945/orcl_ora_2808_i4945.trc'));
TYPE HEAP_NAME ITEM ITEM_COUNT ITEM_SIZE HEAP_SIZE RATIO
-------------------- -------------------- -------------------- ---------- ---------- ---------- ----------
HEAP pga heap 0 95.73 95.73 100
...
OBJECT pga heap koh-kghu call 4584 71.7 95.7 74.8
OBJECT pga heap KGNFS pcontext 1 0 95.7 0
OBJECT pga heap dbgdInitEventGr 1 0 95.7 0
OBJECT pga heap Alloc environm 7 0 95.7 0
OBJECT pga heap allocate kzthsm 1 0 95.7 0
OBJECT pga heap none 1532 23.6 95.7 24.7
...
>> 이러한 간단한 정보도 힙 덤프 분석 없이는 얻을 수 없다.
- 강좌 URL : http://www.gurubee.net/lecture/4314
- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.