Raphael Boissel | 4 Sep 12:15 2015
Picon

[SIGNAL] Segfault in native function called by managed code

Hello,


I have one little question on the way mono currently handles/uses the
SEGFAULT signal on Unix OSes.

Currently, and correct me if I'm wrong, either the segfault has been
raised by a managed function and in this case it is handled as a
genuine exception for instance a nullRefException or if it is triggered
by native code the entire program is stopped and a stacktrace is
displayed.

However it seems that mono also follow the second behavior for
native code that has been invoked inside managed code,
where I would have expected an AccessViolationException.

Is there any specific reasons why this behavior is followed, or is it
just an implementation choice ?

(sorry about the potential double post I sent it first with a non-whitelisted
e-mail address)

Thanks,

--
Raphaël 'Shugo' Boissel
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Douglas Roffel | 3 Sep 21:51 2015

Crashes In Mini-Runtime on Ubuntu 14.04

I forgot to paste the backtrace, sorry about that: http://pastebin.com/raw.php?i=ULAcFYq1

 

From: Douglas Roffel
Sent: Thursday, September 03, 2015 12:48 PM
To: 'mono-devel-list <at> lists.ximian.com'
Subject: Crashes In Mini-Runtime on Ubuntu 14.04

 

Hey Mono-Dev,

 

I’ve recently been trying to debug a crash in the Mini-Runtime, and I’m unsure of where to look. The cause of the crash is a failed mono_domain_get (), which returns a null pointer at mini-runtime.c:2101

MonoDomain *domain = mono_domain_get ();

 

This causes a segfault at mini-runtime.c:2110

domain_info = domain_jit_info (domain);

 

Calling mono_domain_get after the segfault returns a valid appdomain, and this function is executed hundreds of times before segfaulting, so the appdomain has definitely been initialized properly.

 

Here is a backtrace of the state of all threads directly before the crash, the segfault occurs in thread 9.

 

I apparently don’t have the latest version of mini-runtime, so my line numbers are slightly off from master (I’m running Mono 4.3.0, pulled and compiled on august 18th, for reference). The line numbers I’m referencing are in the official repo at:

                https://github.com/mono/mono/blob/master/mono/mini/mini-runtime.c#L2097

                https://github.com/mono/mono/blob/master/mono/mini/mini-runtime.c#L2106

 

 

Any direction would be appreciated,

 

-          Douglas Roffel

***************************Legal Disclaimer*************************** "This communication may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message by mistake, please advise the sender by reply email and delete the message. Thank you." **********************************************************************
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Douglas Roffel | 3 Sep 21:48 2015

Crashes In Mini-Runtime on Ubuntu 14.04

Hey Mono-Dev,

 

I’ve recently been trying to debug a crash in the Mini-Runtime, and I’m unsure of where to look. The cause of the crash is a failed mono_domain_get (), which returns a null pointer at mini-runtime.c:2101

MonoDomain *domain = mono_domain_get ();

 

This causes a segfault at mini-runtime.c:2110

domain_info = domain_jit_info (domain);

 

Calling mono_domain_get after the segfault returns a valid appdomain, and this function is executed hundreds of times before segfaulting, so the appdomain has definitely been initialized properly.

 

Here is a backtrace of the state of all threads directly before the crash, the segfault occurs in thread 9.

 

I apparently don’t have the latest version of mini-runtime, so my line numbers are slightly off from master (I’m running Mono 4.3.0, pulled and compiled on august 18th, for reference). The line numbers I’m referencing are in the official repo at:

                https://github.com/mono/mono/blob/master/mono/mini/mini-runtime.c#L2097

                https://github.com/mono/mono/blob/master/mono/mini/mini-runtime.c#L2106

 

 

Any direction would be appreciated,

 

-          Douglas Roffel

***************************Legal Disclaimer*************************** "This communication may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message by mistake, please advise the sender by reply email and delete the message. Thank you." **********************************************************************
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
lorenzo.delana | 2 Sep 20:17 2015
Picon

