IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dead lock in DB2 - CICS programs


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 13, 2013 3:47 pm
Reply with quote

Hi,

I have a transaction id TST1 which calls program A and Program A is main module which connects between Java and Mainframe.

Program A in turn links 30 different CICS modules

Now I have a situation where DB2MSTR shows up something like

CORRELATION-ID=ENTRTST10005 deadlocked with
CORRELATION-ID=ENTRTST10025

Does the last 4 digit number in Correlation id has any significant meaning ?

How can we figure out which 2 programs were contending for resource?

Note : I felt this query is closely related to CICS so posted here
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 13, 2013 7:17 pm
Reply with quote

Hello,

Your situation is caused by a design problem using DB2. While this is run in CICS, it it a DB2 situation that needs corrected (i believe).

As with any deadlock, multiple processes are trying to "lock" the same data but not in the same order.

When i looked in the db2 doc just now, CORRELATION-ID is involved with MQ.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 13, 2013 7:22 pm
Reply with quote

Hi Dick,

Thanks for the response but here this program is not involved with MQ

So will increasing the LOCKMAX number of Table space help to reduce the deadlocks ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 13, 2013 7:26 pm
Reply with quote

Hi PB,

No, i don't think so. It only takes 2 tasks to generate a deadlock situation. Upping the number of possible locks would most likely not help this deadlock.

About MQ - i too was surprised to see those entries in the DB2 manual . . . icon_confused.gif
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Sep 13, 2013 10:20 pm
Reply with quote

Good afternoon, Pandora!

Have you scanned the MVS log for more information on this problem?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Sat Sep 14, 2013 12:23 am
Reply with quote

Please check this link to find more information on this topic.
As far as your first question goes, the number is to uniqely identify the threads. Looks like the correlations are two instances of transaction TST1.
Back to top
View user's profile Send private message
colin777

New User


Joined: 06 Jun 2013
Posts: 19
Location: Singapore

PostPosted: Mon Sep 16, 2013 1:10 pm
Reply with quote

Hi,

These Correlation Ids :

CORRELATION-ID=ENTRTST10005 deadlocked with
CORRELATION-ID=ENTRTST10025

are first 4 chars is the type of Thread, ENTR is Entry Thread. Then next 4 chars is the Transid, then followed by task number of the task.

But please note, this is only valid for knowing the Transid/Task number, if this transaction did the signon to DB2, meaning if the Thread was reused it would be the Transaction Id, that used the thread first, that did the signon. Only the Attachment Facility can change the Correlation Id, by another Transaction issuing signon.

HTH

Colin777
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Sep 18, 2013 8:28 pm
Reply with quote

Thanks all for your replies

As of now we have increased the LOCKMAX and this has almost eliminated the deadlocks for past few days
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 18, 2013 8:58 pm
Reply with quote

Hello,

Good to hear this helped, but i believe the process(es) need to be revised to eliminate the deadlocks. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Lock Escalation DB2 3
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top