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)

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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 31149 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

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.