You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ojs <ol...@siegmar.net> on 2006/10/18 12:03:09 UTC

ActiveMQ 4.1 hangs when using kaha persistence

Hello,

I have a really simple test scenario - I send 100 strings to the queue and
the consumer just increses an internal counter when consuming the messages.
When using journaledJDBC for persistence I can run this test over and over
again without any problems - the consumer always consumes all 100 messages.
When using kaha persistence I can only run this test once - the second time,
ActiveMQ hangs. The last log messages that are printed out are:

[DefaultMessageListenerContainer-1] DEBUG
org.apache.activemq.broker.region.AbstractRegion  - Adding consumer:
ID:dev1-35887-1161165322583-3:0:1:1
[DefaultMessageListenerContainer-1] DEBUG
org.apache.activemq.broker.region.AbstractRegion  - Adding destination:
queue://org.apache.activemq.spring.Test.spring.embedded
[DefaultMessageListenerContainer-1] DEBUG
org.apache.activemq.kaha.impl.data.DataManager  - End of data file reached
at (header was invalid): offset = 30992, file = 1, size = 260
[main] INFO  org.springframework.jms.connection.SingleConnectionFactory  -
Established shared JMS Connection: PooledConnection {
org.apache.activemq.pool.ConnectionPool@1f48262 }


It seems, that the kaha logs got corrupted, but why? The run before ActiveMQ
stopped without any errors:

[Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) is shutting down
[Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
Removing consumer: ID:dev1-35536-1161165282638-3:0:-1:1
[Thread-2] INFO  org.apache.activemq.broker.TransportConnector  - Connector
vm://localhost Stopped
[Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ JMS
Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) stopped


My environment:

- Java 1.5.0_08 on Linux
- ActiveMQ 4.1-incubator-20061015.071006-56
- XBean 2.7-SNAPSHOT
- Spring 2.0
- Kaha log-directory is on my local disk

Any hints?


Best

Oliver
-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-hangs-when-using-kaha-persistence-tf2465546.html#a6873028
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by ojs <ol...@siegmar.net>.

rajdavies wrote:
> 
> could you attach your test case ?
> 

Sure. Here is the whole maven-test-project: 
http://www.nabble.com/file/3747/activemq-test.tgz activemq-test.tgz 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-hangs-when-using-kaha-persistence-tf2465546.html#a6893599
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by Rob Davies <ra...@gmail.com>.
could you attach your test case ?

cheers,

Rob
On 19 Oct 2006, at 10:10, ojs wrote:

>
>
> rajdavies wrote:
>>
>> have you removed the kaha database before this run  ?
>>
>
> Yes, I removed the database directory before the first run.
> --  
> View this message in context: http://www.nabble.com/ActiveMQ-4.1- 
> hangs-when-using-kaha-persistence-tf2465546.html#a6893127
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by ojs <ol...@siegmar.net>.

rajdavies wrote:
> 
> have you removed the kaha database before this run  ?
> 

Yes, I removed the database directory before the first run.
-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-hangs-when-using-kaha-persistence-tf2465546.html#a6893127
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by Rob Davies <ra...@gmail.com>.
have you removed the kaha database before this run  ?
On 19 Oct 2006, at 09:29, ojs wrote:

>
>
> rajdavies wrote:
>>
>> This is now fixed in SVN head
>>
>
> I still have the same problem with this version. Just the log  
> output changed
> a bit:
>
> First run ends with:
>
> [Thread-2] DEBUG
> org.springframework.beans.factory.support.DisposableBeanAdapter  -  
> Applying
> DestructionAwareBeanPostProcessors to bean with name
> 'org.apache.activemq.xbean.XBeanBrokerService'
> [Thread-2] DEBUG
> org.springframework.beans.factory.support.DisposableBeanAdapter  -  
> Invoking
> destroy() on bean with name  
> 'org.apache.activemq.xbean.XBeanBrokerService'
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
> Message Broker (localhost, ID:dev1-45326-1161240040538-1:0) is  
> shutting down
> [Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
> Removing consumer: ID:dev1-45326-1161240040538-3:0:-1:1
> [Thread-2] INFO  org.apache.activemq.broker.TransportConnector  -  
> Connector
> vm://localhost Stopped
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  -  
> ActiveMQ JMS
> Message Broker (localhost, ID:dev1-45326-1161240040538-1:0) stopped
>
>
>
> Second run hangs with:
>
> [main] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ  
> null JMS
> Message Broker (localhost) is starting
> [main] INFO  org.apache.activemq.broker.BrokerService  - For help  
> or more
> information please see: http://incubator.apache.org/activemq/
> [main] INFO  org.apache.activemq.kaha.impl.KahaStore  - Kaha Store  
> using
> data directory /tmp/kahastore/kaha.db
> [main] DEBUG org.apache.activemq.kaha.impl.data.DataManager  - End  
> of data
> file reached at (header was invalid): offset = 384, file = 1, size  
> = 261
> [main] DEBUG org.apache.activemq.kaha.impl.data.DataManager  - End  
> of data
> file reached at (header was invalid): offset = 30992, file = 1,  
> size = 260
>
>
>
> I'd like to provide a stack trace, but I don't know how. I run this  
> test
> using the JUnit-Eclipse plugin.
>
>
>
> Best
>
> Oliver
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-4.1- 
> hangs-when-using-kaha-persistence-tf2465546.html#a6892576
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by ojs <ol...@siegmar.net>.

rajdavies wrote:
> 
> This is now fixed in SVN head
> 

I still have the same problem with this version. Just the log output changed
a bit:

First run ends with:

[Thread-2] DEBUG
org.springframework.beans.factory.support.DisposableBeanAdapter  - Applying
DestructionAwareBeanPostProcessors to bean with name
'org.apache.activemq.xbean.XBeanBrokerService'
[Thread-2] DEBUG
org.springframework.beans.factory.support.DisposableBeanAdapter  - Invoking
destroy() on bean with name 'org.apache.activemq.xbean.XBeanBrokerService'
[Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
Message Broker (localhost, ID:dev1-45326-1161240040538-1:0) is shutting down
[Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
Removing consumer: ID:dev1-45326-1161240040538-3:0:-1:1
[Thread-2] INFO  org.apache.activemq.broker.TransportConnector  - Connector
vm://localhost Stopped
[Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ JMS
Message Broker (localhost, ID:dev1-45326-1161240040538-1:0) stopped



Second run hangs with:

[main] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ null JMS
Message Broker (localhost) is starting
[main] INFO  org.apache.activemq.broker.BrokerService  - For help or more
information please see: http://incubator.apache.org/activemq/
[main] INFO  org.apache.activemq.kaha.impl.KahaStore  - Kaha Store using
data directory /tmp/kahastore/kaha.db
[main] DEBUG org.apache.activemq.kaha.impl.data.DataManager  - End of data
file reached at (header was invalid): offset = 384, file = 1, size = 261
[main] DEBUG org.apache.activemq.kaha.impl.data.DataManager  - End of data
file reached at (header was invalid): offset = 30992, file = 1, size = 260



I'd like to provide a stack trace, but I don't know how. I run this test
using the JUnit-Eclipse plugin.



Best

Oliver
-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-hangs-when-using-kaha-persistence-tf2465546.html#a6892576
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by Rob Davies <ra...@gmail.com>.
This is now fixed in SVN head
On 18 Oct 2006, at 11:03, ojs wrote:

>
> Hello,
>
> I have a really simple test scenario - I send 100 strings to the  
> queue and
> the consumer just increses an internal counter when consuming the  
> messages.
> When using journaledJDBC for persistence I can run this test over  
> and over
> again without any problems - the consumer always consumes all 100  
> messages.
> When using kaha persistence I can only run this test once - the  
> second time,
> ActiveMQ hangs. The last log messages that are printed out are:
>
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding consumer:
> ID:dev1-35887-1161165322583-3:0:1:1
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding  
> destination:
> queue://org.apache.activemq.spring.Test.spring.embedded
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.kaha.impl.data.DataManager  - End of data file  
> reached
> at (header was invalid): offset = 30992, file = 1, size = 260
> [main] INFO   
> org.springframework.jms.connection.SingleConnectionFactory  -
> Established shared JMS Connection: PooledConnection {
> org.apache.activemq.pool.ConnectionPool@1f48262 }
>
>
> It seems, that the kaha logs got corrupted, but why? The run before  
> ActiveMQ
> stopped without any errors:
>
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) is  
> shutting down
> [Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
> Removing consumer: ID:dev1-35536-1161165282638-3:0:-1:1
> [Thread-2] INFO  org.apache.activemq.broker.TransportConnector  -  
> Connector
> vm://localhost Stopped
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  -  
> ActiveMQ JMS
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) stopped
>
>
> My environment:
>
> - Java 1.5.0_08 on Linux
> - ActiveMQ 4.1-incubator-20061015.071006-56
> - XBean 2.7-SNAPSHOT
> - Spring 2.0
> - Kaha log-directory is on my local disk
>
> Any hints?
>
>
> Best
>
> Oliver
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-4.1- 
> hangs-when-using-kaha-persistence-tf2465546.html#a6873028
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by James Strachan <ja...@gmail.com>.
On 10/18/06, ojs <ol...@siegmar.net> wrote:
>
>
> rajdavies wrote:
> >
> > could you run the test again - and get a stack trace of the hang
> > please ?
>
> Sure. But how to get a stack trace of a running process?

On windows hit ctrl-c

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by ojs <ol...@siegmar.net>.

rajdavies wrote:
> 
> could you run the test again - and get a stack trace of the hang  
> please ?

Sure. But how to get a stack trace of a running process?
-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-hangs-when-using-kaha-persistence-tf2465546.html#a6874103
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by Rob Davies <ra...@gmail.com>.
could you run the test again - and get a stack trace of the hang  
please ?

cheers,

Rob
On 18 Oct 2006, at 11:03, ojs wrote:

>
> Hello,
>
> I have a really simple test scenario - I send 100 strings to the  
> queue and
> the consumer just increses an internal counter when consuming the  
> messages.
> When using journaledJDBC for persistence I can run this test over  
> and over
> again without any problems - the consumer always consumes all 100  
> messages.
> When using kaha persistence I can only run this test once - the  
> second time,
> ActiveMQ hangs. The last log messages that are printed out are:
>
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding consumer:
> ID:dev1-35887-1161165322583-3:0:1:1
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding  
> destination:
> queue://org.apache.activemq.spring.Test.spring.embedded
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.kaha.impl.data.DataManager  - End of data file  
> reached
> at (header was invalid): offset = 30992, file = 1, size = 260
> [main] INFO   
> org.springframework.jms.connection.SingleConnectionFactory  -
> Established shared JMS Connection: PooledConnection {
> org.apache.activemq.pool.ConnectionPool@1f48262 }
>
>
> It seems, that the kaha logs got corrupted, but why? The run before  
> ActiveMQ
> stopped without any errors:
>
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) is  
> shutting down
> [Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
> Removing consumer: ID:dev1-35536-1161165282638-3:0:-1:1
> [Thread-2] INFO  org.apache.activemq.broker.TransportConnector  -  
> Connector
> vm://localhost Stopped
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  -  
> ActiveMQ JMS
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) stopped
>
>
> My environment:
>
> - Java 1.5.0_08 on Linux
> - ActiveMQ 4.1-incubator-20061015.071006-56
> - XBean 2.7-SNAPSHOT
> - Spring 2.0
> - Kaha log-directory is on my local disk
>
> Any hints?
>
>
> Best
>
> Oliver
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-4.1- 
> hangs-when-using-kaha-persistence-tf2465546.html#a6873028
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: ActiveMQ 4.1 hangs when using kaha persistence

Posted by Rob Davies <ra...@gmail.com>.
been able to reproduce this - I'll let you know when it's fixed

On 18 Oct 2006, at 11:03, ojs wrote:

>
> Hello,
>
> I have a really simple test scenario - I send 100 strings to the  
> queue and
> the consumer just increses an internal counter when consuming the  
> messages.
> When using journaledJDBC for persistence I can run this test over  
> and over
> again without any problems - the consumer always consumes all 100  
> messages.
> When using kaha persistence I can only run this test once - the  
> second time,
> ActiveMQ hangs. The last log messages that are printed out are:
>
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding consumer:
> ID:dev1-35887-1161165322583-3:0:1:1
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.broker.region.AbstractRegion  - Adding  
> destination:
> queue://org.apache.activemq.spring.Test.spring.embedded
> [DefaultMessageListenerContainer-1] DEBUG
> org.apache.activemq.kaha.impl.data.DataManager  - End of data file  
> reached
> at (header was invalid): offset = 30992, file = 1, size = 260
> [main] INFO   
> org.springframework.jms.connection.SingleConnectionFactory  -
> Established shared JMS Connection: PooledConnection {
> org.apache.activemq.pool.ConnectionPool@1f48262 }
>
>
> It seems, that the kaha logs got corrupted, but why? The run before  
> ActiveMQ
> stopped without any errors:
>
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  - ActiveMQ
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) is  
> shutting down
> [Thread-2] DEBUG org.apache.activemq.broker.region.AbstractRegion  -
> Removing consumer: ID:dev1-35536-1161165282638-3:0:-1:1
> [Thread-2] INFO  org.apache.activemq.broker.TransportConnector  -  
> Connector
> vm://localhost Stopped
> [Thread-2] INFO  org.apache.activemq.broker.BrokerService  -  
> ActiveMQ JMS
> Message Broker (localhost, ID:dev1-35536-1161165282638-1:0) stopped
>
>
> My environment:
>
> - Java 1.5.0_08 on Linux
> - ActiveMQ 4.1-incubator-20061015.071006-56
> - XBean 2.7-SNAPSHOT
> - Spring 2.0
> - Kaha log-directory is on my local disk
>
> Any hints?
>
>
> Best
>
> Oliver
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-4.1- 
> hangs-when-using-kaha-persistence-tf2465546.html#a6873028
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>