Identifying deadlocked resources in graph with 1 row lock and 1 table lock

Hi, I have run into repeated occurrences of the deadlock graph at the bottom of this post and have a few questions about it:
1. It appears that proc 44, session 548 is holding a row lock (X). Is the waiter, proc 30, session 542, trying to acquire a row lock (X) also or an exclusive table lock (X) on the table containing that row?
2. Under what circumstances would something hold a row exclusive table lock (SX) and want to upgrade that to a share row exclusive table lock (SSX)?
3. Our table cxml_foldercontent has a column 'structuredDataId' with a FK to cxml_structureddata.id and an ON DELETE SET NULL trigger. Would this help explain why an "update" to one table (i.e.g cxml_foldercontent) would also need to acquire a lock in a foreign table, cxml_structureddata?
4. What is the difference between "Current SQL statement:" and "Current SQL statement for this session:"? That terminology is confusing. Is session 542 executing the "update" or the "delete"?
5. In the "Rows waited on:" section is it saying that Session 542 is waiting on on obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK or that it is has the lock on that row and other things are waiting on it?
A couple of notes:
- the cxml_foldercontent.structuredDataId FK column has an index on it already
Deadlock graph:
                       ---------Blocker(s)--------  ---------Waiter(s)---------
Resource Name                    process session holds waits  process session holds waits
TX-003a0011-000003d0        44       548     X               30        542             X
TM-0000be63-00000000       30       542     SX              44        548     SX    SSX
session 548: DID 0001-002C-000002D9     session 542: DID 0001-001E-00000050
session 542: DID 0001-001E-00000050     session 548: DID 0001-002C-000002D9
Rows waited on:
Session 542: obj - rowid = 0000BE63 - AAAL5jAAGAAA6tZAAK
  (dictionary objn - 48739, file - 6, block - 240473, slot - 10)
Session 548: no row
Information on the OTHER waiting sessions:
Session 542:
  pid=30 serial=63708 audsid=143708731 user: 41/CASCADE
  O/S info: user: cascade, term: unknown, ospid: 1234, machine:
            program: JDBC Thin Client
  application name: JDBC Thin Client, hash value=2546894660
  Current SQL Statement:
update cascade.cxml_foldercontent set name=:1 , lockId=:2 , isCurrentVersion=:3 , versionDate=:4 , metadataId=:5 , permissionsId=:6 , workflowId=:7 , isWorkingCopy=:8 , parentFolderId=:9 , relativeOrder=:10 , cachePath=:11 , isRecycled=:12 , recycleRecordId=:13 , workflowComment=:14 , draftUserId=:15 , siteId=:16 , prevVersionId=:17 , nextVersionId=:18 , originalCopyId=:19 , workingCopyId=:20 , displayName=:21 , title=:22 , summary=:23 , teaser=:24 , keywords=:25 , description=:26 , author=:27 , startDate=:28 , endDate=:29 , reviewDate=:30 , metadataSetId=:31 , expirationNoticeSent=:32 , firstExpirationWarningSent=:33 , secondExpirationWarningSent=:34 , expirationFolderId=:35 , maintainAbsoluteLinks=:36 , xmlId=:37 , structuredDataDefinitionId=:38 , pageConfigurationSetId=:39 , pageDefaultConfigurationId=:40 , structuredDataId=:41 , pageStructuredDataVersion=:42 , shouldBeIndexed=:43 , shouldBePublished=:44 , lastDatePublished=:45 , lastPublishedBy=:46 , draftOriginalId=:47 , contentTypeId=:48  where id=:49
End of information on OTHER waiting sessions.
Current SQL statement for this session:
delete from cascade.cxml_structureddata where id=:1

