Bug 57630 - random SIGSEGV faults double.Parse
Summary: random SIGSEGV faults double.Parse
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-20 14:53 UTC by smremde
Modified: 2017-08-17 17:31 UTC (History)
3 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:
RESOLVED NORESPONSE

Description smremde 2017-06-20 14:53:43 UTC
Tested on Ubuntu 14.04/ 3.2.x and 16.04/4.2.1

Crashes randomly when serialising some objects (works second time around). The Newtonsoft library was copied from a windows machine.


Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <0xffffffff>
  at double.Parse (string,System.Globalization.NumberStyles,System.IFormatProvider,bool,double&,System.Exception&) <0x0049b>
  at double.Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) <0x00043>
  at double.Parse (string,System.IFormatProvider) <0x0001f>
  at System.NumberFormatter.FormatRoundtrip (double,System.Globalization.NumberFormatInfo) <0x0008f>
  at System.NumberFormatter.NumberToString (string,double,System.IFormatProvider) <0x000c3>
  at double.ToString (string,System.IFormatProvider) <0x0002b>
  at Newtonsoft.Json.JsonConvert.ToString (double,Newtonsoft.Json.FloatFormatHandling,char,bool) <0x00047>
  at Newtonsoft.Json.JsonTextWriter.WriteValue (double) <0x0003b>
  at Newtonsoft.Json.Linq.JValue.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x00572>
  at Newtonsoft.Json.Linq.JArray.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x00083>
  at Newtonsoft.Json.Linq.JArray.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x00083>
  at Newtonsoft.Json.Linq.JProperty.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0004c>
  at Newtonsoft.Json.Linq.JObject.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0005d>
  at Newtonsoft.Json.Linq.JProperty.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0004c>
  at Newtonsoft.Json.Linq.JObject.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0005d>
  at Newtonsoft.Json.Linq.JProperty.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0004c>
  at Newtonsoft.Json.Linq.JObject.WriteTo (Newtonsoft.Json.JsonWriter,Newtonsoft.Json.JsonConverter[]) <0x0005d>
  at Newtonsoft.Json.Linq.JToken.ToString (Newtonsoft.Json.Formatting,Newtonsoft.Json.JsonConverter[]) <0x000a7>
  at VideoLib.Trace.Put (string,Newtonsoft.Json.Linq.JObject) <0x000c3>
  at MoveToTraces.Program.Check (string) <0x00757>
  at MoveToTraces.Program.Scan (string) <0x002ab>
  at MoveToTraces.Program.Scan (string) <0x0026f>
  at MoveToTraces.Program.Scan (string) <0x0026f>
  at MoveToTraces.Program.Main (string[]) <0x0007b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x4b73d8]
        mono() [0x50f13b]
        mono() [0x423d22]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7fdf2b4a5330]
        mono() [0x5d6487]
        mono() [0x5d93d2]
        mono() [0x5dd6f3]
        mono() [0x5de3b9]
        mono() [0x5f4719]
        mono() [0x5f4914]
        [0x41e5c1f9]

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.
No threads.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Ludovic Henry 2017-06-28 19:35:03 UTC
Hello, this looks like a GC crash. Could you please run it with Mono 5.0 which is available on Ubuntu 16.04 and confirm if it still crashes? If it does, please provide a repro case, otherwise it will be impossible to track it down. Thank you.
Comment 2 Ludovic Henry 2017-08-17 17:31:06 UTC
Please reopen whenever you provide a reproduction case so we can have a look. Thank you.