Bug 10000 - Segmentation fault at exit when using Npgsql via Assembly.Load
Summary: Segmentation fault at exit when using Npgsql via Assembly.Load
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-03 04:34 UTC by Rex
Modified: 2017-08-17 17:26 UTC (History)
4 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 NOT_REPRODUCIBLE

Description Rex 2013-02-03 04:34:19 UTC
Recently I have made a program that executes some sql commands. As it supports multiple databases(SQL Server, PostgreSQL and MySQL), it loads the PostgreSQL client Npgsql and MySQL client via Assembly.Load.
It works well with MySQL on Mono on Windows and openSUSE. It works well with PostgreSQL on Mono on Windows. But there is a segmentation fault with PostgreSQL on openSUSE. Aside from the segfault, the SQLs complete successfully.
As Npgsql is a pure managed library I don't expect to see a native error in it.

The following is a minimal sample:

using System;
using System.Reflection;
using System.IO;
using System.Data;

namespace MonoTest
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var p = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Npgsql.dll");
            var asm = Assembly.Load(AssemblyName.GetAssemblyName(p));
            var t = asm.GetType("Npgsql.NpgsqlConnection");
            var c = Activator.CreateInstance(t, "Server=localhost;User ID=postgres;");
        }
    }
}

You don't even need a PostgreSQL server to test as the connection is not actually opened.
I got Npgsql 2.0.12 from http://npgsql.projects.pgfoundry.org/
The ms.net4.0 and mono2.0 version are all with the problem.
Firstly, I think it may be caused by that Npgsql is compiled against a wrong version of Mono.Security.dll. So I recompiled Npgsql with 4.0 version of Mono.Security.dll so that all assemblies are under the 4.0 CLR. But the problem still exists.

I followed the guide on the mono website to use gdb to get the crash site.
And I found it is at unloading System.Data.dll when trying to unload a subclass of System.Object.
The subclass 0xa596e0 in
move_subclasses_not_in_image_foreach_func (class=0x999be0, subclass=0xa596e0, image=0xa0f010)
is an invalid pointer that points to a block of 0x454545454545 which I believe indicates invalid memory.

I think this is because somehow 0xa596e0 is got destroyed prematurely.

Following is the detailed call stack and some arguments.

Program received signal SIGSEGV, Segmentation fault.
class_lookup_rgctx_template (class=0xa596e0) at mini-generic-sharing.c:229
229     mini-generic-sharing.c: No such file or directory.
        in mini-generic-sharing.c
(gdb) where
#0  class_lookup_rgctx_template (class=0xa596e0) at mini-generic-sharing.c:229
#1  0x00000000004a417b in move_subclasses_not_in_image_foreach_func (
    class=0x999be0, subclass=0xa596e0, image=0xa0f010)
    at mini-generic-sharing.c:281
#2  0x00000000005fed0c in monoeg_g_hash_table_foreach (hash=0x9d3cf0, 
    func=0x4a4140 <move_subclasses_not_in_image_foreach_func>, 
    user_data=0xa0f010) at ghashtable.c:354
#3  0x00000000004a40da in mono_class_unregister_image_generic_subclasses (
    image=0xa0f010, user_data=<optimized out>) at mini-generic-sharing.c:318
#4  0x000000000052738d in mono_image_invoke_unload_hook (image=0xa0f010)
    at image.c:108
#5  mono_image_close_except_pools (image=0xa0f010) at image.c:1528
#6  0x00000000004fb272 in mono_assembly_close_except_image_pools (
    assembly=0xa11e40) at assembly.c:2940
#7  0x00000000005273fe in mono_image_close_except_pools (image=0xa06120)
    at image.c:1543
#8  0x00000000004fb272 in mono_assembly_close_except_image_pools (
    assembly=0xa07a90) at assembly.c:2940
#9  0x0000000000591073 in mono_domain_free (domain=0x7ffff7e3ccc0, 
    force=<optimized out>) at domain.c:1991
