[ 
https://issues.apache.org/jira/browse/QPID-7363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394648#comment-15394648
 ] 

Keith Wall commented on QPID-7363:
----------------------------------

The above stack trace shows the virtualhost's housekeeper was in the process of 
deleting messages that had reached their time-to-live.   It also shows us that 
the message store was not in a open state which one of these deletes was taking 
place.

When the virtuahost is initially activated ({{AbstractVirtualHost#onActivate}}) 
the message store is opened *before* any messages are recovered (read) from it, 
so it is difficult to see how this exception could occur on startup.

I can see a problem in the {{AbstractVirtualHost#onClose}} that would allow 
this problem to occur as the virtualhost is _closed_.  This code path is used 
when the Broker is shutdown.  The order of the statements within 
({{org.apache.qpid.server.virtualhost.AbstractVirtualHost#onClose}} means that 
the message store is put into a closed state *before* the housekeeper is 
shutdown.  This might mean that a housekeeping round takes place after the 
store is closed, which would give arise to the exception above.

However, Adel reported the exception occurred during Broker startup.  This 
makes me think there must have been another condition that caused the Broker to 
shut itself down shortly after startup.  The shutdown would have closed the 
virtualhost allowing the condition I describe above to develop.

We will fix the virtualhost close problem for 6.1 and 6.0.5, but we will need 
to see a log to understand a root cause.




> [Java Broker - 6.0.1] Unhandled exception with Berkeley DB message store
> ------------------------------------------------------------------------
>
>                 Key: QPID-7363
>                 URL: https://issues.apache.org/jira/browse/QPID-7363
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0.1
>            Reporter: Adel Boutros
>
> Randomly, I have the below exception on the console when launching the 
> broker. Is this expected?
> I am using Berkley DB jar "je-5.0.104.jar" as described here 
> https://qpid.apache.org/releases/qpid-java-6.0.1/java-broker/book/Java-Broker-Miscellaneous-Installing-Oracle-BDB-JE.html.
>  
> ########################################################################
> #
> # Unhandled Exception java.lang.IllegalStateException: Message store is not 
> open in Thread virtualhost-default-pool-2
> #
> # Exiting
> #
> ########################################################################
> java.lang.IllegalStateException: Message store is not open
>         at 
> org.apache.qpid.server.store.berkeleydb.BDBMessageStore.checkMessageStoreOpen(BDBMessageStore.java:154)
>         at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.remove(AbstractBDBMessageStore.java:1202)
>         at 
> org.apache.qpid.server.message.AbstractServerMessageImpl.decrementReference(AbstractServerMessageImpl.java:110)
>         at 
> org.apache.qpid.server.message.AbstractServerMessageImpl.access$500(AbstractServerMessageImpl.java:38)
>         at 
> org.apache.qpid.server.message.AbstractServerMessageImpl$Reference.release(AbstractServerMessageImpl.java:308)
>         at 
> org.apache.qpid.server.queue.QueueEntryImpl.dispose(QueueEntryImpl.java:510)
>         at 
> org.apache.qpid.server.queue.QueueEntryImpl.delete(QueueEntryImpl.java:524)
>         at 
> org.apache.qpid.server.queue.AbstractQueue$13.postCommit(AbstractQueue.java:1903)
>         at 
> org.apache.qpid.server.txn.AutoCommitTransaction.dequeue(AutoCommitTransaction.java:90)
>         at 
> org.apache.qpid.server.queue.AbstractQueue.dequeueEntry(AbstractQueue.java:1897)
>         at 
> org.apache.qpid.server.queue.AbstractQueue.dequeueEntry(AbstractQueue.java:1892)
>         at 
> org.apache.qpid.server.queue.AbstractQueue.checkMessageStatus(AbstractQueue.java:2490)
>         at 
> org.apache.qpid.server.virtualhost.AbstractVirtualHost$VirtualHostHouseKeepingTask.execute(AbstractVirtualHost.java:1225)
>         at 
> org.apache.qpid.server.virtualhost.HouseKeepingTask$1.run(HouseKeepingTask.java:65)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at 
> org.apache.qpid.server.virtualhost.HouseKeepingTask.run(HouseKeepingTask.java:60)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to