Mohamed Houri wrote:
What is important for a foreign key is to be indexed (of course if the parent table is deleted/merged/updated, or if a performance reason imposes it). Wether this index is unique or not doesn't matter (as far as i know).But, you should ask your self the following question : what is the meaning of having a 1 to 1 relationship between a parent and a child table ? if you succeed to create a unique index on your FK then this means that for each PK value corresponds at most one FK value!! Isn't it? is this what you want to have?Thanks, as I mentioned above, cxml_structureddata is actually the child table of cxml_foldercontent with 1 or more records' owningEntityId referring to rows in cxml_foldercontent. The reason for the FK on cxml_foldercontent.structuredDataId is a little ambiguous but it explained above.
Will a TX-enqueue held on mode X always be waited on by another TX-enqueue row lock X? Or can it be waited on by an Exclusive (X) table lock?Not really clear. Sorry, are you saying my question is unclear or it's not clear why type of eXclusive lock session 542 is trying to acquire in the first line of the trace? Do you think that the exclusive lock being held by session 548 in the first line is on rows in cxml_foldercontent (due to the ON DELETE SET NULL on these child rows) or rows in the cxml_structureddata that it's actually deleting?
Is there any way for me to tell for certain?
The first enqueue is a TX (Transaction Enqueue) held by session 548 on mode X (exclusive). This session represents the blocking session. At the same time the locked row is waited on by the blocked session (542) and the wait is on mode X (exclusive). So put it simply, we have here session 542 waiting for session 548 to release it lock (may be by commiting/roll backing). At this step we are not in presence of a deadlock.
The second line of the deadlock graph shows that session 542 is the blocking session and it is doing a TM enqueue (DML lock) held on SX(Shared eXclusive). While session 548(which is the waiting session) is blocked by session 542 and is waiting on SSX mode.
Here we see that 548 is blocking session 542 via a TX enqueue and session 542 is blocking session 548 via a TM enqueue ---> That is the deadlock. Oracle will then immediately choose arbitrarlly a victim session (542 or 548) and kill its process letting the remaining session continuing its work.
That is your situation explained here.Thanks, any idea why session 542 (the DELETE from cxml_structureddata) would be trying to upgrade it's lock to SSX? Is this lock mode required to update a child tables foreign key columns when using an ON DELETE SET NULL trigger? Having read more about SSX, I'm not sure I understand in what cases it's used. Is there a way for me to confirm with 100% certainty specifically which tables in the TM enqueue locks are being held on? Is session 548 definitely trying to acquire an SSX mode on my cxml_foldecontent table or could it be cxml_structureddata table?
(a) Verify that all your FK are indexed (be carreful that the FK columns should be at the leading edge of the index)Thanks, we've done this already. When you say the "leading edge" you mean for a composite index? These indexes are all single column.
(b) Verify the logic of the DML against cxml_foldercontentCan you be more specific? Any idea what I'm looking for?

