Bug 36443 - counter warning printed when two threads terminate with exceptions simultaneously
Summary: counter warning printed when two threads terminate with exceptions simultaneo...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-01 20:34 UTC by Andi McClure
Modified: 2015-12-02 18:21 UTC (History)
3 users (show)

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


Attachments
Minimal test. The name is not meaningful (1.01 KB, text/x-csrc)
2015-12-01 20:35 UTC, Andi McClure
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 FIXED

Description Andi McClure 2015-12-01 20:34:28 UTC

    
Comment 1 Andi McClure 2015-12-01 20:35:54 UTC
Created attachment 14063 [details]
Minimal test. The name is not meaningful
Comment 2 Andi McClure 2015-12-01 20:47:41 UTC
While debugging something unrelated, I found that if I cause two threads to terminate with thrown exceptions at about the same time, I see a single message printed twice:

"you are registering twice the same counter address"

This is a g_warning in mono-counters.c.

To reproduce, I have attached a file "SignalTest.cs". I do not see the message every time, but if I run the test repeatedly I see it within a few iterations. I run it repeatedly with

while (mono SignalTest.exe; true); do :; done

If I modify mono-counters.c to print the name of the counter, I find the counter names are:

RGCTX template num allocted
RGCTX template bytes allocted

and, on VERY rare occasions:

RGCTX num lazy fetch trampolines
RGCTX unmanaged lookups

Expected behavior: I think g_warnings should not be triggered by anything that user code could reasonably do, and the included code is reasonable.
Comment 3 Zoltan Varga 2015-12-02 18:21:35 UTC
Fixed in master.