Bug 1618 - Mono 2.6.XX and 2.8.XX - ERROR:generic-sharing.c:402:rgctx_template_set_other_slot: assertion failed: (!(*oti)->data)
Summary: Mono 2.6.XX and 2.8.XX - ERROR:generic-sharing.c:402:rgctx_template_set_other...
Status: CLOSED DUPLICATE of bug 1147
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: High blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-10-20 20:19 UTC by Sergey Merkuriev
Modified: 2017-08-28 15:05 UTC (History)
6 users (show)

Tags:
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:
CLOSED DUPLICATE of bug 1147

Description Sergey Merkuriev 2011-10-20 20:19:49 UTC
I have mono segmentation fault when run console application. Error can be reproduce on any version mono starting 2.6 
That application work before well and it stopped run after changes not related to part code where segmentation fault happen.

Operating System identified as: Linux i686
Linux host_target1 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:05:14 UTC 2011 i686 i686 i386 GNU/Linux

Mono version found is: 2.6.7
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5ubuntu3)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC and Parallel Mark)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  x86
    Disabled:      none

Running: env LD_LIBRARY_PATH="./lib32_linux" "/usr/bin/mono" "."/SwiftCmd.exe --compile --config:./automation_fail/AutomationConfig.xml
...


SwiftTest Command Line [Version 2.0, Build 0.23.15625]
Copyright (c) 2008-2011 SwiftTest, Inc. All rights reserved.

compiling project: ./automation_fail/Automation/http_test.swift_test

