You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rupert Smith (JIRA)" <qp...@incubator.apache.org> on 2007/04/02 18:41:32 UTC

[jira] Created: (QPID-440) Can create dangling transactions on unroutable messages.

Can create dangling transactions on unroutable messages.
--------------------------------------------------------

                 Key: QPID-440
                 URL: https://issues.apache.org/jira/browse/QPID-440
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: M2
         Environment: Java broker.
            Reporter: Rupert Smith


Sending a transactional message which is unroutable will create a dangling transaction that is never committed or rolled back.

Send messages to an unbound destination (or to the routing key with the same name as a queue that you forgot to bind, this was discovered by using a queue that was accidentally not bound). The broker will begin transaction, and save the message headers to the message store, before realizing that the message cannot be routed. So long as the message is not marked mandatory this will not cause an exception. The broker will not enqueue the message, so not realize that it has an open transaction. It fails to commit or rollback the transaction. Later, when the broker is shutdown the following exception may be seen:

2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:184) - Closing message metadata database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:189) - Closing message content database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:194) - Closing exchange database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:199) - Closing exchange database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:204) - Closing queue database
2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:209) - Close delivery database
2007-03-29 10:45:35,852 ERROR [Thread-0] registry.ApplicationRegistry$ShutdownService (ApplicationRegistry.java:78) - Error shutting down me
ssage store: com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
Aborting open transactions ...

com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
Aborting open transactions ...

        at com.sleepycat.je.Environment.close(Environment.java:331)
        at org.apache.qpid.server.store.berkeleydb.BDBMessageStore.close(BDBMessageStore.java:219)
        at org.apache.qpid.server.virtualhost.VirtualHost.close(VirtualHost.java:236)
        at org.apache.qpid.server.registry.ApplicationRegistry.close(ApplicationRegistry.java:169)
        at org.apache.qpid.server.registry.ApplicationRegistry$ShutdownService.run(ApplicationRegistry.java:72)
        at java.lang.Thread.run(Thread.java:595)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (QPID-440) Can create dangling transactions on unroutable messages.

Posted by "Rupert Smith (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Smith resolved QPID-440.
-------------------------------

    Resolution: Fixed

This was resolved some time ago, by Robert Godfrey.

> Can create dangling transactions on unroutable messages.
> --------------------------------------------------------
>
>                 Key: QPID-440
>                 URL: https://issues.apache.org/jira/browse/QPID-440
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: M2
>         Environment: Java broker.
>            Reporter: Rupert Smith
>             Fix For: M2
>
>
> Sending a transactional message which is unroutable will create a dangling transaction that is never committed or rolled back.
> Send messages to an unbound destination (or to the routing key with the same name as a queue that you forgot to bind, this was discovered by using a queue that was accidentally not bound). The broker will begin transaction, and save the message headers to the message store, before realizing that the message cannot be routed. So long as the message is not marked mandatory this will not cause an exception. The broker will not enqueue the message, so not realize that it has an open transaction. It fails to commit or rollback the transaction. Later, when the broker is shutdown the following exception may be seen:
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:184) - Closing message metadata database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:189) - Closing message content database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:194) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:199) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:204) - Closing queue database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:209) - Close delivery database
> 2007-03-29 10:45:35,852 ERROR [Thread-0] registry.ApplicationRegistry$ShutdownService (ApplicationRegistry.java:78) - Error shutting down me
> ssage store: com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
> com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
>         at com.sleepycat.je.Environment.close(Environment.java:331)
>         at org.apache.qpid.server.store.berkeleydb.BDBMessageStore.close(BDBMessageStore.java:219)
>         at org.apache.qpid.server.virtualhost.VirtualHost.close(VirtualHost.java:236)
>         at org.apache.qpid.server.registry.ApplicationRegistry.close(ApplicationRegistry.java:169)
>         at org.apache.qpid.server.registry.ApplicationRegistry$ShutdownService.run(ApplicationRegistry.java:72)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (QPID-440) Can create dangling transactions on unroutable messages.

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-440:
--------------------------------

    Fix Version/s: M2

> Can create dangling transactions on unroutable messages.
> --------------------------------------------------------
>
>                 Key: QPID-440
>                 URL: https://issues.apache.org/jira/browse/QPID-440
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: M2
>         Environment: Java broker.
>            Reporter: Rupert Smith
>             Fix For: M2
>
>
> Sending a transactional message which is unroutable will create a dangling transaction that is never committed or rolled back.
> Send messages to an unbound destination (or to the routing key with the same name as a queue that you forgot to bind, this was discovered by using a queue that was accidentally not bound). The broker will begin transaction, and save the message headers to the message store, before realizing that the message cannot be routed. So long as the message is not marked mandatory this will not cause an exception. The broker will not enqueue the message, so not realize that it has an open transaction. It fails to commit or rollback the transaction. Later, when the broker is shutdown the following exception may be seen:
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:184) - Closing message metadata database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:189) - Closing message content database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:194) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:199) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:204) - Closing queue database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:209) - Close delivery database
> 2007-03-29 10:45:35,852 ERROR [Thread-0] registry.ApplicationRegistry$ShutdownService (ApplicationRegistry.java:78) - Error shutting down me
> ssage store: com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
> com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
>         at com.sleepycat.je.Environment.close(Environment.java:331)
>         at org.apache.qpid.server.store.berkeleydb.BDBMessageStore.close(BDBMessageStore.java:219)
>         at org.apache.qpid.server.virtualhost.VirtualHost.close(VirtualHost.java:236)
>         at org.apache.qpid.server.registry.ApplicationRegistry.close(ApplicationRegistry.java:169)
>         at org.apache.qpid.server.registry.ApplicationRegistry$ShutdownService.run(ApplicationRegistry.java:72)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (QPID-440) Can create dangling transactions on unroutable messages.

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486622 ] 

Martin Ritchie commented on QPID-440:
-------------------------------------

LocalTransactionalContext:

Line:194

    if (_messageDelivered && _inTran)
        {
            _txnBuffer.enlist(new StoreMessageOperation(_messageStore));
        }

If  _messageDelivered is false then the transaction is never closed.. perhaps we should fail the commit here.

> Can create dangling transactions on unroutable messages.
> --------------------------------------------------------
>
>                 Key: QPID-440
>                 URL: https://issues.apache.org/jira/browse/QPID-440
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: M2
>         Environment: Java broker.
>            Reporter: Rupert Smith
>
> Sending a transactional message which is unroutable will create a dangling transaction that is never committed or rolled back.
> Send messages to an unbound destination (or to the routing key with the same name as a queue that you forgot to bind, this was discovered by using a queue that was accidentally not bound). The broker will begin transaction, and save the message headers to the message store, before realizing that the message cannot be routed. So long as the message is not marked mandatory this will not cause an exception. The broker will not enqueue the message, so not realize that it has an open transaction. It fails to commit or rollback the transaction. Later, when the broker is shutdown the following exception may be seen:
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:184) - Closing message metadata database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:189) - Closing message content database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:194) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:199) - Closing exchange database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:204) - Closing queue database
> 2007-03-29 10:45:35,671 INFO [Thread-0] berkeleydb.BDBMessageStore (BDBMessageStore.java:209) - Close delivery database
> 2007-03-29 10:45:35,852 ERROR [Thread-0] registry.ApplicationRegistry$ShutdownService (ApplicationRegistry.java:78) - Error shutting down me
> ssage store: com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
> com.sleepycat.je.DatabaseException: (JE 3.1.0) There is 1 existing transaction opened against the Environment.
> Aborting open transactions ...
>         at com.sleepycat.je.Environment.close(Environment.java:331)
>         at org.apache.qpid.server.store.berkeleydb.BDBMessageStore.close(BDBMessageStore.java:219)
>         at org.apache.qpid.server.virtualhost.VirtualHost.close(VirtualHost.java:236)
>         at org.apache.qpid.server.registry.ApplicationRegistry.close(ApplicationRegistry.java:169)
>         at org.apache.qpid.server.registry.ApplicationRegistry$ShutdownService.run(ApplicationRegistry.java:72)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.