[Bug 872] New: SimulationThread deadlocks on macosx

http://bugs.orocos.org/show_bug.cgi?id=872

Summary: SimulationThread deadlocks on macosx
Product: Toolchain
Version: unspecified
Platform: AMD 64bit
OS/Version: Mac OS X
Status: NEW
Severity: major
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The unit tests on macos-x for scripting all deadlock in the simulation thread.
The reason is incorrect initialisation of the MainThread code in macosx' fosi
layer.

[Bug 872] SimulationThread deadlocks on macosx

http://bugs.orocos.org/show_bug.cgi?id=872

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED

--- Comment #2 from Peter Soetens <peter [..] ...> 2011-06-01 09:22:19 CEST ---
Patch applied on toolchain-2.4. Please verify :-)

[Bug 872] SimulationThread deadlocks on macosx

On Jun 1, 2011, at 03:22 , Peter Soetens wrote:

>
> http://bugs.orocos.org/show_bug.cgi?id=872
>
> Peter Soetens <peter [..] ...> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution| |FIXED
>
> --- Comment #2 from Peter Soetens <peter [..] ...> 2011-06-01 09:22:19 CEST ---
> Patch applied on toolchain-2.4. Please verify :-)

Which particular test does this apply to? scripting_test still deadlocks on condition variable ...
S

[Bug 872] SimulationThread deadlocks on macosx

On Wed, Jun 1, 2011 at 3:41 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
>
> On Jun 1, 2011, at 03:22 , Peter Soetens wrote:
>
>>
>> http://bugs.orocos.org/show_bug.cgi?id=872
>>
>> Peter Soetens <peter [..] ...> changed:
>>
>>           What    |Removed                     |Added
>> ----------------------------------------------------------------------------
>>             Status|NEW                         |RESOLVED
>>         Resolution|                            |FIXED
>>
>> --- Comment #2 from Peter Soetens <peter [..] ...> 2011-06-01 09:22:19 CEST ---
>> Patch applied on toolchain-2.4. Please verify :-)
>
> Which particular test does this apply to? scripting_test still deadlocks on condition variable ...

The trace in the attachment clearly identifies the bug I'm trying to
solve with fixing the fosi layer. Are you 100% sure the patched rtt
lib is used ?

Could you add this check somewhere before the test starts :

 BOOST_CHECK( MainThread::Instance()->isSelf() == true )

If this check succeeds, then the script should no longer hang. (it
should be part of the core/thread tests anyway!)

Peter
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

[Bug 872] SimulationThread deadlocks on macosx

On Jun 1, 2011, at 14:34 , Peter Soetens wrote:

> On Wed, Jun 1, 2011 at 3:41 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
>>
>> On Jun 1, 2011, at 03:22 , Peter Soetens wrote:
>>
>>>
>>> http://bugs.orocos.org/show_bug.cgi?id=872
>>>
>>> Peter Soetens <peter [..] ...> changed:
>>>
>>> What |Removed |Added
>>> ----------------------------------------------------------------------------
>>> Status|NEW |RESOLVED
>>> Resolution| |FIXED
>>>
>>> --- Comment #2 from Peter Soetens <peter [..] ...> 2011-06-01 09:22:19 CEST ---
>>> Patch applied on toolchain-2.4. Please verify :-)
>>
>> Which particular test does this apply to? scripting_test still deadlocks on condition variable ...
>
> The trace in the attachment clearly identifies the bug I'm trying to
> solve with fixing the fosi layer. Are you 100% sure the patched rtt
> lib is used ?
>
> Could you add this check somewhere before the test starts :
>
>

> BOOST_CHECK( MainThread::Instance()->isSelf() == true )
> 

>
> If this check succeeds, then the script should no longer hang. (it
> should be part of the core/thread tests anyway!)
>
> Peter

I added the above and the test does indeed pass now - so sorry for the noise, must have been picking up the old lib still. :-(

Now we're at the following ... I'll take a look at some of these soon.

The following tests FAILED:
22 - types_test (Failed)
25 - value_test (Failed)
29 - marshalling_test (Failed)
30 - property_loader_test (Failed)
31 - property_marsh_test (Failed)
32 - property_test (Failed)
33 - property_composition_test (Failed)
36 - type_discovery_container_test (Failed)
38 - typekit_test (Failed)
7 - corba-ipc-test (Failed)

I think we can close this ticket now.
S

[Bug 872] SimulationThread deadlocks on macosx

http://bugs.orocos.org/show_bug.cgi?id=872

--- Comment #1 from Peter Soetens <peter [..] ...> 2011-06-01 09:20:21 CEST ---
Created attachment 697
--> http://bugs.orocos.org/attachment.cgi?id=697
macosx: fix hanging thread issue when using simulation thread

The simulation thread runs in the MainThread, but that one
was not correctly initialized in macosx, leading to deadlocks
in the condition variable based code.