环境信息:  linux 6.1 + oracle11.2.0.3 RAC
 
 
问题现象:
学校晚上6点选课,人数大概有3000,7点时,数据库报错如下(数据库到6点多还是可以连接的),数据库hung住了。

Tue Dec 16 18:00:33 2014
Dumping diagnostic data in directory=[cdmp_20141216180033], requested by (instance=2, osid=24917 (M001)), summary=[incident=45211].
Tue Dec 16 18:02:23 2014
PMON failed to acquire latch, see PMON dump
Tue Dec 16 18:03:23 2014
PMON failed to acquire latch, see PMON dump
Tue Dec 16 18:04:54 2014
PMON failed to acquire latch, see PMON dump
Tue Dec 16 18:05:55 2014
PMON failed to acquire latch, see PMON dump
Tue Dec 16 18:07:26 2014
PMON failed to acquire latch, see PMON dump
Tue Dec 16 18:08:26 2014
PMON failed to acquire latch, see PMON dump
.........................................
.........................................

Tue Dec 16 19:31:32 2014
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x18] [PC:0x9379D18, kglic0()+1086] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/rdbms/ywkdb/ywkdb2/trace/ywkdb2_m003_28984.trc  (incident=44523):
ORA-07445: exception encountered: core dump [kglic0()+1086] [SIGSEGV] [ADDR:0x18] [PC:0x9379D18] [Address not mapped to object] []
Incident details in: /u01/app/oracle/diag/rdbms/ywkdb/ywkdb2/incident/incdir_44523/ywkdb2_m003_28984_i44523.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.

Tue Dec 16 20:00:23 2014
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x18] [PC:0x9379D18, kglic0()+1086] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/rdbms/ywkdb/ywkdb2/trace/ywkdb2_m000_30227.trc  (incident=44811):
ORA-07445: exception encountered: core dump [kglic0()+1086] [SIGSEGV] [ADDR:0x18] [PC:0x9379D18] [Address not mapped to object] []
Incident details in: /u01/app/oracle/diag/rdbms/ywkdb/ywkdb2/incident/incdir_44811/ywkdb2_m000_30227_i44811.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.

最后排查,是数据库该版本的一个bug。

 
详见:
 
 
 
排查过程:
 
 根据ORA-07445提报的错误,排查oracle官方文档,发现在官方文档中标明这是一个oracle bug;文档中说明,在以下条件下可触发该bug:

这几点,目前数据库状态都符合:
   1)。目前数据库版本是11.2.0.3
   2)。报错提示是ORA-07445: [kglic0()]
   3)。在trc文件中,有kksIterCursorStat提示

           

4)。_kghdsidx_count值>1

         

5)。查询select count(*) from v$sql_bind_capture where name like ':SYS%';总数>0

         

根据官方文档的处理意见,修改隐含参数"_kghdsidx_count"=1,重启数据库服务可以解决此问题。

      

另外根据官方文档中的延伸说明:Bug 12340939  ORA-7445 [kglic0] can occur capturing cursor stats for V$SQLSTATS也可能会触发该问题,修改隐含参数
"_cursor_stats_enabled"=FALSE,重启数据库服务可以解决此问题。

 
 
修改后,学校第二天选课没有再报错了。
 
 
案例总结:
 
1.有问题先查MOS
 
2.具体到这个问题,之前没有出现这个问题,选课时出来了,说明一点:在大数据高并发情况下,这个bug显现了。
 
 
导致问题的原因:
 
During SQL statistics analysis for query execution, we load dependency information into the Library Cache.  These dependency memory pieces can be overwritten by other sessions without causing an error.  When the original session runs into the wrong dependency information it can lead to the internal error and performance issues during subsequent queries of these Library Cache objects.
 
---简而言之:Library Cache由于并发压力,历史信息找不到了
 
或者
 
During SQL statistics analysis for query execution, we load dependency information into the Library Cache.  These dependency memory pieces can be overwritten by other sessions without causing an error.  When the original session runs into the wrong dependency information it can lead to the internal error and performance issues during subsequent queries of these Library Cache objects.
 
---简而言之:表的统计信息有问题
 
 

