Oracle12c R2注意事项: 又一个BUG 生成大量的trace 含 kjshash() kjqghd()
Oracle 12c R2 又一bug,DIAG目录一天生成100GB的trace文件, 之前分享过几篇,这里再记录一种情况,遇到该现象时,需要先查看生成的trace文件进程是前台还是后台、trace的文件内容、当前数据库是否有配置诊断类event. 这个trace文件是有前台进程生成的,trace文件中包含kjshash和kjqghd。
去年的技术嘉年华上我分享的PPT中有记录Oracle 12C 大量生成trace的几种场景:
序列 | trace内容 | 说明 | 解决方法 |
1 | —- Cursor Obsoletion Dump sql_id=5p8a9d4017bq3 —– Parent cursor obsoleted 1 time(s). maxchild=1024 basephd=00007FFB8AD45CB0 phd=00007FFB8AD45CB0 |
用于SQL游标达obsolete threshold时生成诊断信息,通过在父游标被废弃N次之后转储有关过时的父游标及其子游标的信息来改善游标共享诊断。 | patch 22075064 (=1) — or — “_kks_obsolete_dump_threshold” = 0 |
2 | KSIPC: KSIPC: Unable to attach to ipcor topo svc object | 每个会话登录都会创建一个trace,发生在IPC层 | 重启实例 |
3 | MMON TRACE :AUTO SGA: kmgs_parameter_update_timeout gen0 0 mmon alive 1 | mmon bgprocess trace 每3秒写一条记录 | Bug 25415713 |
4 | ORA-12805: parallel query server died unexpectedly | alert 日志每40秒一条记录 | BUG 27579159 |
5 | KRB:krbb.c@7963:krbbtgb(): reading file KRB:krbb.c@16076:krbbnbf() |
KRBB ==>> Kernel Recovery Backup Restore Creation Of A Backuppiece rman相关的操作都会生成一个trace文件 |
Bug 28174827 Bug 28390273 alter system set events ‘trace[krb.*] disk disable, memory disable’; |
6 | Result: (7) CLSGPNP_IO. (:GPNP01002:)Failed to open wallet file | 12.1 db alert中出错该错误,只是一个错误提示,可以忽略 | BUG 18893463 |
7 | WARNING: too many parse errors | db alert log中显示,类似10035 event分析解决失败信息写入alert log,60分钟内每出现100次 | _kks_parse_error_warning |
8 | kjqghd(): [0x4540002][0x378a8b],[TX][ext 0x0,0x0][domid 0x0]
maxnodes 16, key 1670177505, node 1 (inst 2), member_node 0 kjqghd(): delta 15 kjshash(): [0x4540002][0x378a9a],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670177520, node 0 (inst 1), member_node 1 |
大量前端进程trace 频繁生成 | Bug 29039510
Alter system set events ‘trace [rac_enq] disk disable’; |
查看当前系统event
oradebug setmypid oradebug eventdump system
从最新的trace文件可以判断是前台进程
查看trace文件
2020-03-30 00:15:09.208*:kjqghd(): [0x454001f][0x38089e],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670209809, node 1 (inst 2), member_node 0 2020-03-30 00:15:09.208*:kjqghd(): delta 15 2020-03-30 00:15:09.208*:kjshash(): [0x454001f][0x3808ad],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670209824, node 0 (inst 1), member_node 1 2020-03-30 00:15:09.208*:kjshash(): did not use HV mapping (nodeid 0) 2020-03-30 00:15:09.208*:kjqghd(): [0x454000c][0x376b01],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670169441, node 1 (inst 2), member_node 0 2020-03-30 00:15:09.208*:kjqghd(): delta 15 2020-03-30 00:15:09.208*:kjshash(): [0x454000c][0x376b10],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670169456, node 0 (inst 1), member_node 1 2020-03-30 00:15:09.208*:kjshash(): did not use HV mapping (nodeid 0) 2020-03-30 00:15:09.211*:kjqghd(): [0x4540011][0x37a3dc],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670184001, node 1 (inst 2), member_node 0 2020-03-30 00:15:09.211*:kjqghd(): delta 15 2020-03-30 00:15:09.211*:kjshash(): [0x4540011][0x37a3eb],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670184016, node 0 (inst 1), member_node 1 2020-03-30 00:15:09.211*:kjshash(): did not use HV mapping (nodeid 0) 2020-03-30 00:15:09.211*:kjqghd(): [0x454001e][0x37d19f],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670195729, node 1 (inst 2), member_node 0 2020-03-30 00:15:09.211*:kjqghd(): delta 15 2020-03-30 00:15:09.211*:kjshash(): [0x454001e][0x37d1ae],[TX][ext 0x0,0x0][domid 0x0] maxnodes 16, key 1670195744, node 0 (inst 1), member_node 1 2020-03-30 00:15:09.211*:kjshash(): did not use HV mapping (nodeid 0)
诊断不难发现是个bug,最早修复的主版本是:
Bug 29039510 drm messages are continuously generated with kjqghd() and kjshash()
临时解决方案:
alter system set events 'trace [rac_enq] disk disable';
应用事件后用sheel统计最近几天产生的文件,可以看出在8-26晚屏蔽bug后trace文件数据明显减少。
date TOTAL_FILE_size number_files ---------------------- -------------------- ------------------- Aug27 4.62108e+07 108 Aug23 2.51953e+09 893926 Aug24 3.59903e+09 891520 Aug25 2.8215e+09 527177 Aug26 4.92801e+09 263315
统计目录下每天少生的文件个数和大小 shell
#!/bin/bash # 目标目录 DIR_PATH="/path/to/your/directory" # 统计每天的文件个数和大小 find "$DIR_PATH" -type f -printf "%TY-%Tm-%Td %s\n" | \ awk ' { count[$1]++; # 累计每天的文件数量 size[$1] += $2; # 累计每天的文件大小 } END { printf "%-12s %-8s %-10s\n", "Date", "Files", "Size (Bytes)" for (date in count) { printf "%-12s %-8d %-10d\n", date, count[date], size[date] } }' | sort
对不起,这篇文章暂时关闭评论。