Bug 46473 - Error: The object with ID N implements the IObjectReference interface for which all dependencies cannot be resolved. The likely cause is two instances of IObjectReference that have a mutual dependency on each other
Summary: Error: The object with ID N implements the IObjectReference interface for whi...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: 5.2 (2017-04)
Hardware: PC Linux
: --- normal
Target Milestone: Future Release
Assignee: Alexis Christoforides
URL:
Depends on:
Blocks:
 
Reported: 2016-11-04 14:29 UTC by y.skindersky
Modified: 2018-03-19 13:37 UTC (History)
7 users (show)

Tags: bugpool-archived
Is this bug a regression?: ---
Last known good build:

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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description y.skindersky 2016-11-04 14:29:26 UTC
Code snippet that sometimes reproduces the error is here: https://github.com/y-skindersky/CrossAppDomainServices

Please see:
https://github.com/y-skindersky/CrossAppDomainServices/blob/master/errorLog1.txt
https://github.com/y-skindersky/CrossAppDomainServices/blob/master/errorLog2.txt

mono --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
Comment 1 y.skindersky 2016-11-04 14:46:55 UTC
Please see:
https://github.com/y-skindersky/CrossAppDomainServices/blob/master/errorLog3.txt

mono --version
Mono JIT compiler version 4.6.1 (Stable 4.6.1.5/ef43c15 Wed Oct 12 09:10:37 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
Comment 2 Alexander Köplinger [MSFT] 2017-05-16 18:08:23 UTC
I can still repro on mono 5.2.0.114 (2017-04/8a4958a), moving to Class Libraries.
Comment 3 Alexis Christoforides 2018-02-15 23:07:04 UTC
I have a slightly simpler repro here: https://gist.github.com/alexischr/240cfb8f91d5630fdeb165bef78d29d6

Changing the ApplicationDependencies.Service property to a field removes the race.
Comment 4 Alexis Christoforides 2018-02-21 03:37:35 UTC
Fixed on master: https://github.com/mono/mono/commit/1426d6a8da8e0b72ff27034dfa7fe39a4d3eb4c4