You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by TheOnlyDan <pa...@mygameskills.com> on 2008/02/08 16:17:18 UTC

Active MQ Client crash

Hi,

I'm fairly new to the ActiveMQ API. I have 2 C++ applications, one is a
simple client and a server. The server and the client talks through ActiveMQ
cms, currently running on the same machine. I'm having problems tracking
down crashes in the ActiveMQ code.

I'm currently testing how the client and the server behave when ActiveMQ
java application is taken down and restarted. So far the results have not
been good. Simple producer/consumer keep crashing. One crash was due to what
I have to assume was a bug in Thread.cpp, namely that line :    
::pthread_attr_destroy( &thread->attributes );. Since thread->attributes is
not a pointer and that pthread_attr_destroy is calling free, I got a crash.

Fixing this led me to more problems. I'm currently experiencing crashes in
the transport layer, IOTransport.cpp to be precise. 

I'd like to know if people are experiencing the same problems and if some
well know solutions are available.

Thanks,
Dan.:-((

-- 
View this message in context: http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15356897.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Client crash

Posted by TheOnlyDan <pa...@mygameskills.com>.
Hi,

I'll try but my applications are a bit complex. Cutting them down to a clean
example might take some time. The pthread issue though is easy to notice
when reading the code.

Cheers,
Dan.
-- 
View this message in context: http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15410423.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Client crash

Posted by Albert Strasheim <fu...@gmail.com>.
Hello

If you could attach some example code to a new JIRA issue, that would be 
very helpful in investigating this problem.

Regards,

Albert

----- Original Message ----- 
From: "TheOnlyDan" <pa...@mygameskills.com>
To: <us...@activemq.apache.org>
Sent: Friday, February 08, 2008 5:17 PM
Subject: Active MQ Client crash


>
> Hi,
>
> I'm fairly new to the ActiveMQ API. I have 2 C++ applications, one is a
> simple client and a server. The server and the client talks through 
> ActiveMQ
> cms, currently running on the same machine. I'm having problems tracking
> down crashes in the ActiveMQ code.
>
> I'm currently testing how the client and the server behave when ActiveMQ
> java application is taken down and restarted. So far the results have not
> been good. Simple producer/consumer keep crashing. One crash was due to 
> what
> I have to assume was a bug in Thread.cpp, namely that line :
> ::pthread_attr_destroy( &thread->attributes );. Since thread->attributes 
> is
> not a pointer and that pthread_attr_destroy is calling free, I got a 
> crash.
>
> Fixing this led me to more problems. I'm currently experiencing crashes in
> the transport layer, IOTransport.cpp to be precise.
>
> I'd like to know if people are experiencing the same problems and if some
> well know solutions are available.
>
> Thanks,
> Dan.:-((
>
> -- 
> View this message in context: 
> http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15356897.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
> 


Re: Active MQ Client crash

Posted by TheOnlyDan <pa...@mygameskills.com>.
Hi,

I finally managed to find a good solution to my problem. I don't have a
problem anymore with ActiveMQ going down and up.

Sorry about the noise,
Cheers,
Dan.
-- 
View this message in context: http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15502542.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Client crash

Posted by TheOnlyDan <pa...@mygameskills.com>.
Hi,

After reading the documentation and the pthread code, I see what's going on,
though I do think the pthread attribute and instance could be set to 0 in
the Thread constructor.

I definitely think there is a problem with my code which I'm trying to
narrow down. Is there any way to programmatically detect that the Java
broker has gone without having to keep recreating the connection and
watching for exception ?

Thanks,
Dan.
-- 
View this message in context: http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15412993.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Client crash

Posted by Timothy Bish <ta...@gmail.com>.
Refer to this tutorial on pthreads attributes, our code usage is
correct: http://www.cs.cf.ac.uk/Dave/C/node30.html

Also see O'Reilly's Pthreads Programming book, pages 113-115.


On Fri, 2008-02-08 at 07:17 -0800, TheOnlyDan wrote:
> Hi,
> 
> I'm fairly new to the ActiveMQ API. I have 2 C++ applications, one is a
> simple client and a server. The server and the client talks through ActiveMQ
> cms, currently running on the same machine. I'm having problems tracking
> down crashes in the ActiveMQ code.
> 
> I'm currently testing how the client and the server behave when ActiveMQ
> java application is taken down and restarted. So far the results have not
> been good. Simple producer/consumer keep crashing. One crash was due to what
> I have to assume was a bug in Thread.cpp, namely that line :    
> ::pthread_attr_destroy( &thread->attributes );. Since thread->attributes is
> not a pointer and that pthread_attr_destroy is calling free, I got a crash.
> 
> Fixing this led me to more problems. I'm currently experiencing crashes in
> the transport layer, IOTransport.cpp to be precise. 
> 
> I'd like to know if people are experiencing the same problems and if some
> well know solutions are available.
> 
> Thanks,
> Dan.:-((
> 


Re: Active MQ Client crash

Posted by TheOnlyDan <pa...@mygameskills.com>.
I'm using ActiveMQ cms 2.1.3 and using 4.1.1 java broker running 64 bit
OpenSuse Linux.

Cheers,
Dan.
-- 
View this message in context: http://www.nabble.com/Active-MQ-Client-crash-tp15356897s2354p15356898.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.