Bug 113447 - Database deadlock with multipe users Publishing/Unpublishing.
Summary: Database deadlock with multipe users Publishing/Unpublishing.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Vadim Nasardinov
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-14 00:13 UTC by Jon Orris
Modified: 2007-04-18 17:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-03 18:17:17 UTC
Embargoed:


Attachments (Terms of Use)
CCM log running on oracle (155.23 KB, text/plain)
2004-01-14 00:14 UTC, Jon Orris
no flags Details
CCM Llog running on Postgres (392.75 KB, text/plain)
2004-01-14 00:15 UTC, Jon Orris
no flags Details

Description Jon Orris 2004-01-14 00:13:53 UTC
Description of problem:
#39279 on Postgres & Oracle.

If multiple users are publishing and unpublishing content, database
deadlocks may occur. The root of the problem may be the following
stack trace, which occurs in Oracle before the deadlock exceptions are
encountered:

java.lang.IllegalStateException: Attempt to delete non-empty folder
[com.arsdigita.cms.Folder:{id=337}]; only empty folders can be deleted
	at com.arsdigita.cms.Folder.delete(Folder.java:158)
	at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1168)
	at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1274)
	at com.arsdigita.cms.Folder.unpublish(Folder.java:364)
	at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1178)
	at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1274)
	at com.arsdigita.cms.ContentItem.setLive(ContentItem.java:1178)
	at com.arsdigita.cms.ContentItem.unpublish(ContentItem.java:1274)
	at
com.arsdigita.cms.ui.lifecycle.ItemLifecycleItemPane$UnpublishLink$Listener.actionPerformed(ItemLifecycleItemPane.java:126)

What appears to be happening is that Publishing is a separate thread
that takes an Item from Pending to Live. When a different login
Unpublishes the only item in a folder, it attempts to delete the
'empty' Live folder as part of the transaction. However, the Publish
task has, in the interim, put a Live item in that folder. This is
possible as we do not do the sort of table/row level locking that
would prevent it.

Comment 1 Jon Orris 2004-01-14 00:14:34 UTC
Created attachment 96961 [details]
CCM log running on oracle

Comment 2 Jon Orris 2004-01-14 00:15:19 UTC
Created attachment 96962 [details]
CCM Llog running on Postgres

Comment 3 Jon Orris 2004-01-14 00:17:38 UTC
Test:
//cms/internal/dev/test/src/com/arsdigita/cms/httpunit/CMSTester.java

Next step: examine database logs & lock file to verify this is the
source of the locking problem.


Comment 4 Vadim Nasardinov 2005-08-03 18:17:17 UTC
Cleaning up stale bugs.


Note You need to log in before you can comment on or make changes to this bug.