You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Juha Heljoranta (JIRA)" <ji...@apache.org> on 2008/05/21 12:11:55 UTC
[jira] Created: (DERBY-3683) SYSCS_COMPRESS_TABLE fails to aquire
exclusive table lock
SYSCS_COMPRESS_TABLE fails to aquire exclusive table lock
---------------------------------------------------------
Key: DERBY-3683
URL: https://issues.apache.org/jira/browse/DERBY-3683
Project: Derby
Issue Type: Bug
Affects Versions: 10.4.1.3
Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
Reporter: Juha Heljoranta
Priority: Minor
Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
Lock : ROW, SYSCONGLOMERATES, (7,16)
Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
Granted XID : {13091, S} , {13087, S}
Lock : TABLE, XYZ, Tablelock
Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
Granted XID : {13091, X}
. The selected victim is XID : 13091.' was thrown while evaluating an expression.
if another thread is updating the same table while another thread executes:
CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
cs.setString(1, "APP");
cs.setString(2, "XYZ");
cs.setShort(3, (short) 1);
cs.execute();
conn.commit();
Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3683) SYSCS_COMPRESS_TABLE gets deadlock
while executing concurrently with other user threads
Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Matrigali updated DERBY-3683:
----------------------------------
Summary: SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads (was: SYSCS_COMPRESS_TABLE fails to aquire exclusive table lock)
> SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-3683
> URL: https://issues.apache.org/jira/browse/DERBY-3683
> Project: Derby
> Issue Type: Bug
> Affects Versions: 10.4.1.3
> Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
> Reporter: Juha Heljoranta
> Priority: Minor
>
> Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
> java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
> Lock : ROW, SYSCONGLOMERATES, (7,16)
> Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
> Granted XID : {13091, S} , {13087, S}
> Lock : TABLE, XYZ, Tablelock
> Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
> Granted XID : {13091, X}
> . The selected victim is XID : 13091.' was thrown while evaluating an expression.
> if another thread is updating the same table while another thread executes:
> CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
> cs.setString(1, "APP");
> cs.setString(2, "XYZ");
> cs.setShort(3, (short) 1);
> cs.execute();
> conn.commit();
> Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
> conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3683) SYSCS_COMPRESS_TABLE gets deadlock
while executing concurrently with other user threads
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-3683:
--------------------------------------
Component/s: Tools
> SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-3683
> URL: https://issues.apache.org/jira/browse/DERBY-3683
> Project: Derby
> Issue Type: Bug
> Components: SQL, Tools
> Affects Versions: 10.4.1.3
> Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
> Reporter: Juha Heljoranta
> Priority: Minor
>
> Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
> java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
> Lock : ROW, SYSCONGLOMERATES, (7,16)
> Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
> Granted XID : {13091, S} , {13087, S}
> Lock : TABLE, XYZ, Tablelock
> Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
> Granted XID : {13091, X}
> . The selected victim is XID : 13091.' was thrown while evaluating an expression.
> if another thread is updating the same table while another thread executes:
> CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
> cs.setString(1, "APP");
> cs.setString(2, "XYZ");
> cs.setShort(3, (short) 1);
> cs.execute();
> conn.commit();
> Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
> conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3683) SYSCS_COMPRESS_TABLE gets deadlock
while executing concurrently with other user threads
Posted by "Juha Heljoranta (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616951#action_12616951 ]
Juha Heljoranta commented on DERBY-3683:
----------------------------------------
Olen lomalla 7.7. - 4.8. Kiirellisissä tapauksissa ota yhteys tuotetukeemme.
I'm on vacation from Jul 7th to Aug 8th. In urgent matters please contact our support personnel.
ASAN Support:
E-mail: asan@asansecurity.com
Tel +358 40 75 93 446
> SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-3683
> URL: https://issues.apache.org/jira/browse/DERBY-3683
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.4.1.3
> Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
> Reporter: Juha Heljoranta
> Priority: Minor
>
> Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
> java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
> Lock : ROW, SYSCONGLOMERATES, (7,16)
> Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
> Granted XID : {13091, S} , {13087, S}
> Lock : TABLE, XYZ, Tablelock
> Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
> Granted XID : {13091, X}
> . The selected victim is XID : 13091.' was thrown while evaluating an expression.
> if another thread is updating the same table while another thread executes:
> CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
> cs.setString(1, "APP");
> cs.setString(2, "XYZ");
> cs.setShort(3, (short) 1);
> cs.execute();
> conn.commit();
> Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
> conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3683) SYSCS_COMPRESS_TABLE gets deadlock
while executing concurrently with other user threads
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-3683:
----------------------------------
Component/s: SQL
> SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-3683
> URL: https://issues.apache.org/jira/browse/DERBY-3683
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.4.1.3
> Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
> Reporter: Juha Heljoranta
> Priority: Minor
>
> Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
> java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
> Lock : ROW, SYSCONGLOMERATES, (7,16)
> Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
> Granted XID : {13091, S} , {13087, S}
> Lock : TABLE, XYZ, Tablelock
> Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
> Granted XID : {13091, X}
> . The selected victim is XID : 13091.' was thrown while evaluating an expression.
> if another thread is updating the same table while another thread executes:
> CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
> cs.setString(1, "APP");
> cs.setString(2, "XYZ");
> cs.setShort(3, (short) 1);
> cs.execute();
> conn.commit();
> Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
> conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3683) SYSCS_COMPRESS_TABLE gets deadlock
while executing concurrently with other user threads
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-3683:
--------------------------------------
Issue & fix info: [Workaround attached]
Urgency: Normal
Triaged for 10.5.2.
> SYSCS_COMPRESS_TABLE gets deadlock while executing concurrently with other user threads
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-3683
> URL: https://issues.apache.org/jira/browse/DERBY-3683
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.4.1.3
> Environment: Embedded Derby, Sun JDK 1.6.0_06-b02, Linux 2.6.9-67.0.15.EL i686
> Reporter: Juha Heljoranta
> Priority: Minor
>
> Derby documentation about SYSCS_COMPRESS_TABLE says: "...procedure acquires an exclusive table lock on the table being compressed." However, I get:
> java.sql.SQLException: The exception 'java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
> Lock : ROW, SYSCONGLOMERATES, (7,16)
> Waiting XID : {13091, X} , APP, alter table "APP"."XYZ" compress sequential
> Granted XID : {13091, S} , {13087, S}
> Lock : TABLE, XYZ, Tablelock
> Waiting XID : {13087, IX} , APP, update XYZ set FOO = ? where BAR = ? AND ID = ?
> Granted XID : {13091, X}
> . The selected victim is XID : 13091.' was thrown while evaluating an expression.
> if another thread is updating the same table while another thread executes:
> CallableStatement cs = conn.prepareCall("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
> cs.setString(1, "APP");
> cs.setString(2, "XYZ");
> cs.setShort(3, (short) 1);
> cs.execute();
> conn.commit();
> Problem goes away if I acquire exclusive table lock manually right before the compress table statement:
> conn.prepareStatement("LOCK TABLE XYZ IN EXCLUSIVE MODE").executeUpdate();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.