SslStream X509 certificate

I'm struggling to find a way to run a SSL server on Linux using mono,
I have a certificate with a private key installed using certmgr and I can
see by listing that the certificate is in the store with Private Key: True

The same client/server code on windows works if I install the certificate
key in Personal store but using mono I keep getting follow error when client
connects the sever

System.IO.IOException: The authentication or decryption has failed. --->
Mono.Security.Protocol.Tls.TlsException: Server certificate Private Key
unavailable.

An example client/server can be found at
https://msdn.microsoft.com/en-us/library/system.net.security.sslstream(v=vs.110).aspx

I also tried to inspect all certificates available in the store with follow
code

var types = new StoreName[]
                    {
                         StoreName.Root,
                         StoreName.TrustedPeople,
                         StoreName.TrustedPublisher,
                         StoreName.CertificateAuthority,
                         StoreName.AuthRoot,
                         StoreName.AddressBook,
                         StoreName.Disallowed
                    };
                foreach (var x in types)
                {
                    var store = new
System.Security.Cryptography.X509Certificates.X509Store(x);

                    Console.WriteLine($"store
cnt={store.Certificates.Count}");

                    foreach (var y in store.Certificates)
                    {
                        Console.WriteLine($"CERT=[{y.FriendlyName}]");
                    }
                }     

and results nothing for any store name used.

Some direction to solve this problem ?

thx

--
View this message in context: http://mono.1490590.n4.nabble.com/SslStream-X509-certificate-tp4666570.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
Edward Ned Harvey (mono | 1 Sep 22:04 2015

Class built by mono throws FileNotFoundException when run on windows

I've always used separate project files on windows and linux, in order to include different compiler
symbols, in order to make projects build with different dependencies. I've been chastised here for doing
it, so I'd like to find a better way. (Miguel and others tore apart a pull request, saying I should never
check __MONO__, if I need behavior to be different on windows and non-windows, I need to use a runtime
check. The problem is, as described below, the runtime check can't build or run on windows, so I'd like to
figure out how it should be done).

Right now, I have a class, which is using Mono.Unix.Native, because of a method that does this: 
    if (Type.GetType("Mono.Runtime") != null) {
        Syscall.chmod(...);
    }

When built and run on mono, works great. The problem is building and running on windows. In order to make it
build, I copied Mono.Posix.dll into the project and referenced it, with CopyLocal = False. This way,
Mono.Posix.dll doesn't get copied to the build directory, which is good because it's already present on
mono systems, and not needed on windows systems - the only reason for it to exist in the project is because
windows can't build without it.

So it builds. But unfortunately, it won't run on windows. It throws FileNotFoundException
"Mono.Posix.dll" before evaluating the if-clause.

The workaround I've found is to create a wrapper class MonoSpecific, so the if-clause and the Mono.Posix
call are not in the same file. But this is clearly a hack. Is there a better way?

Hello.cs:
    using System;
    namespace helloProject
    {
        static class Hello
        {
            static void ChangePermsIfNecessary()
            {
                if (Type.GetType("Mono.Runtime") != null) {
                    MonoSpecific.DoChmod();
                }
            }
        }
    }

MonoSpecific.cs:
    using System;
    using Mono.Unix.Native;
    namespace helloProject
    {
        static class MonoSpecific
        {
            static void DoChmod()
            {
                Syscall.chmod(...);
            }
        }
    }
André Verwijs | 1 Sep 20:45 2015
Picon

Running .NET on (OpenSUSE) Linux (13.2) still crashes with thread overload...

OS:
Linux 3.16.7-24-desktop - openSUSE 13.2 (Harlequin) (x86_64)
KDE 4.14.9
Mono version 3.8.0 (tarball Fri Oct 10 15:00:11 UTC 2014)

when running Windows .NET code on (OpenSUSE)Linux (13.2)  still crashes 
with thread overload.  tips on fixes or performance settings are welcome....

view stacktrace online here:
https://drive.google.com/file/d/0B4_TSVggahj8MDFOMVR1V2dUc3M/view?usp=drivesdk 
Greg Young | 30 Aug 17:18 2015
Picon

Exception in a background thread

OSX

Mono JIT compiler version 4.1.0 (master/48d64eb Sat Mar 21 03:42:51 EET 2015)

[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException:
Argument is out of range.
Parameter name: startIndex
 at System.String.Substring (Int32 startIndex)<0x111eb2e60 + 0x0006d>
in <filename unknown>:0
 at System.IO.KqueueMonitor.PostEvent (FileAction action,
System.String path, System.String newPath)<0x129432350 + 0x0007f> in
<filename unknown>:0
 at System.IO.KqueueMonitor.Remove (System.IO.PathData
pathData)<0x129431f70 + 0x00074> in <filename unknown>:0
 at System.Collections.Generic.List`1[System.IO.PathData].ForEach
(System.Action`1 action)<0x111b95770 + 0x0007e> in <filename
unknown>:0
 at System.IO.KqueueMonitor.Monitor ()<0x114c14ff0 + 0x005ef> in
<filename unknown>:0
 at System.IO.KqueueMonitor.DoMonitor ()<0x114c10be0 + 0x001e7> in
<filename unknown>:0

Has anyone seen this before?

--

-- 
Studying for the Turing test
Normand | 29 Aug 07:08 2015
Picon

what git commit id for provided source tarball ?

Hi there,
Is there a way to find the relation between a source tarball provided in (1) and the git tree of (2)
Is there a git commit id associated to the tarball ?

(1) http://download.mono-project.com/sources/mono/
     http://download.mono-project.com/sources/mono/mono-4.0.3.20.tar.bz2
(2) https://github.com/mono/mono

--

-- 
Michel Normand
Neale Ferguson | 27 Aug 18:42 2015
Picon

Registry question

Is registry multi-process safe? How are registry transactions maintained
by Mono? Also, I assume the EventLog is just syslog on Linux.

Neale
Miguel de Icaza | 27 Aug 18:06 2015

State of TLS, SslStream and HttpWebRequest support in Mono

Hello team,

I have posted an update on our TLS and networking stack efforts:


Miguel
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Alex J Lennon | 27 Aug 15:48 2015
Picon

4.2.0.179 issue vs 4.0.4.1

Hi,

I was adding Yocto/OE meta-mono support for the 4.2.0.179 release.

The 4.0.4.1 release on 26th builds fine for me for a qemux86 target but
I'm getting the following error for 4.2.0.179 today:

| ../../doltlibtool  --tag=CC   --mode=compile i586-poky-linux-gcc  -m32
-march=i586
--sysroot=/data_drive/imx6/rootfs_builder/qemux86.dizzy/tmp/sysroots/qemux86
-DHAVE_CONFIG_H -I. -I../..  -I../../libgc/include -DGC_LINUX_THREADS
-D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -g -Wall -Wunused
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
-Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
-Wno-attributes -D_FILE_OFFSET_BITS=64 -DUSE_COMPILER_TLS -I../..
-I../../eglib/src -I../../eglib/src    -fvisibility=hidden -O2 -pipe -g
-feliminate-unused-debug-types -std=gnu99 -fno-strict-aliasing -fwrapv
-DMONO_DLL_EXPORT -Wno-unused-but-set-variable -g -Wall -Wunused
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
-Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
-Wno-attributes -mno-tls-direct-seg-refs
-Werror-implicit-function-declaration -c -o
libmini_static_la-branch-opts.lo `test -f 'branch-opts.c' || echo
'./'`branch-opts.c
| mini-x86.c: In function 'mono_arch_emit_epilog':
| mini-x86.c:5468:23: error: #if with no expression
|  #if MONO_HAVE_FAST_TLS
|                        ^

Can anybody give me a bit of direction on whether this is a
misconfiguration on my part or something new that's needed?

Thanks,

Alex

Gmane