#10 0x0000000000415465 in mini_cleanup (domain=0x7ffff7e3ccc0) at mini.c:6897
#11 0x00000000004745af in mono_main (argc=<optimized out>, 
    argv=<optimized out>) at driver.c:1957
#12 0x00007ffff71ee23d in __libc_start_main () from /lib64/libc.so.6
#13 0x0000000000414c89 in _start () at ../sysdeps/x86_64/elf/start.S:113

(gdb) p *(MonoClass *)0x999be0
$2 = {element_class = 0x999be0, cast_class = 0x999be0, supertypes = 0x9aba88, 
  idepth = 1, rank = 0 '\000', instance_size = 16, inited = 1, 
  init_pending = 0, size_inited = 1, valuetype = 0, enumtype = 0, 
  blittable = 1, unicode = 0, wastypebuilder = 0, min_align = 1 '\001', 
  packing_size = 0, ghcimpl = 0, has_finalize = 0, marshalbyref = 0, 
  contextbound = 0, delegate = 0, gc_descr_inited = 1, has_cctor = 0, 
  has_references = 0, has_static_refs = 0, no_special_static_fields = 1, 
  is_com_object = 0, nested_classes_inited = 1, interfaces_inited = 1, 
  simd_type = 0, is_generic = 0, is_inflated = 0, has_finalize_inited = 1, 
  fields_inited = 1, setup_fields_called = 0, exception_type = 0 '\000', 
  parent = 0x0, nested_in = 0x0, image = 0x999e00, 
  name = 0x7ffff692f994 "Object", name_space = 0x7ffff692ee91 "System", 
  type_token = 33554755, vtable_size = 5, interface_count = 0, 
  interface_id = 0, max_interface_id = 0, interface_offsets_count = 0, 
  interfaces_packed = 0x9abbc0, interface_offsets_packed = 0x9abbc0, 
  interface_bitmap = 0x9abbc0 "", interfaces = 0x0, sizes = {class_size = 0, 
    element_size = 0, generic_param_token = 0}, flags = 1056769, field = {
    first = 1395, count = 0}, method = {first = 4238, count = 13}, 
  ref_info_handle = 0, marshal_info = 0x0, fields = 0x9af0c0, methods = 0x0, 
  this_arg = {data = {klass = 0x999be0, type = 0x999be0, array = 0x999be0, 
      method = 0x999be0, generic_param = 0x999be0, generic_class = 0x999be0}, 
    attrs = 0, type = MONO_TYPE_OBJECT, num_mods = 0, byref = 1, pinned = 0, 
    modifiers = 0x999ca4}, byval_arg = {data = {klass = 0x999be0, 
      type = 0x999be0, array = 0x999be0, method = 0x999be0, 
      generic_param = 0x999be0, generic_class = 0x999be0}, attrs = 0, 
    type = MONO_TYPE_OBJECT, num_mods = 0, byref = 0, pinned = 0, 
    modifiers = 0x999cb4}, generic_class = 0x0, generic_container = 0x0, 
  gc_descr = 0x0, runtime_info = 0x9afb18, next_class_cache = 0x0, 
  vtable = 0x9abb98, ext = 0x0}

