Bug 677612 - Proxy generator generates unverifiable code
Summary: Proxy generator generates unverifiable code
Status: NEW
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: WCF (show other bugs)
Version: SVN
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 00:10 UTC by Alan McGovern
Modified: 2011-06-09 18:01 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
log of the stacktrace (20.30 KB, text/plain)
2011-03-08 00:10 UTC, Alan McGovern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan McGovern 2011-03-08 00:10:37 UTC
Created attachment 417971 [details]
log of the stacktrace

The current generator can't be used under moonlight it seems. See attached log.
Comment 1 Atsushi Enomoto 2011-03-08 01:56:05 UTC
Is moonlight based on the latest git master or 2-10? Isn't moonlight taking some old revision between "our verifier disabled entire WCF proxy" and "the verifier temporarily disabled the verification that blocked WCF" ?
Comment 2 Alan McGovern 2011-03-08 10:59:17 UTC
We're currently using 651c8b350 . I thought this contained your workaround/fix for the unverifiable proxies.
Comment 3 Atsushi Enomoto 2011-03-08 15:11:50 UTC
Then yes it should be based on RealProxy, and I have no idea why it raises SecurityException. Is it because RealProxy is not public in moonlight?

CCing Rodrigo.
Comment 4 Alan McGovern 2011-03-08 17:58:11 UTC
The verifier error is:

Mono: Inheritance failure for type System.ServiceModel.ClientRealProxy. Parent class System.Runtime.Remoting.Proxies.RealProxy is more restricted.

The two classes are both internal but they exist in two different assemblies, mscorlib and system.servicemodel. It looks like the verifier does not like this even though corlib has internalsVisibleTo System.ServiceModel.
Comment 5 Rodrigo Kumpera 2011-03-10 12:25:24 UTC
This is a core-clr issue. Not sure how should we handle it.

CC Spouliot.
Comment 6 Sebastien Pouliot 2011-03-10 16:52:30 UTC
the new code path hits a bunch of security critical code that will need to be relaxed (into SSC) then audited -> assigning to myself
Comment 7 Sebastien Pouliot 2011-03-10 19:41:20 UTC
With mono master (i.e. not moon current rev) I get up to:

[0xb73e26d0:] EXCEPTION handling: System.ArgumentNullException: Argument cannot be null.
Parameter name: s

"<unnamed thread>" tid=0x0xb73e26d0 this=0x0x57f20 thread handle 0x403 state : not waiting owns ()
  at System.TimeSpan.Parse (string) [0x00022] in /home/poupou/git/mono/mcs/class/corlib/System/TimeSpan.cs:348
  at Shared.Model.Settings.get_BaseUrlPollingInterval () <IL 0x00006, 0x00019>
  at PDC.UI.Data.Models.Settings.Merge (Shared.Model.Settings) <IL 0x00001, 0x0001d>
  at PDC.UI.Data.DataFactory/<>c__DisplayClassc.<BeginLoad>b__2 () <IL 0x00011, 0x0001f>
  at PDC.UI.Data.DataFactory/<>c__DisplayClass6e.<EndLoad>b__6d (System.Action) <IL 0x00001, 0x00011>
  at Caliburn.Micro.ExtensionMethods.Apply<T> (System.Collections.Generic.IEnumerable`1<T>,System.Action`1<T>) <IL 0x00012, 0x00074>
  at PDC.UI.Data.DataFactory/<>c__DisplayClass6e.<EndLoad>b__6c () <IL 0x00023, 0x0006b>
  at System.Windows.Threading.Dispatcher.InvokeDelegate (System.Delegate,object[]) [0x0000b] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:118
  at System.Windows.Threading.DispatcherOperation.Invoke () [0x00000] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/DispatcherOperation.cs:45
  at System.Windows.Threading.Dispatcher.Dispatch () [0x0005d] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:171
  at System.Windows.Threading.Dispatcher.dispatcher_callback (intptr) [0x00000] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:178
  at (wrapper native-to-managed) System.Windows.Threading.Dispatcher.dispatcher_callback (intptr) <IL 0x00028, 0xffffffff>
[0xb73e26d0:] EXCEPTION handling: System.ArgumentNullException: Argument cannot be null.
Parameter name: s

"<unnamed thread>" tid=0x0xb73e26d0 this=0x0x57f20 thread handle 0x403 state : not waiting owns ()
  at System.TimeSpan.Parse (string) [0x00022] in /home/poupou/git/mono/mcs/class/corlib/System/TimeSpan.cs:348
  at Shared.Model.Settings.get_BaseUrlPollingInterval () <IL 0x00006, 0x00019>
  at PDC.UI.Data.Models.Settings.Merge (Shared.Model.Settings) <IL 0x00001, 0x0001d>
  at PDC.UI.Data.DataFactory/<>c__DisplayClassc.<BeginLoad>b__2 () <IL 0x00011, 0x0001f>
  at PDC.UI.Data.DataFactory/<>c__DisplayClass6e.<EndLoad>b__6d (System.Action) <IL 0x00001, 0x00011>
  at Caliburn.Micro.ExtensionMethods.Apply<T> (System.Collections.Generic.IEnumerable`1<T>,System.Action`1<T>) <IL 0x00012, 0x00074>
  at PDC.UI.Data.DataFactory/<>c__DisplayClass6e.<EndLoad>b__6c () <IL 0x00023, 0x0006b>
  at System.Windows.Threading.Dispatcher.InvokeDelegate (System.Delegate,object[]) [0x0000b] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:118
  at System.Windows.Threading.DispatcherOperation.Invoke () [0x00000] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/DispatcherOperation.cs:45
  at System.Windows.Threading.Dispatcher.Dispatch () [0x0005d] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:171
  at System.Windows.Threading.Dispatcher.dispatcher_callback (intptr) [0x00000] in /home/poupou/git/moon/class/System.Windows/System.Windows.Threading/Dispatcher.cs:178
  at (wrapper native-to-managed) System.Windows.Threading.Dispatcher.dispatcher_callback (intptr) <IL 0x00028, 0xffffffff>

Is that expected ?
Comment 8 Alan McGovern 2011-03-11 13:04:16 UTC
Yes, this is an issue we currently hit and need to figure it out. If thats the only exception you're getting then the verifier issue must be resolved.
Comment 9 Sebastien Pouliot 2011-03-11 21:51:36 UTC
ok, back to Atsushi
Comment 10 Atsushi Enomoto 2011-03-14 08:27:20 UTC
There is no repro description.
Comment 11 Sebastien Pouliot 2011-03-21 19:29:29 UTC
Rodrigo, you wanted something specific tested (env var) before removing the
workaround ?

Atsushi, I've been using this URL (from Alan)
http://player.microsoftpdc.com/Session/1b127a7d-300e-4385-af8e-ac747fee677a