If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 64bit hangs and crashes on updates with limit-exceeding values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-11, 03:41
MartinCz MartinCz is offline
Registered User
 
Join Date: Mar 2011
Posts: 2
DB2 64bit hangs and crashes on updates with limit-exceeding values

Hello,

I have a strange problem with DB2 9.7.2 Express (64bit, code release "SQL09072", level identifier "08030107", informational tokens are "DB2 v9.7.200.358", "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:

Code:
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":

Code:
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\".
I've put the generated FODC directory into the attachment.

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:

Code:
update
    PAGE 
        set
            PAG_TITLE=?,
            PAG_CONTENT=?,
            PAG_UPDATED=?,
            PSN_ID_UPDATER=?,
            PCG_ID=? 
        where
            PAG_ID=?
Any ideas or help are highly appreciated!

Thank you!
Reply With Quote
  #2 (permalink)  
Old 03-23-11, 05:23
MartinCz MartinCz is offline
Registered User
 
Join Date: Mar 2011
Posts: 2
Here goes the attachment.
Attached Files
File Type: zip FODC_Trap_2011-03-22-14.09.44.483000.zip (121.8 KB, 14 views)
Reply With Quote
  #3 (permalink)  
Old 03-23-11, 08:21
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Your best bet would be to contact DB2 support.
Reply With Quote
  #4 (permalink)  
Old 03-23-11, 10:39
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On