(gdb) p *(MonoClass *)0xa596e0
$3 = {element_class = 0x4545454545454545, cast_class = 0x4545454545454545, 
  supertypes = 0x4545454545454545, idepth = 17733, rank = 69 'E', 
  instance_size = 1162167621, inited = 1, init_pending = 0, size_inited = 1, 
  valuetype = 0, enumtype = 0, blittable = 0, unicode = 1, wastypebuilder = 0, 
  min_align = 69 'E', packing_size = 5, ghcimpl = 0, has_finalize = 0, 
  marshalbyref = 1, contextbound = 0, delegate = 1, gc_descr_inited = 0, 
  has_cctor = 1, has_references = 0, has_static_refs = 0, 
  no_special_static_fields = 0, is_com_object = 1, nested_classes_inited = 0, 
  interfaces_inited = 1, simd_type = 0, is_generic = 1, is_inflated = 0, 
  has_finalize_inited = 0, fields_inited = 0, setup_fields_called = 1, 
  exception_type = 69 'E', parent = 0x4545454545454545, 
  nested_in = 0x4545454545454545, image = 0x4545454545454545, 
  name = 0x4545454545454545 <Address 0x4545454545454545 out of bounds>, 
  name_space = 0x4545454545454545 <Address 0x4545454545454545 out of bounds>, 
  type_token = 1162167621, vtable_size = 1162167621, interface_count = 17733, 
  interface_id = 17733, max_interface_id = 17733, 
  interface_offsets_count = 17733, interfaces_packed = 0x4545454545454545, 
  interface_offsets_packed = 0x4545454545454545, 
  interface_bitmap = 0x4545454545454545 <Address 0x4545454545454545 out of bounds>, interfaces = 

0x4545454545454545, sizes = {class_size = 1162167621, 
    element_size = 1162167621, generic_param_token = 1162167621}, 
  flags = 1162167621, field = {first = 1162167621, count = 1162167621}, 
  method = {first = 1162167621, count = 1162167621}, 
  ref_info_handle = 1162167621, marshal_info = 0x4545454545454545, 
  fields = 0x4545454545454545, methods = 0x4545454545454545, this_arg = {
    data = {klass = 0x4545454545454545, type = 0x4545454545454545, 
      array = 0x4545454545454545, method = 0x4545454545454545, 
      generic_param = 0x4545454545454545, generic_class = 0x4545454545454545}, 
    attrs = 17733, type = MONO_TYPE_PINNED, num_mods = 5, byref = 1, 
    pinned = 0, modifiers = 0xa597a4}, byval_arg = {data = {
      klass = 0x4545454545454545, type = 0x4545454545454545, 
      array = 0x4545454545454545, method = 0x4545454545454545, 
      generic_param = 0x4545454545454545, generic_class = 0x4545454545454545}, 
    attrs = 17733, type = MONO_TYPE_PINNED, num_mods = 5, byref = 1, 
    pinned = 0, modifiers = 0xa597b4}, generic_class = 0x4545454545454545, 
  generic_container = 0x4545454545454545, gc_descr = 0x4545454545454545, 
  runtime_info = 0x4545454545454545, next_class_cache = 0x4545454545454545, 
  vtable = 0x4545454545454545, ext = 0x4545454545454545}

