03-23-11, 03:41 #1Registered User
- Join Date
- Mar 2011
Unanswered: DB2 64bit hangs and crashes on updates with limit-exceeding values
I have a strange problem with DB2 9.7.2 Express (64bit, code release "SQL09072", level identifier "08030107", informational tokens are "DB2 v184.108.40.2068", "s100514", "IP23084", and Fix Pack "2", operating system Windows Server 2008 64bit R2 Datacenter).
We use DB2 with a web application, which uses a connection pool, which keeps at least 5 and at most 20 connections open.
The problem relates with a table called PAGE, which has the following structure:
PAG_ID SYSIBM INTEGER 4 0 No PAG_TITLE SYSIBM VARCHAR 255 0 No PAG_CONTENT SYSIBM VARCHAR 3000 0 No PAG_UPDATED SYSIBM TIMESTAMP 10 6 Yes PSN_ID_UPDATER SYSIBM INTEGER 4 0 Yes PCG_ID SYSIBM INTEGER 4 0 Yes
When a user working with the web application tries to update a record in this table,
where the size of the new value for PAG_CONTENT would exceed the 3000 character limit, his database connection hangs (instead of throwing something like SQLCODE=-302, SQLSTATE=22001).
From that time (or very soon after that) no new connections can be made. Even various DB tools stop working with the database, for example it is not possible to issue the LIST APPLICATIONS FOR DB DBNAME - this also hangs.
All connections that were open before this incident are still open and work properly though.
Then, when another user (or the same user after opening a new web application session - the connection pool gives him one of the remaining open connections) tries to update one of the PAGE table rows (doesn't necessarily have to be the same row) with another exceeding value (for the column PAG_CONTENT), his connection freezes and very soon (in about 3 seconds) the database crashes.
Four error messages are generated into the Event Log, the first one having the source "DB2":
2011-03-22-14.10.02.240000 Instance:DB2 Node:000 PID:4084(db2syscs.exe) TID:1476 Appid:127.0.0.1.49852.110322130831 oper system services sqloEDUExceptionFilter Probe:90 Database:STARDESK ADM14011C A critical failure has caused the following type of error: "Trap". The DB2 database manager cannot recover from the failure. First Occurrence Data Capture (FODC) was invoked in the following mode: "Automatic". FODC diagnostic information is located in the following directory: "C:\ProgramData\IBM\DB2\DB2COPY1\DB2\FODC_Trap_2011-03-22-14.09.44.483000\".
The application also works with a very similar table and the problem does not occur. This leads me to an idea. The whole database was migrated from a 32bit DB2. Then, already in 64bit DB2, I added the table PAGE. With this table I have the problems described.
I also have a test 32bit installation of DB2 (also 9.7.2) and the database behaves correctly there. However, I don't have any proof that this is related. The database does not crash, no connection freezes, I only get the error: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=3.59.81
The web application is based on Java and uses the JDBC driver com.ibm.db2.jcc.DB2Driver that comes with the database.
This clearly does not have anything to do with the connection pool (C3P0) because the problem is present even if I disable it (using just the standard DriverManagerDataSource).
I also tried to execute the SQL update command manually using the JDBC test tool (JDBCTest.class) and it behaved correctly (I got the SQLCODE=-302). This I really don't understand :-).
This is the related SQL command:
update PAGE set PAG_TITLE=?, PAG_CONTENT=?, PAG_UPDATED=?, PSN_ID_UPDATER=?, PCG_ID=? where PAG_ID=?
03-23-11, 05:23 #2Registered User
- Join Date
- Mar 2011
Here goes the attachment.
03-23-11, 08:21 #3:-)
Provided Answers: 1
- Join Date
- Jun 2003
- Toronto, Canada
Your best bet would be to contact DB2 support.
03-23-11, 10:39 #4Registered User
- Join Date
- May 2003
If you are using DB2 9.7.2 Express, you can upgrade to FP3a. I you are actually using DB2 Express-C (free version) there is no regular IBM support and you cannot upgrade fixpacks (until they release a new copy of Express-C). However, for Express-C there is an online community forum at the IBM website and it is monitored by IBM'ers. If there is a severe bug in Express-C it may cause them to issue a new release at a higher fixpack level (to keep up with the regular licensed editions).M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390