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

Jeffrey B commented on AMQCPP-449:
----------------------------------

Thanks Tim, but I tried adding that in my file and using your file directly and 
neither worked.  I still have the issue.  I gather more information from 
PlatformThread.cpp. I placed counters on each of the mutex functions and 
printed them out in the exception.

createdMutex: 82 lockedMutex: 1765 tryLockedMutex: 197 unlockedMutex: 1961 
destroyedMutex: 21 createdRWMutex: 0 readerLockedMutex: 0 writerLockedMutex: 0 
tryReaderLockedMutex: 0 tryWriterLockedMutex: 0 unlockedRWMutex: 0 
destroyedRWMutex: 0

These numbers are very consistent.  lockedMutex and tryLockedMutex are usually 
+-2, everything else is always the same. Also if I place a breakpoint just 
before the exception is thrown and I inspect the value of mutex, it is 
consistently the same value 0x2000000040089480.  Hope this helps somehow.  Let 
me know if there is any better information I can gather.
Thanks
                
> activemq::library::ActiveMQCPP::shutdownLibrary(); causing runtime exception
> ----------------------------------------------------------------------------
>
>                 Key: AMQCPP-449
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-449
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Decaf
>    Affects Versions: 3.5.0
>         Environment: HPUX 11.31
>            Reporter: Jeffrey B
>            Assignee: Timothy Bish
>            Priority: Critical
>              Labels: HPUX, crash, destructor, exception, runtime, thread
>         Attachments: amqdriver.cpp, amqdriver.cpp
>
>
> Whenever my simple driver application or my receiver application call the 
> shutdownLibrary() method at the end, as the program is going through 
> desctuctors for threads it prints and causes a core dump
> aCC runtime: Unexpected exception of type 
> "decaf::lang::exceptions::RuntimeException". 
> aCC runtime: what(): Failed to Lock OS Mutex 
> Abort(coredump) 
> I added another catch and print in decaf/lang/Thread.cpp about line 133 and 
> on decaf/internal/util/concurrent/unix/PlatformThread.cpp about line 76 i 
> printed out ther error number return from pthread_mutex_lock()
> Now i get:
> Failed to Lock OS Mutex, Error num: 22
>         FILE: decaf/internal/util/concurrent/unix/PlatformThread.cpp, LINE: 78
> aCC runtime: Unexpected exception of type 
> "decaf::lang::exceptions::RuntimeException".
> aCC runtime: what(): Failed to Lock OS Mutex, Error num: 22
> Abort(coredump)
> Error 22 is EINVAL and can have two meanings on my system:
>      mutex is a PTHREAD_PRIO_PROTECT mutex and the caller's priority is 
> higher than mutex's priority ceiling.
>      mutex is not an initialized mutex.
> I'll try and upload my code to see if this happens on other systems as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to