Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Shared mutex seems to cause the kernel to freak out: (6 Items)
   
Shared mutex seems to cause the kernel to freak out  
A test case from Boost 1.37 involving a mutex seems to make the kernel freak out. The test freezes and some commands 
like sin, pidin and shutdown will also freeze when they are run after the test. Other commands like ls continue to work.


I'm running QNX 6.4.0 on x86 (two different machines) and running commands in terminal windows inside Photon (or 
debugging with Momentics).

I've attached an archive with the executable managed_shared_memory_test and a stack trace captured before the freeze. 
The source code can be dowloaded from here:
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=637761

The freeze seems to happen at a call to pthread_mutex_lock(). I believe the mutex was created with the 
PTHREAD_PROCESS_SHARED attribute and possibly the PTHREAD_MUTEX_RECURSIVE attribute. It's not my code so I can't tell 
you much about it.
Attachment: Text freeze.tar.bz2 179.65 KB
RE: Shared mutex seems to cause the kernel to freak out  
Hi Niklas,

I've opened PR63369 to track this issue.  Thanks for the report!

Regards,
Neil
Re: Shared mutex seems to cause the kernel to freak out  
Hi Niklas

Did you get a solution for this ?

Could you tell a bit about how you managed to build boost 1_37?

I am using some of the boost libraries for some test on QNX 6.4

I have tried to build boost 1.38, everything build except serialization and python. Using the ordinary 
./configure --without-libraries=python --without-icu
make install
it is failing on BZIP2 and that std::va_list is not exciting in Dinkums C++ library

Trying to build 1.37 the same way didn't succeed because of problems of make bjam. But forcing it to use the bjam from 
the build of 1.38 helped a lot. If you like I can inform you about the status when finished.
./configure --with-bjam=/usr/local/bin/bjam --without-libraries=python --without-icu
make install

Yours

Flemming
Re: Shared mutex seems to cause the kernel to freak out  
you can use the one line fix as supplied in 

https://svn.boost.org/trac/boost/ticket/3133

The workaround is to put va_list into the std namespace:

namespace std{
    #if defined(__LIBCOMO__) || defined(__QNXNTO__)
        using ::va_list;
    #endif
} // namespace std
Re: Shared mutex seems to cause the kernel to freak out  
On Tue, Mar 23, 2010 at 02:25:00PM -0400, Christian Leutloff wrote:
> you can use the one line fix as supplied in 
> 
> https://svn.boost.org/trac/boost/ticket/3133
> 
> The workaround is to put va_list into the std namespace:
> 
> namespace std{
>     #if defined(__LIBCOMO__) || defined(__QNXNTO__)
>         using ::va_list;
>     #endif
> } // namespace std

This is fixed in 6.5.  This should probably be
something like:


#ifdef __QNXNTO__
#include <sys/neutrino.h>
#endif

namespace std{
    #if defined(__LIBCOMO__) || (defined(__QNXNTO__) && (!defined(_NTO_VERSION) || (_NTO_VERSION < 650)))
        using ::va_list;
    #endif
} // namespace std


Not sure why this would cause anything to 'freak' though...

-seanb
Re: Shared mutex seems to cause the kernel to freak out  
It is possible to disable the use of BZIP2 in the boost::iostreams using the parameter -sNO_BZIP2=1.


These are my steps to build boost 1.42 on QNX 6.4.1:

$ tar xjf boost_1_42_0.tar.bz2
$ cd boost_1_42_0
$ ./bootstrap.sh --prefix=/usr/src/boost --without-libraries=wave
$ ./bjam --build-dir=/usr/src/boostbuilddir --buildid=qnx641 --layout=versioned --without-python -sNO_BZIP2=1  install

The result is located in /usr/src/boost. (wave is excluded because of the size)