verifying project...
creating documents list...
compiling...
Client Port 0.client_port
./automation_fail/Automation/NetworkProfile.network
./automation_fail/Automation/Scenario.client_scenario**
ERROR:generic-sharing.c:402:rgctx_template_set_other_slot: assertion failed: (!(*oti)->data)
Stacktrace:

  at SwiftTest.API.DataObjects.Scenario.AbstractParameter.set_Value (string) <0xffffffff>
  at SwiftTest.API.DataObjects.Scenario.AbstractParameter.set_Value (string) <0x0006f>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadParameter (SwiftTest.API.DataObjects.Scenario.AbstractParameter,System.Xml.XmlNode) <0x0040a>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadParameters (SwiftTest.API.DataObjects.Scenario.ParameterCollection,System.Xml.XmlNode) <0x00ae6>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadParameter (SwiftTest.API.DataObjects.Scenario.AbstractParameter,System.Xml.XmlNode) <0x007a7>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadParameters (SwiftTest.API.DataObjects.Scenario.ParameterCollection,System.Xml.XmlNode) <0x00ae6>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadAction (System.Xml.XmlNode) <0x0040c>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.FindAction (string,string) <0x00082>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.CreateAction<object> (string,string) <0x000d5>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadActions (SwiftTest.API.DataObjects.Scenario.ScenarioModel,System.Collections.Generic.IList`1<SwiftTest.API.DataObjects.Scenario.BaseAction>,SwiftTest.SharedAPI.Utils.MessageCollection,System.Xml.XmlReader) <0x00106>
  at SwiftTest.API.DataObjects.Scenario.ScenarioXmlService.LoadScenario (SwiftTest.API.DataObjects.Scenario.ScenarioModel,System.IO.Stream,string) <0x0043a>
  at SwiftTest.API.DocumentCompiler.ScenarioCompiler.Compile (System.IO.Stream,SwiftTest.SharedAPI.DocumentType,string,SwiftTest.API.DocumentCompiler.ScenarioCompilerData,SwiftTest.API.ErrorList) <0x000e4>
  at SwiftTest.API.DocumentCompiler.ScenarioCompiler.SafeCompileEx (string,SwiftTest.SharedAPI.DocumentType,SwiftTest.API.DocumentCompiler.ScenarioCompilerData,SwiftTest.API.ErrorList) <0x00131>
  at SwiftTest.API.DocumentCompiler.TestCompiler.Tools_CompileDocument (string,SwiftTest.SharedAPI.DocumentType,SwiftTest.API.PhysicalFiles) <0x009d6>
  at SwiftTest.API.DocumentCompiler.TestCompiler.CompileDocuments (SwiftTest.API.DocumentCompiler.CompiledProject) <0x00154>
  at SwiftTest.API.DocumentCompiler.TestCompiler.Run (SwiftTest.API.DocumentCompiler.CompiledProject&) <0x00246>
  at SwiftTest.CommandLine.Program.CompileTestProject (SwiftTest.API.DocumentCompiler.CompiledProject,SwiftTest.API.Framework.BaseProjectManager,SwiftTest.API.Framework.BaseTestProject,bool,string,string) <0x0029a>
  at SwiftTest.CommandLine.Program.Main (string[]) <0x00a89>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00043>

Native stacktrace:

    /usr/bin/mono() [0x80dbc5b]
    [0xb8840c]
    /lib/i386-linux-gnu/libc.so.6(abort+0x17e) [0x16434e]
    /lib/i386-linux-gnu/libglib-2.0.so.0(g_assertion_message+0x150) [0xf153a0]
    /lib/i386-linux-gnu/libglib-2.0.so.0(+0x6897d) [0xf1597d]
    /usr/bin/mono() [0x8142b84]
    /usr/bin/mono() [0x81432eb]
    /usr/bin/mono() [0x8143392]
    /usr/bin/mono() [0x8143392]
    /usr/bin/mono() [0x8143a42]
    /usr/bin/mono() [0x805e38b]
    /usr/bin/mono() [0x8100cde]
    /usr/bin/mono() [0x805fdd1]
    /usr/bin/mono() [0x806125b]
    /usr/bin/mono() [0x8061f42]
    /usr/bin/mono() [0x8062ade]
    /usr/bin/mono() [0x80dcd40]
    [0x299066]
    [0xad56fb]
    [0xad4cff]
    [0xad5a98]
    [0xad4cff]
    [0xad3fad]
    [0xad385b]
    [0xad3486]
    [0xad2ebf]
    [0xad243b]
    [0xaba955]
    [0xaba722]
    [0xab6e8f]
    [0xab5c4d]
    [0xab2d17]
    [0xab10b3]
    [0x8a4c6a]
    [0x8a578c]
    /usr/bin/mono() [0x8062bc8]
    /usr/bin/mono(mono_runtime_invoke+0x3e) [0x8192eee]
    /usr/bin/mono(mono_runtime_exec_main+0x15b) [0x8195a5b]
    /usr/bin/mono(mono_runtime_run_main+0x11d) [0x8195ced]
    /usr/bin/mono(mono_main+0x1676) [0x80b7706]
    /usr/bin/mono() [0x8059355]
    /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x14ce37]
    /usr/bin/mono() [0x8059291]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted
Comment 1 Jeffrey Stedfast 2011-10-20 20:41:41 UTC
Any chance you could test this with Mono 2.10(.6 preferably)?

We aren't supporting older versions any longer.
Comment 2 Sergey Merkuriev 2011-10-20 22:51:48 UTC
Workaround is changing following functions and delegate

public delegate void SetMemberCallback();

protected void SetMember<TV>(ref TV member, TV value, params string[] propertyNames)
{
   SetMember<TV>(ref member, value, null, propertyNames);
}

protected void SetMember<TV>(ref TV member, TV value, SetMemberCallback callback, params string[] propertyNames)
{
   ...
}

with

protected bool SetMember<TV>(ref TV member, TV value, params string[] propertyNames)
Comment 3 Sergey Merkuriev 2011-10-20 22:52:36 UTC
Mono 2.10.5 does not work too.
Comment 4 Zoltan Varga 2011-10-21 05:00:45 UTC
Run mono with -O=-gshared as a workaround.

*** This bug has been marked as a duplicate of bug 1147 ***
Comment 5 lindsey.driscoll 2012-01-04 12:34:10 UTC
Closing duplicates