(gdb) p *(MonoImage *)0xa0f010
$4 = {ref_count = 0, raw_data_handle = 0xd0600, 
  raw_data = 0x7ffff5de9000 "MZ\220", raw_data_len = 853504, 
  raw_buffer_used = 1 '\001', raw_data_allocated = 0 '\000', 
  fileio_used = 0 '\000', dynamic = 0 '\000', ref_only = 0 '\000', 
  uncompressed_metadata = 0 '\000', checked_module_cctor = 1 '\001', 
  has_module_cctor = 0 '\000', idx_string_wide = 1 '\001', 
  idx_guid_wide = 0 '\000', idx_blob_wide = 0 '\000', 
  core_clr_platform_code = 0 '\000', 
  name = 0xa0f880 "/usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll", assembly_name = 

0x7ffff5e7b637 "System.Data", 
  module_name = 0x7ffff5e90ccb "System.Data.dll", 
  version = 0xa05b50 "v4.0.30319", md_version_major = 1, md_version_minor = 1, 
  guid = 0xa09090 "A2A96BEC-FFEC-485B-9A07-EC36D518A09D", 
  image_info = 0xa0f600, mempool = 0xa0edc0, 
  raw_metadata = 0x7ffff5e462d0 "BSJB\001", heap_strings = {
    data = 0x7ffff5e7b574 "", size = 87912}, heap_us = {
    data = 0x7ffff5e90cdc "", size = 104932}, heap_blob = {
    data = 0x7ffff5eaa6d0 "", size = 55180}, heap_guid = {
    data = 0x7ffff5eaa6c0 "\354k\251\242\354\377[H\232\a\354\066\325\030\240\235", size = 16}, heap_tables = 

{data = 0x7ffff5e4633c "", size = 217656}, 
  tables_base = 0x7ffff5e463c4 "", tables = {{base = 0x7ffff5e463c4 "", 
      rows = 1, row_size = 12, size_bitfield = 83886429}, {
      base = 0x7ffff5e463d0 "\006", rows = 404, row_size = 10, 
      size_bitfield = 50331709}, {base = 0x7ffff5e47398 "", rows = 452, 
      row_size = 18, size_bitfield = 100664703}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {base = 0x7ffff5e49360 "\001", 
      rows = 2229, row_size = 8, size_bitfield = 50331677}, {base = 0x0, 
      rows = 0, row_size = 0, size_bitfield = 0}, {base = 0x7ffff5e4d908 "P ", 
      rows = 5631, row_size = 16, size_bitfield = 100664791}, {base = 0x0, 
      rows = 0, row_size = 0, size_bitfield = 0}, {base = 0x7ffff5e638f8 "", 
      rows = 6145, row_size = 8, size_bitfield = 50331701}, {
      base = 0x7ffff5e6f900 "\005", rows = 210, row_size = 4, 
      size_bitfield = 33554437}, {base = 0x7ffff5e6fc48 "i", rows = 1215, 
      row_size = 8, size_bitfield = 50331677}, {base = 0x7ffff5e72240 "\b", 
      rows = 870, row_size = 6, size_bitfield = 67108944}, {
      base = 0x7ffff5e736a4 "'", rows = 1164, row_size = 8, 
      size_bitfield = 50331671}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x7ffff5e75b04 "\b", rows = 5, row_size = 6, 
      size_bitfield = 50331669}, {base = 0x7ffff5e75b22 "\001", rows = 6, 
      row_size = 8, size_bitfield = 50331677}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {
      base = 0x7ffff5e75b52 "BqRqVq`qpq\205q\340qKrerqr|r\221r\243r\311r\333r.s\232s*uEuNu\\ukuqu\331u\362u

\tv*vFvfvuv\205v\230v\252v\272v\300v\346v\372v", 
      rows = 728, row_size = 2, size_bitfield = 16777217}, {
      base = 0x7ffff5e76102 "\023", rows = 23, row_size = 4, 
      size_bitfield = 33554437}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x7ffff5e7615e "", rows = 39, row_size = 8, 
      size_bitfield = 50331677}, {base = 0x7ffff5e76296 "\023", rows = 193, 
      row_size = 4, size_bitfield = 33554437}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {base = 0x7ffff5e7659a "", rows = 992, 
      row_size = 8, size_bitfield = 50331677}, {base = 0x7ffff5e7849a "\b", 
      rows = 1508, row_size = 6, size_bitfield = 50331669}, {
      base = 0x7ffff5e7a7f2 "(", rows = 302, row_size = 6, 
      size_bitfield = 50331669}, {base = 0x7ffff5e7af06 "\204\235", rows = 3, 
      row_size = 4, size_bitfield = 16777219}, {
      base = 0x7ffff5e7af12 "\342\034\016$\363'@({+\324+\343+\362+M-\003\067\355@", rows = 34, row_size = 2, 

size_bitfield = 16777217}, {
      base = 0x7ffff5e7af56 "", rows = 103, row_size = 10, 
      size_bitfield = 67108981}, {base = 0x7ffff5e7b35c "", rows = 11, 
      row_size = 6, size_bitfield = 33554439}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x7ffff5e7b39e "\004\200", rows = 1, 
      row_size = 26, size_bitfield = 151248215}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x7ffff5e7b3b8 "\004", rows = 7, 
      row_size = 24, size_bitfield = 151123797}, {base = 0x0, rows = 0, 
      row_size = 0, size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}, {base = 0x7ffff5e7b460 "\003", rows = 28, 
      row_size = 4, size_bitfield = 33554437}, {base = 0x7ffff5e7b4d0 "", 
      rows = 4, row_size = 10, size_bitfield = 67109077}, {
      base = 0x7ffff5e7b4f8 "\243", rows = 30, row_size = 4, 
      size_bitfield = 33554437}, {base = 0x0, rows = 0, row_size = 0, 
      size_bitfield = 0}}, references = 0xa184a0, modules = 0xa07c50, 
  module_count = 3, modules_loaded = 0x9e5da0, files = 0x0, aot_module = 0x0, 
  assembly = 0x0, method_cache = 0xa60470, class_cache = {
    hash_func = 0x5fe790 <monoeg_g_direct_hash>, 
    key_extract = 0x525ee0 <class_key_extract>, 
    next_value = 0x525ef0 <class_next_value>, size = 11, num_entries = 17, 
    table = 0xa0f810}, methodref_cache = 0xa6a080, field_cache = 0xa09040, 
  typespec_cache = 0xa08ff0, memberref_signatures = 0xa07bc0, 
  helper_signatures = 0xa11a40, method_signatures = 0xa11b00, 
  name_cache = 0xa11da0, array_cache = 0x0, ptr_cache = 0x0, 
  szarray_cache = 0x0, szarray_cache_lock = {depth = 0, mutex = {__data = {
        __lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 1, 
        __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, 
      __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
      __align = 0}}, delegate_begin_invoke_cache = 0x0, 
  delegate_end_invoke_cache = 0x0, delegate_invoke_cache = 0x0, 
  runtime_invoke_cache = 0x0, delegate_abstract_invoke_cache = 0x0, 
  delegate_bound_static_invoke_cache = 0x0, 
  runtime_invoke_direct_cache = 0xab5fc0, runtime_invoke_vcall_cache = 0x0, 
  managed_wrapper_cache = 0x0, native_wrapper_cache = 0x0, 
  native_wrapper_aot_cache = 0x0, native_func_wrapper_aot_cache = 0x0, 
  remoting_invoke_cache = 0x0, synchronized_cache = 0x0, 
  unbox_wrapper_cache = 0x0, cominterop_invoke_cache = 0x0, 
  cominterop_wrapper_cache = 0x0, thunk_invoke_cache = 0x0, 
  wrapper_param_names = 0x0, ldfld_wrapper_cache = 0x0, 
  ldflda_wrapper_cache = 0x0, stfld_wrapper_cache = 0x0, isinst_cache = 0x0, 
  castclass_cache = 0x0, proxy_isinst_cache = 0x0, rgctx_template_hash = 0x0, 
  property_hash = 0x9ee580, reflection_info = 0x0, user_info = 0x0, 
  dll_map = 0x0, interface_bitset = 0xad5f50, 
  reflection_info_unregister_classes = 0x0, image_sets = 0xab9110, 
  var_cache_fast = 0xa7cc70, mvar_cache_fast = 0x0, var_cache_slow = 0x0, 
  mvar_cache_slow = 0x0, pinvoke_scopes = 0x0, pinvoke_scope_filenames = 0x0, 
  lock = {depth = 0, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, 
        __nusers = 0, __kind = 1, __spins = 0, __list = {__prev = 0x0, 
          __next = 0x0}}, 
      __size = '\000' <repeats 16 times>, "\001", '\000' <repeats 22 times>, 
      __align = 0}}}