高并发压力下导致数据库bug的更多相关文章

  1. 如何在高并发环境下设计出无锁的数据库操作(Java版本)

    一个在线2k的游戏,每秒钟并发都吓死人.传统的hibernate直接插库基本上是不可行的.我就一步步推导出一个无锁的数据库操作. 1. 并发中如何无锁. 一个很简单的思路,把并发转化成为单线程.Jav ...

  2. 【高并发】高并发环境下构建缓存服务需要注意哪些问题?我和阿里P9聊了很久!

    写在前面 周末,跟阿里的一个朋友(去年晋升为P9了)聊了很久,聊的内容几乎全是技术,当然了,两个技术男聊得最多的话题当然就是技术了.从基础到架构,从算法到AI,无所不谈.中间又穿插着不少天马行空的想象 ...

  3. C++高并发场景下读多写少的解决方案

    C++高并发场景下读多写少的解决方案 概述 一谈到高并发的解决方案,往往能想到模块水平拆分.数据库读写分离.分库分表,加缓存.加mq等,这些都是从系统架构上解决.单模块作为系统的组成单元,其性能好坏也 ...

  4. C++高并发场景下读多写少的优化方案

    概述 一谈到高并发的优化方案,往往能想到模块水平拆分.数据库读写分离.分库分表,加缓存.加mq等,这些都是从系统架构上解决.单模块作为系统的组成单元,其性能好坏也能很大的影响整体性能,本文从单模块下读 ...

  5. [转]高并发访问下避免对象缓存失效引发Dogpile效应

    避免Redis/Memcached缓存失效引发Dogpile效应 Redis/Memcached高并发访问下的缓存失效时可能产生Dogpile效应(Cache Stampede效应). 推荐阅读:高并 ...

  6. 高并发场景系列(一) 利用redis实现分布式事务锁,解决高并发环境下减库存

    原文:http://blog.csdn.net/heyewu4107/article/details/71009712 高并发场景系列(一) 利用redis实现分布式事务锁,解决高并发环境下减库存 问 ...

  7. 利用redis实现分布式事务锁,解决高并发环境下库存扣减

    利用redis实现分布式事务锁,解决高并发环境下库存扣减   问题描述: 某电商平台,首发一款新品手机,每人限购2台,预计会有10W的并发,在该情况下,如果扣减库存,保证不会超卖 解决方案一 利用数据 ...

  8. php高并发状态下文件的读写

    php高并发状态下文件的读写   背景 1.对于PV不高或者说并发数不是很大的应用,不用考虑这些,一般的文件操作方法完全没有问题 2.如果并发高,在我们对文件进行读写操作时,很有可能多个进程对进一文件 ...

  9. MQ在高并发环境下,如果队列满了,如何防止消息丢失?

    1.为什么MQ能解决高并发环境下的消息堆积问题? MQ消息如果堆积,消费者不会立马消费所有的消息,不具有实时性,所以可以解决高并发的问题. 性能比较好的消息中间件:Kafka.RabbitMQ,Roc ...

随机推荐

  1. PhoneNumber

    项目地址:PhoneNumber 简介:一个获取号码归属地和其他信息(诈骗.骚扰等)的开源库   一个获取号码归属地和其他信息(诈骗.骚扰等)的开源库.支持本地离线(含归属地.骚扰.常用号码)和网络( ...

  2. Android Design Support Library(2)- TextInputLayout的使用

    原创文章,转载请注明 http://blog.csdn.net/leejizhou/article/details/50494634 这篇文章介绍下Android Design Support Lib ...

  3. 获取服务器classes根路径

    /** * 获取web应用路径 * @Description : 方法描述 * @Method_Name : getRootPath * @return * @return : String * @C ...

  4. JS创建表单提交备份

    //保存 function saveFT() { var data = { createDate: GetDateStr(0), name: $("#txtName").val() ...

  5. linux下robotframework执行测试用例的几种方法

    1.执行指定的测试用例文件(Test Suite)     [root@localhost cases]# pybot purge.txt   2.执行整个porject目录下的所有测试用例     ...

  6. document.readyState和xmlhttp.onreadystatechange

    document.readyState的几种状态 0-uninitialized:XML 对象被产生,但没有任何文件被加载. 1-loading:加载程序进行中,但文件尚未开始解析. 2-loaded ...

  7. scrapy递归抓取网页数据

    scrapy spider的parse方法能够返回两种值:BaseItem.或者Request.通过Request能够实现递归抓取. 假设要抓取的数据在当前页,能够直接解析返回item(代码中带**凝 ...

  8. hdu 2063过山车

    二分匹配 #include<iostream> #include<cstring> using namespace std; int k,m,n; int rem[500+5] ...

  9. SQL Prompt 编辑

    SQL Prompt是一款拥有SQL智能提示功能的SQL Server和VS插件.超级好用的插件,

  10. C# 杀掉后台进程

    var p = Process.GetProcessesByName("WINWORD"); if (p.Any()) { for (int i = 0; i < p.Len ...