Bug 31149 - Mono OneWayAttribute incompatible with Windows .Net
Summary: Mono OneWayAttribute incompatible with Windows .Net
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 4.0.0
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-06-16 09:07 UTC by Vladimir
Modified: 2015-06-17 09:38 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample util for bug reproducing (3.40 KB, text/plain)
2015-06-16 09:07 UTC, Vladimir
Details

Description Vladimir 2015-06-16 09:07:12 UTC
Created attachment 11620 [details]
Sample util for bug reproducing

Overview:
System.Runtime.Remoting.Messaging.OneWayAttribute don't work properly between Mono (server) and .Net (client) in some cases. It totaly hangs windows client.

Step to reproduce
1) Create class:
class TestClass: MarshalByRefObject, IDisposable
{
  [OneWay]
  public void Dispose() { ... }
}

2) Register TestClass object on server with RemotingServices.Marshal

3) On client acquire this object with Activator.GetObject and store it to IDisposable variable.
IMPORTANT! Variable must have IDisposable type, NOT TestClass type.

4) Run Dispose method.

If variable to store remote object will have TestClass type, everything seems ok.

Actual resutls:
Hanging after Dispose method call.

Expected results:
Not hanging after Dispose method call.

Build Date & Platform:
Tested on version 3.0.6 (tarball Thu Jun 11 13:26:07 MSK 2015) and version 4.0.1 (tarball from http://download.mono-project.com/sources/mono/)
Server OS: OpenSuse 13.1
Client OS: Windows 7

Additional Information:
In attachment - sample to reproduce bug. Note line 77.
Compile command: mcs OneWayAttributeTest.cs -r:System.Runtime.Remoting
Run this sample as server under mono and as client under .Net.
Comment 1 Vladimir 2015-06-17 09:38:40 UTC
Some additional info.

((IMethodCallMessage)msg).MethodBase.DeclaringType field in client-side IMessage object has value System.IDisposable while server-side message in this field has value OneWayAttributeTest.TestClass.

So System.IDisposable.Dispose method is NOT OneWay and client wait for answer from server.
But OneWayAttributeTest.TestClass.Dispose method IS OneWay. Thats why server do not send response to client.

Hope this will be helpfull.

Note You need to log in before you can comment on or make changes to this bug.