(gdb) p *(GHashTable *)0x9d3cf0
$5 = {hash_func = 0x54e640 <mono_aligned_addr_hash>, 
  key_equal_func = 0x5fe780 <monoeg_g_direct_equal>, table = 0x99a7c0, 
  table_size = 11, in_use = 1, threshold = 0, last_rehash = 11, 
  value_destroy_func = 0, key_destroy_func = 0}

(gdb) p *((GHashTable *)0x9d3cf0)->table@11
$6 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa05e70, 0x0, 0x0}

(gdb) p *((GHashTable *)0x9d3cf0)->table[8]
$7 = {key = 0x999be0, value = 0xa596e0, next = 0x0}
Comment 1 Rex 2013-02-03 04:39:12 UTC
By the way, the problem happens on mono 3.0.3.
Comment 2 Rodrigo Kumpera 2017-07-14 23:49:04 UTC
Coul you provide a complete test case that shows your issue so we can investigate?
Comment 3 Rex 2017-07-23 07:13:37 UTC
Since it's been a long time and I don't have the same setup now, I can only try it on Mono 5.0.1.1 on CentOS 7.2 with the original 2.0.12 Npgsql.dll and a recompiled sample code.
The native crash disappeared, instead there is an exception(see below), which I think is not relevant to Mono. I updated Npgsql to a recent version and the exception disappeared.
I suspect that the original problem is related to nested exception handling and has been fixed in later versions.
I think further investigation may not be necessary.


Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Npgsql.NpgsqlConnectorPool' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Threading.Timer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Scheduler' threw an exception. ---> System.SystemException: Thread creation failed.
  at System.Threading.Thread.StartInternal (System.Security.Principal.IPrincipal principal, System.Threading.StackCrawlMark& stackMark) [0x00032] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Thread.Start (System.Threading.StackCrawlMark& stackMark) [0x00028] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Thread.Start () [0x00002] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Timer+Scheduler..ctor () [0x0003f] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Timer+Scheduler..cctor () [0x00000] in <3753d1715b8842d8bb13a30db0388b60>:0
   --- End of inner exception stack trace ---
  at System.Threading.Timer..cctor () [0x00000] in <3753d1715b8842d8bb13a30db0388b60>:0
   --- End of inner exception stack trace ---
  at System.Timers.Timer.set_Enabled (System.Boolean value) [0x0009f] in <1d7393d853954016b607e8e348b00ad1>:0
  at System.Timers.Timer.Start () [0x00000] in <1d7393d853954016b607e8e348b00ad1>:0
  at (wrapper remoting-invoke-with-check) System.Timers.Timer:Start ()
  at Npgsql.NpgsqlConnectorPool..ctor () [0x00053] in <1aaba1c27ca144c4856157a5f30864a2>:0
  at Npgsql.NpgsqlConnectorPool..cctor () [0x00000] in <1aaba1c27ca144c4856157a5f30864a2>:0
   --- End of inner exception stack trace ---
  at System.ComponentModel.Component.Finalize () [0x00000] in <1d7393d853954016b607e8e348b00ad1>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Npgsql.NpgsqlConnectorPool' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Threading.Timer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Scheduler' threw an exception. ---> System.SystemException: Thread creation failed.
  at System.Threading.Thread.StartInternal (System.Security.Principal.IPrincipal principal, System.Threading.StackCrawlMark& stackMark) [0x00032] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Thread.Start (System.Threading.StackCrawlMark& stackMark) [0x00028] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Thread.Start () [0x00002] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Timer+Scheduler..ctor () [0x0003f] in <3753d1715b8842d8bb13a30db0388b60>:0
  at System.Threading.Timer+Scheduler..cctor () [0x00000] in <3753d1715b8842d8bb13a30db0388b60>:0
   --- End of inner exception stack trace ---
  at System.Threading.Timer..cctor () [0x00000] in <3753d1715b8842d8bb13a30db0388b60>:0
   --- End of inner exception stack trace ---
  at System.Timers.Timer.set_Enabled (System.Boolean value) [0x0009f] in <1d7393d853954016b607e8e348b00ad1>:0
  at System.Timers.Timer.Start () [0x00000] in <1d7393d853954016b607e8e348b00ad1>:0
  at (wrapper remoting-invoke-with-check) System.Timers.Timer:Start ()
  at Npgsql.NpgsqlConnectorPool..ctor () [0x00053] in <1aaba1c27ca144c4856157a5f30864a2>:0
  at Npgsql.NpgsqlConnectorPool..cctor () [0x00000] in <1aaba1c27ca144c4856157a5f30864a2>:0
   --- End of inner exception stack trace ---
  at System.ComponentModel.Component.Finalize () [0x00000] in <1d7393d853954016b607e8e348b00ad1>:0
Comment 4 Ludovic Henry 2017-08-17 17:26:38 UTC
Thank you for the update. If you can still reproduce, please provide a reproduction case and reopen the bug.