在使用Linux大頁內存的配置中,使用drop_cache時導致的ORA-600 [KGHLKREM1]問題
來源於:
ORA-600 [KGHLKREM1] On Linux Using Parameter drop_cache On hugepages Configuration (文檔 ID 1070812.1)
適用於:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Generic Linux
***Checked for relevance on 29-Jul-2013***
症狀:
你正在運行一個Oracle database,單實例數據庫或者rac。你使用基於大頁內存的sga
你遇到下面的問題:
ORA-00600: internal error code, arguments: [KGHLKREM1], [0x06BC00020] with stack trace similar to: kghnerror kghadd_reserved_ext kghgex -- or also ORA-07445: exception encountered: core dump [kglhdal()+1105][SIGSEGV] [Address not mapped to object] [0x000000008] [] [] ORA-07445: exception encountered: core dump [kghfnd()+2328] [SIGSEGV] [Address not mapped to object] [0xFFFFFFFFFFFFFFF0] [] []
對侵犯地址(在上面的例子中是0x6bc00020)進行SGA heap dump顯示,被清零(zeroed out)
asm1_lmd0_8600.trc ~~~~~~~~~~~~~~~~~~ *** 2010-02-08 15:57:38.274 ***** Internal heap ERROR KGHLKREM1 addr=0x6c400020 ds=0x60000058 ***** ***** Dump of memory around addr 0x6c400020: 06C3FF020 00000000 00000000 00000000 00000000 [................] Repeat 511 times
變化:
1.
在你的系統中,你正在運行vm.drop_caches=1 (or 3),drop_cache被設置為一個非零值,或者你在執行:
echo 3 > /proc/sys/vm/drop_caches
如下關於drop_caches的解釋,不做翻譯,原文如下:
/proc/sys/vm/drop_caches (since Linux 2.6.16) Writing to this file causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. To free pagecache: * echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: * echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: * echo 3 > /proc/sys/vm/drop_caches As this is a non-destructive operation, and dirty objects are not freeable, the user should run "sync" first in order to make sure all cached objects are freed.
2.
已經使用Linux的大頁內存。
原因:
這是Linux 內核的問題
使用Linux內核drop_cache參數和大頁內存時,內存損壞會發生。
Per internal Bug 9461825, executing vm.drop_caches corrupts Oracle Database SGA hugepages.
This is fixed in Linux Kernel version 2.6.18-194.0.0.0.4.EL5
解決方案:
1. As a workaround when hugepages are set avoid any vm.drop_cache settings. - OR - 2. Upgrade to Linux Kernel version 2.6.18-194.0.0.0.4.EL5
參考:
BUG:9358381 - ASM INSTANCE IS CRASHING AS ORA-600[KGHLKREM1] WHEN HUGEPAGES ARE IN USE