一个客户反应Oracle数据库非常慢,客户端经常连接不上,我登录上去后查看awr报告:
@d:\app\Administrator\product\11.2.0\dbhome_1\rdbms\admin\addmrpt Listing the last 3 days of Completed Snapshots Snap Instance DB Name Snap Id Snap Started Level ------------ ------------ --------- ------------------ ----- orcl ORCL 77317 08 10月 2022 10:17 1 77325 10 10月 2022 09:00 1
发现只有两个awr快照,觉得很奇怪,查看awr的设置并没有问题。执行了一个生成awr快照的命令,结果执行不出来:
好久也没有反应,刚开始以为机器慢,把客户的alert日志拿过来看看,这个文件居然有4G多!发现里面大量的
kewastUnPackStats(): bad magic 1 (0x000000002487A873, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A967, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AA67, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AB63, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AC53, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A593, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A781, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A876, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A972, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AA6F, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AB65, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AC61, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AD55, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AE5B, 0) kewastUnPackStats(): bad magic 1 (0x000000002487AF4D, 0) kewastUnPackStats(): bad magic 1 (0x000000002487B043, 0) kewastUnPackStats(): bad magic 1 (0x000000002487A589, 0)
到metlink上面一查,原来是Oracle的bug:
Bug 8730312 - wrong Null ASH data may cause dumps and kew* messages in
alert.log (Doc ID 8730312.8)
The following message is reported in the instance alert file: (The
hexadecimal string “0x1108f7b87” may be variable)
kewastUnPackStats(): bad magic 1 (0x1108f7b87, 0)
The cause of this problem has been identified in Bug:8967729 which has
been closed as duplicate of un-published bug 8730312. It is caused by
the variable part of the Active Session History rows (the module,
action program, etc. information) not being stored properly, causing
any read-back of this data through views like
(G)V$ACTIVE_SESSION_HISTORY to fail.
The issue has been fixed in the upcoming Oracle12c release and the
11.2.0.2 or higher patchsets.
For any environments where this is not available, apply Patch:8730312
As one-off patches are not subjected to the same rigorous level of
testing as done for Oracle Server patch sets, you are encouraged to
install and test this patch in a test environment prior to full
production implementation.