一.问题:收到开发报告,oracle数据库不能连接崩溃。上去看错误如下:
Exception [type: SIGSEGV, SI_KERNEL(general_protection)] [ADDR:0x0] [PC:0x184CB07, opiaba()+639] [flags: 0x0, count: 1] Errors in file /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/trace/sitpay1_ora_30480.trc (incident=27633): ORA-07445: 出现异常错误: 核心转储 [opiaba()+639] [SIGSEGV] [ADDR:0x0] [PC:0x184CB07] [SI_KERNEL(general_protection)] [] Incident details in: /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/incident/incdir_27633/sitpay1_ora_30480_i27633.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Tue Oct 15 12:23:00 2019 Errors in file /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/trace/sitpay1_ora_4916.trc (incident=28169): ORA-00600: internal error code, arguments: [17112], [0x06C02D448], [], [], [], [], [], [], [], [], [], [] Incident details in: /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/incident/incdir_28169/sitpay1_ora_4916_i28169.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0xD81B7670] [PC:0x97D64F4, kghfrmrg()+152] [flags: 0x0, count: 1] Errors in file /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/trace/sitpay1_ora_4916.trc (incident=28170): ORA-07445: exception encountered: core dump [kghfrmrg()+152] [SIGSEGV] [ADDR:0xD81B7670] [PC:0x97D64F4] [Address not mapped to object] [] ORA-00600: internal error code, arguments: [17112], [0x06C02D448], [], [], [], [], [], [], [], [], [], [] Incident details in: /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/incident/incdir_28170/sitpay1_ora_4916_i28170.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Tue Oct 15 12:23:03 2019 Dumping diagnostic data in directory=[cdmp_20191015122303], requested by (instance=1, osid=4916), summary=[incident=28169]. Tue Oct 15 12:23:07 2019 Errors in file /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/trace/sitpay1_pmon_24917.trc (incident=27217): ORA-00600: internal error code, arguments: [17112], [0x06C02D448], [], [], [], [], [], [], [], [], [], [] Incident details in: /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/incident/incdir_27217/sitpay1_pmon_24917_i27217.trc Use ADRCI or Support Workbench to package the incident. See Note 411.1 at My Oracle Support for error and packaging details. Tue Oct 15 12:23:07 2019 Sweep [inc][28170]: completed Sweep [inc][28169]: completed Sweep [inc][27633]: completed Sweep [inc][27217]: completed Sweep [inc2][28170]: completed Sweep [inc2][28169]: completed Errors in file /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/trace/sitpay1_pmon_24917.trc: ORA-00600: internal error code, arguments: [17112], [0x06C02D448], [], [], [], [], [], [], [], [], [], [] PMON (ospid: 24917): terminating the instance due to error 472
二.分析:
Incident details in: /opt/app/oracle/diag/rdbms/sitpay1/sitpay1/incident/incdir_27217/sitpay1_pmon_24917_i27217.trc 看了下这个文件,居然有553M。 查看下这个文件,发现了一个可疑的sql。
这是一个update语句,用begin update ... end;组装成一个事务提交到数据库。但是呢,绑定变量有343230个。
三.解决 . 查询了MOS,是oracle的一个bug,绑定变量超过65535个,数据库实例会崩溃。
也有网友发现了这个bug:
http://www.dbdream.com.cn/2019/03/ora-07445opiaba639%E3%80%81ora-0060017147%E9%94%99%E8%AF%AF%E5%AF%BC%E8%87%B4%E6%95%B0%E6%8D%AE%E5%BA%93%E6%8C%82%E6%8E%89/ 以及
https://www.anbob.com/archives/2626.html
我打上补丁后,问题解决。如果绑定变量超过65535个,则报错如下ora-06550:
; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: line 152920, column 35: PLS-00183: Message 183 not found; product=plsql; facility=PCM at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82) -- at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: ORA-06550: line 152920, column 35: PLS-00183: Message 183 not found; product=plsql; facility=PCM
问题完美解决
