[Boost-bugs] [Boost C++ Libraries] #9558: future continuations unit test hangs in get()/pthread_cond_wait() on Mac 10.7/32-bit/x86/darwin-4.2.1

Subject: [Boost-bugs] [Boost C++ Libraries] #9558: future continuations unit test hangs in get()/pthread_cond_wait() on Mac 10.7/32-bit/x86/darwin-4.2.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-09 23:35:39


#9558: future continuations unit test hangs in get()/pthread_cond_wait() on Mac
10.7/32-bit/x86/darwin-4.2.1
------------------------------------------+-------------------------
 Reporter: Monty Brandenberg <mcbinc@…> | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.55.0 | Severity: Showstopper
 Keywords: future continuations |
------------------------------------------+-------------------------
 I'm building 32- and 64-bit versions of thread on Mac and validating the
 result with the unit tests. Test 'ex_future_then_lib' hangs consistently
 in pthread_cond_wait() in a 32-bit build, all tests succeed in 64-bit
 builds.

 Platform: Mac 10.7.5, Xcode 4.3.3, darwin-4.2.1.


 Successful build and test (64-bit):

 {{{
 ./bjam toolset=darwin variant=debug --layout=tagged --with-thread
 -sNO_BZIP2=1 stage
 cd libs/thread/test/
 ../../../bjam toolset=darwin variant=debug --layout=tagged --with-thread
 -sNO_BZIP2=1 -a -q -d2 -d+4

 }}}

 Hanging build and test (32-bit):

 {{{
 ./bjam toolset=darwin variant=debug address-model=32 architecture=x86
 --layout=tagged --with-thread -sNO_BZIP2=1 stage
 cd libs/thread/test/
 ../../../bjam toolset=darwin variant=debug address-model=32
 architecture=x86 --layout=tagged --with-thread -sNO_BZIP2=1 -a -q -d2
 -d+4
 }}}

 Stacktrace from hung unit test:

 {{{
 #0 0x9c19c83e in __psynch_cvwait ()
 #1 0x93bf3e21 in _pthread_cond_wait ()
 #2 0x93ba442c in pthread_cond_wait$UNIX2003 ()
 #3 0x00025a0b in boost::condition_variable::wait (this=0x34b16c,
 m=@0xbffff750) at condition_variable.hpp:73
 #4 0x00025bf2 in boost::detail::shared_state_base::wait_internal
 (this=0x34b120, lk=@0xbffff750, rethrow=true)
     at future.hpp:327
 #5 0x00025cf7 in boost::detail::shared_state_base::wait (this=0x34b120,
 rethrow=true) at future.hpp:346
 #6 0x00031b2b in boost::detail::future_async_shared_state_base<int>::wait
 (this=0x34b120, rethrow=true)
     at future.hpp:845
 #7 0x00024c05 in boost::detail::shared_state<int>::get (this=0x34b120) at
 future.hpp:666
 #8 0x000248ca in boost::future<int>::get (this=0xbffff978) at
 future.hpp:1555
 #9 0x000021b3 in main () at future_then.cpp:69

 }}}

 Extent of output at time of hang (appears not to have run P2):

 {{{
 Starting program: /Users/monty/3P/3p-boost-
 update/boost/bin.v2/libs/thread/test/ex_future_then_lib.test/darwin-4.2.1/debug
 /address-model-32/architecture-x86/threading-multi/ex_future_then_lib
 Reading symbols for shared libraries ++......................... done
 0xac7e22c0 - ../example/future_then.cpp[63] <MAIN
 0xb0081000 - ../example/future_then.cpp[18] P1
 }}}

 That's the extent of the bug. In addition, there's some sloppy return
 value coding in the example code:

 {{{
 ../example/future_then.cpp: In function ‘int
 p2s(boost::shared_future<int>)’:
 ../example/future_then.cpp:59: warning: control reaches end of non-void
 function
 ../example/future_then.cpp: In function ‘int p2(boost::future<int>)’:
 ../example/future_then.cpp:40: warning: control reaches end of non-void
 function
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9558>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC