Bug 2449 - System.StackOverflowException when using ZeroC Ice 3.4.2 on Mono 2.10.x
Summary: System.StackOverflowException when using ZeroC Ice 3.4.2 on Mono 2.10.x
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-09 22:47 UTC by Milton Pividori
Modified: 2012-06-25 11:17 UTC (History)
2 users (show)

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


Attachments
Output of the server app when using this argument: --trace=E:System.StackOverflowException (28.46 KB, application/x-bzip)
2011-12-09 22:49 UTC, Milton Pividori
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 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 NOT_ON_ROADMAP

Description Milton Pividori 2011-12-09 22:47:43 UTC
Description of Problem:

I have server-client app developed with Mono 2.10.5. When I start the server and connect from the client, it works fine with some queries (from client to server), but fails with a StackOverflowException on some of those queries. This is what I see from the console:

Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf2c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cd6c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ce9c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf0c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ceac
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf9c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cfec
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf5c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ce9c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cd6c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cdac
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ccec
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ce2c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf4c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cf2c
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516ceac
Stack overflow in unmanaged: IP: 0x82266c9, fault addr: 0x516cd6c

Trying to debug the code, I ran my application with --trace=E:System.StackOverflowException and I see that ZeroC Ice fails when it tries to load referenced assemblies (take a look at the attached log file). This method that is calling itself over and over again:

IceInternal.AssemblyUtil.loadReferencedAssemblies (System.Reflection.Assembly)

I thought that this might be related to this Ice version, but this doesn't happen with Mono 2.6.7. It also works on Windows with .NET 4.0. So it may be a bug in Mono 2.10.x.

One more thing: once the server app fails with StackOverfloException, the following queries work (the same that failed at the first time).
Comment 1 Milton Pividori 2011-12-09 22:49:05 UTC
Created attachment 1029 [details]
Output of the server app when using this argument: --trace=E:System.StackOverflowException
Comment 2 Zoltan Varga 2011-12-10 04:41:15 UTC
It would be better to report this to the ice developers, they are in a better position to figure out what is happening here, and if it is indeed a mono bug, they can supply us with more information.
Comment 3 Milton Pividori 2011-12-10 09:34:07 UTC
@Zoltan, good point. Will report the bug in their bug tracking system and reference this one.

Thanks!
Comment 4 Milton Pividori 2011-12-13 12:27:55 UTC
I reported a bug in the ZeroC Ice forums:

http://www.zeroc.com/forums/bug-reports/5586-system-stackoverflowexception-when-using-zeroc-ice-3-4-2-mono-2-10-x.html
Comment 5 Zoltan Varga 2012-01-24 00:44:28 UTC
-> closing for now.
Comment 6 Milton Pividori 2012-06-25 10:53:44 UTC
This bug is present only if I compile using the profile 4.0. If I use 3.5, the server runs fine. This indicates that there might be a problem in the Mono runtime, not ZeroC Ice.
Comment 7 Zoltan Varga 2012-06-25 11:17:03 UTC
As I said, somebody who knows the ice codebase needs to track down where the actual problem is, and whenever it is in their code, or ours.