Bug 58240 (SIGSEGV) - 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
Summary: Got a SIGSEGV while executing native code. This usually indicates a fatal err...
Status: IN_PROGRESS
Alias: SIGSEGV
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2017-07-19 11:00 UTC by Rohit Mandalapu
Modified: 2017-07-20 07:38 UTC (History)
2 users (show)

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


Attachments
Actual Output i am getting (1.23 MB, text/plain)
2017-07-19 11:00 UTC, Rohit Mandalapu
Details
Unfortunate-II (696.99 KB, text/plain)
2017-07-20 07:35 UTC, Rohit Mandalapu
Details

Description Rohit Mandalapu 2017-07-19 11:00:54 UTC
Created attachment 23653 [details]
Actual Output i am getting

I am facing the SIGSEGV problem repeatedly while I am in debugging a application. I am unable to know the reason of this from any source online so please let me know the reason of the  error I am getting in the output I am also mentioned the versions of all Visual Studio components below.

Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA827
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA827
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA827
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA827
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA827
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.18.00214.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Clang with Microsoft CodeGen   14.0.25516
Clang with Microsoft CodeGen

Common Azure Tools   1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript   1.8.29.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.3.1.2 (9dbc4c5)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.10.0.37 (ad35de4)
Visual Studio extension to enable development for Xamarin.iOS.


After getting this error in output debug disconnects automatically and gives unfortunately application stopped error.
Comment 1 Jon Douglas [MSFT] 2017-07-19 15:44:04 UTC
The big item that I see inside the logs is the following:

07-07 23:25:37.226 F/libc    (31298): Fatal signal 6 (SIGABRT), code -6 in tid 32598 (Thread-105914)
07-07 23:25:37.226 E/mono-rt (31298): Stacktrace:
07-07 23:25:37.226 E/mono-rt (31298): 
07-07 23:25:37.226 E/mono-rt (31298):   at <unknown> <0xffffffff>
07-07 23:25:37.226 E/mono-rt (31298):   at (wrapper managed-to-native) SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroidInternal.sqlite3_step (intptr) <0x00037>
07-07 23:25:37.226 E/mono-rt (31298):   at SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroid.Step (SQLite.Net.Interop.IDbStatement) [0x0000e] in <8dbf6ff85082469fb9d4dfaa9eae6b69>:0
07-07 23:25:37.226 E/mono-rt (31298):   at SQLite.Net.SQLiteCommand.ExecuteNonQuery () [0x00029] in <8f2bb39aeff94a30a8628064be9c7efe>:0
07-07 23:25:37.226 E/mono-rt (31298):   at SQLite.Net.SQLiteConnection.Execute (string,object[]) [0x00044] in <8f2bb39aeff94a30a8628064be9c7efe>:0
07-07 23:25:37.226 E/mono-rt (31298):   at FPO.Droid.Views.DashboardView.UpdateDecryptedPwd () [0x00019] in E:\MRohit Khethi\FPO_APP\FPO\FPO.Droid\Views\DashboardView.cs:1173
07-07 23:25:37.226 E/mono-rt (31298):   at FPO.Droid.Views.DashboardView.OnCreate (Android.OS.Bundle) [0x0012b] in E:\MRohit Khethi\FPO_APP\FPO\FPO.Droid\Views\DashboardView.cs:237
07-07 23:25:37.226 E/mono-rt (31298):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
07-07 23:25:37.226 E/mono-rt (31298):   at (wrapper dynamic-method) object.806e3553-1027-463d-a43a-40085db448f4 (intptr,intptr,intptr) [0x00017] in <3fd174ff54b146228c505f23cf75ce71>:0
07-07 23:25:37.236 E/mono-rt (31298):   at (wrapper native-to-managed) object.806e3553-1027-463d-a43a-40085db448f4 (intptr,intptr,intptr) [0x00022] in <3fd174ff54b146228c505f23cf75ce71>:0

So it seems this is coming from SQLite. How do you fix that? I would not be so certain. However for us to additionally assist in investigation of this issue, we will need a sample reproduction that we can CONFIRM this behavior with. If you can upload a sample project that this occurs on, we would be rather grateful.

Thank you!
Comment 2 Jon Douglas [MSFT] 2017-07-19 18:44:36 UTC
As a colleague has pointed out to me, it seems that this might be occurring when you are running SQLite in a multi-threaded environment and you need to add the "SQLITE_OPEN_FULLMUTEX" flag which maps to SQLiteOpenFlags.FullMutex in SQLite.Net.

Here's a similar bug report on this issue:

https://bugzilla.xamarin.com/show_bug.cgi?id=21492

The solution was to add `SQLiteOpenFlags.FullMutex` to the `new SQLiteConnection()` call.

http://www.sqlite.org/c3ref/threadsafe.html
Comment 3 Rohit Mandalapu 2017-07-20 07:35:05 UTC
Created attachment 23676 [details]
Unfortunate-II
Comment 4 Rohit Mandalapu 2017-07-20 07:38:29 UTC
I am unable to produce the same trace, every time it is generating different traces, and this issue is raising in entire application only for me, All other team members are working fine with the same project without any issues, they do get the issue like this but like couple of times a day or not even once.
I am unable get the issue causing this, as this is only issue causing from my system.
Please Help me getting this issue resolved.

Note You need to log in before you can comment on or make changes to this bug.