Similar Messages

  • It seems after the latest software update, my iphone 4 has issues with the phone and voicemail locking up as well as opening random apps.  Any thoughts?

    It seems after the latest software update, my iphone 4 has issues with the phone and voicemail locking up as well as opening random apps.  Any thoughts?

    Hi clintfromid,
    Thanks for using Apple Support Communities.  I would recommend closing all your apps and restarting and maybe resetting as good initial troubleshooting steps for this:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    Cheers,
    - Ari

  • HT1689 I just upgraded to iTunes 11 and now I get a "itunes cannot connect with this ........ Could not allocate a resource. Happens with both ipad and iPhone. Any thoughts on how to resolve this issue?

    I just upgraded to iTunes 11 and now I get a "itunes cannot connect with this ........ Could not allocate a resource. Happens with both ipad and iPhone. Any thoughts on how to resolve this issue?

    Same for me with Iphone 5 and IOS 7 on mac pro. Install ITunes 11.1 and after reboot nothing work. Work only with Mac Pro in safe mode.
    I have uninstalled Wi-fi-sync1.0 app from MacPro and Itunes sync well with iphone.

  • Problem with Caps Lock and Num Lock after 10.5.1

    I noticed after updating to 10.5.1 my caps and num lock lights were on, i thought this odd as I did not push the buttons, pushing the buttons to turn the lights off however actually turns the caps and num lock features on.
    In short, the light is backwards! when caps is OFF the light is on and when caps is ON the light is OFF!
    the same is true for the num lock key/light...???
    anyone else notice this problem?

    Same exact problem... after updating I noticed that my numbers lock and caps lock were on. Didn't think much of it so I turned them off and then I notice that they are working in reverse. Caps lock on gives me lower case letters and numbers lock on I only get the symbols associated with that key above the number....mmmmm.
    Anyone found a fix yet? I have looked in preferences and other places but found no solution.

  • MacBook starts with caps lock and num lock ON

    From time to time after upgrading to Leopard, my caps lock and num lock lamps are lit after startup. However, all other keys work normally, caps lock and num lock are not actually turned on. Is there a way to avoid this misbehaviour?

    Do computers have child diseases? My computer's immune system now seems to have taken care of the caps lock/num lock problem. I haven't had any inverted startups in weeks now. Very strange!
    In my experience, the treatment is to ignore the fact caps lock/num lock is lit, and to restart the computer. If you need to log in to restart, do it as if startup was normal, since caps lock/num lock is not actually turned on.
    And hope for the natural healing.
    Does anyone have different experiences?
    /Joachim

  • Dead lock and Blocking Lock

    I would like to understand what is major difference between Dead Locks and Blocking Locks in Oracle. If someone could explain or point me to good web Link I would really appreciate
    Thanks.

    Tony's advise is very good.
    In simple terms a blocking lock is a lock being held by one session that is preventing another session from performing an DML operation on the same data until the holding session commits or rollbacks.
    A deadlock is a situation where two or more sessions lock data in such a manner as each session is waiting on a resource held by another session so that none of the session can complete their unit of work. That is session A locks row 1 then session B locks row 2 followed by session A attempts to lock row 2 while session B now attemps to lock row 1. Neither session A or B will ever be able to complete thier transaction releasing the locks and allowing waiting sessions to process since each session is waiting on a resource that the other session has while holding a resource the other session needs. In other words a deadlock. Oracle detects deadlocks and kills one of the sessions freeing resources.
    HTH -- Mark D Powell --

  • Cap Lock and Number Lock

    I recently upgraded my MacBook to Leopard two days ago. Just a few minutes ago, I needed to hard restart my mac (i've been having problems with this, i'm having it checked on fri. in the genius bar). I noticed when it restarted the num lock and cap lock button lit up. When i press them again to turn off the light. my "letter" buttons can only type with numbers. When i have the num lock on the keyboard works fine. Same with the cap lock button. It needs to be on in order for the letter NOT be capitalized. Is there a way to fix this?

    I guess it was glitch. I restarted my computer and it works fine.

  • No alarm in auto-lock and passcode lock, 3rd party recommendations?

    My iPhone 4S and iPad mini alarms are set to wake up time of 6:30 am every day. I use the built-in Apple Clock app. Both devices are set to auto-lock and passcode lock. A couple of times, I have overslept and have been late for work because the alarms have not sounded. Did this start happening with an iOS update? This is especially irritating when I am away from home and not waking up when family members are up and making noise early, like a backup alarm. Some 3rd party alarm apps will sound when they are left open and the auto-lock and passcode lock are on (always). I would much rather use the Clock since it is part of the Apple bundle of apps. I can't say Clock is "free," because I paid for it with the standard apps. I hope a good substitute third party free app is available, I am willing to try, because I try to avoid throwing good money after bad. Any recommendations?

    It should be working regardless of the lock screen. Try deleting all alarms, then re-adding.

  • DV4 flashing caps lock and num lock lights

    My laptop, an HP Pavilion DV4-2040US, has stopped booting up recently. The day before this problem come about I was using the laptop perfectly fine. I then went one day without using. When I turn on the laptop it booted up but nothing showed up on the screen. Then the CAPS LOCK and NUM LOCK lights started to blink on and off.
    I did some researching about the blinking lights and what they mean but I don't think mine is listed on there. It says the pattern will repeat a couple of times then shut off, but mine doesn't. The pattern is the CAPS LOCK and NUM LOCK both blink once every 3 seconds (about) and keeps blinking every 3 seconds forever. The only time they stop blinking is when I shut I down by holding the power button on the laptop.
    I've tried disconnecting everything and holding for 15 seconds and even tried holding it for 30 seconds and that still didn't fix the problem. I called HP support and the guy who I talked to told me it sounded like a motherboard issue, but he wasn't sure exactly and told me to ask here for help.
    If it matters, I can hear the fan turn on for about 2 seconds then stop. Also all the touch sensitive buttons light up too$

    Please, someone, anyone help me. I am having this exact same problem as we speak It happened after i put the laptop to sleep overnight. The LEDs for capslock and numlock blink consistently but slowly-approximatelt 2-3 seconds. When started up, i hear the fan come on for maybe a second or two and then comes off.I've tried all the mentioned solutions - i removed the battery for a while and put it back in-i tried the four arrows-i tried started up with AC adapted but without battery - and still no fix. What i am worried about is the documents and files on the laptop. Are they recoverable? Please help me on this someone. Please. Thank You.

  • DV6 Flashing Num Lock and Cap Lock Keys on Startup

    Hi All, 
    Currently I'm having issues with my HP DV6 notebook when turning it on I am experiencing issues whereby the Num Lock and Caps Lock Lights are flashing and the screen is remaining blank the Sound, WIFI and Volume controls are all showing as orange I am having to take the battery out wait two minutes before trying to reboot the laptop when it works again, this issue is happening intermittently
    Thanks,
    Chris

    Hi Chris,
    See if you can match the pattern of the 'blinks' to those shown on the table below - this may atleast give you a better idea of what the problem is.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • CAPS Lock and Scroll Lock blinking / Display is Black

    Hi,
    I am using DV5 with processor AMD Turion X2 RM70. CAPS Lock and Scroll Lock blinking once every 4 secs.
    Is it Blink Code Error? Is my CPU dead? Should i take to service centre(No Warranty)? If CPU failure, how much the CPU costs?
    Please help me.
    Thanks,
    Rahul

    Hi 3dogtim,
    Which computer is this? If you don't know click on Guide to finding your product number. I can look up some information to help answer your questions.
    I look forward to hearing fro you.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Scroll/Num Lock and Caps Lock LED's blinking not starting

    Hi, I have a problem with my Pavillion dv4-1222nr. It was fine last night and this morning when I turned it on the Scroll/Num Lock and Caps Lock lights started blinking.  I turned it off and on several times and still a blank screen and blinking lights also the light that shows the hard drive is running is not on.  I can hear the fan from the processor and the dvdr engaging oh, that light is blinking too. I pulled out the battery to see if it would reset but it didn't work. Can anyone please help

    Hi, I have a HP Pavillon Dv4 1225 dx. Since a week when I turn it on I hear a noise that seems that it is going to start but it doesn´t. The scroll, num block and caps looks bottom are blinking all time and the screen remains as if it were off, even if I wait for an a half an hour. I tried changing the memories, connecting another monitor, checking the battery but it doesn´t work. I would be great if you could give me an advice about what can I do to solve the problem. Kind regards

  • Updating caps lock and num lock status

    I need to keep track of the status of the caps lock and num lock keys in a status bar of my frame.
    I get the current status with a code like this
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    numLockState = toolkit.getLockingKeyState(KeyEvent.VK_NUM_LOCK);
    capsLockState = toolkit.getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
    fireChangeEvent();
    where fireChangeEvent() updates a label in the status bar. The code is invoked when any of the caps lock and num lock keys are pressed (while the window has the focus) and when the window is activated. This code works while the window has the focus (i.e. the status of the keys if correctly tracked). It does not work correctly when the window is activated.
    Specifically the following scenario fails:
    - The window has focus and the state of the keys if correctly reported by the code above (say caps lock up, num lock
    up);
    - The window loses focus, i.e., another (non java) window gains the focus;
    - The user presses any of the two keys (say the caps lock key);
    - The window regains focus.
    When the latter event happens the code above is invoked (as a consequence of the window being activated) but it continues to report the status of the keys at the time the focus was lost by the window (caps lock up, num lock up).
    It seems that the toolkit does not automatically updates its internal status if a key is pressed when the java window does not have the focus. If I press the caps lock key (so that it returns to the up state) after the window has regained focus the status is updated and the new state is correctly reported. I need to manually realign the status by pressing the keys to have them correctly reported by the toolkit.
    Some ideas on how to have correct key status even after the window looses the focus?
    Thanks.

    Specifically the following scenario fails:
    - The window has focus and the state of the keys if correctly reported by the code above (say caps lock up, num lock
    up);
    - The window loses focus, i.e., another (non java) window gains the focus;
    - The user presses any of the two keys (say the caps lock key);
    - The window regains focus.
    When the latter event happens the code above is invoked (as a consequence of the window being activated) but it continues to report the status of the keys at the time the focus was lost by the window (caps lock up, num lock up).sorry! i tried this in a JFrame windowActivated() and i got the desired result it breaks your senario.
    the only is though it is not sensing the keyStrokes but if window looses focus because of another window gains focus it changes the values when it get focus next by ne means.
    Provide a short executable code might be the problem lies there.

  • Minor Keyboard Issue: Caps Lock and Num Lock indicator lights are wrong.

    For a few hours, I have been having a small issue with my PowerBook G4 keyboard. The green indicator lights for Number Lock and Caps Lock are indicating incorrectly.
    Thus, in order to be able to type lowercase, I must keep the Caps Lock key light on, which subtly annoys the **** out of me [Apple edited out "heck" ]. Num Lock is worse, because I can actually see it; it isn't usually covered by my left hand. Very distracting.
    Rebooting did not resolve this issue. Neither did monkeying with the Keyboard system preferences. If I could just turn the lights off altogether that would be fine with me.
    This is a recent 15-inch PowerBook G4 1.67 Ghz, with the dual-level dvd burner and (I believe) the internal keyboard is USB, now, instead of ADB as (I believe) many of the older ones had been, so many of those hacks like fkeys and Ucontrol and so on are not options (I believe).
    Any ideas? Thanks,
    Nick
    PowerBook G4   Mac OS X (10.4.4)   15 inch, USB keyboard (I believe).
    PowerBook G4   Mac OS X (10.4.4)   15 inch
    PowerBook G4   Mac OS X (10.4.4)   15 inch
    PowerBook G4   Mac OS X (10.4.4)   15 inch

    I finally got it working again, I took the power out and the battery out while it was running. I made sure there were no USB/FireWire/PC-Card stuff connected when I did this. When it booted back up it was normal again.
    I also figured it happened because I put in a kyocera EVDO pc card into the laptop while it was in sleep. When it woke back up it went nuts and had to be rebooted several times.

  • Blinking Caps Lock and Num Lock Keys Lit after spilling water Macbook Pro.

    What does it mean when the caps lock and Num lock key blink, after spilling liquid on a Macbook Pro? Does this mean that liquid is still present? Also, the white light by the latch was blinking. What does this all mean?

    Possible liquid damage.
    Immediately disconnect all peripherals, power cord & remove the battery. Turn the computer over with the lid partly open and the hinge facing upward to let the liquid drain. Do not flop it over and lay it flat - you want to separate it from the moisture. Place paper or cloth towels under the machine to sop up the mess.
    After the computer disgorges whatever you spilled on it, don't turn it on for 72 hours or longer. You want to computer to dry out completely before turning it on again.
    Some users here swear by hairdryers. Blow drying the innards may bake whatever was in the liquid onto delicate computer components. Better to let the computer air dry.
    Use plain tepid water to clean out the computer. If you spilled iced beverage more than likely this ice fried the hot motherboard.
    Sugary, acidic or milky drinks will almost always cause problems later on as the residue starts slowly corroding the computer innards.
    Swab down any sticky parts with distilled water or denatured alcohol.
    If none of the above works, you will need to take the computer to a repair shop. Apple Care does not cover liquid or food damage. Believe me, they can tell. So the old "my computer stopped working" line is not going to work.

Maybe you are looking for

  • External hard rive not showing up in Finder

    I have done back-ups with this external drive (OWC Mercury Elite Pro) before without issue. Then a few weeks ago it doen't appear in Finder.  I have done permission repairs and verification on the iMac.  It says all is fine.  I have disconnected and

  • Fetching number of invoices report

    Hi Frnds,               I hav a problem in fetching data and displaying a report.I m giving my code below. 1st it will fetch data from the tvfk table with feild numki that will be z1, 19 etc. then it will go to the nriv table and get the current stat

  • Purchase of Apps with debit cards in India

    I am from India. I have  visa and master powered 'debit cards' however cannot purchase any apps from the store despite visiting the 'indian store'.  Does Apple not support purchase of Apps via debit cards in India? Can someone help me with this? The

  • Cisco Finesse for Linux Desktop

    i've a customer (call center) runs Linux desktops and he needs to deploy Cisco Finesse latest version. i was wondering if it is supported over Linux or not??

  • Album pricing on iTunes Producer

    I am using iTunes Producer 2.3.1 and I'm using a text file to import my meta data. I can't seem to get the album pricing to change. It is set as default (so nothing). Does anyone know how to fix this? I tried typing "Album Wholesale Pricing Tier" as