{"action":"created","issue":{"url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/4","repository_url":"https://api.github.com/repos/jfrijters/Managed.Reflection","labels_url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/4/comments","events_url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/4/events","html_url":"https://github.com/jfrijters/Managed.Reflection/issues/4","id":169753361,"number":4,"title":"Mono crashes with assert when using ppdb","user":{"login":"borgdylan","id":7761010,"avatar_url":"https://avatars.githubusercontent.com/u/7761010?v=3","gravatar_id":"","url":"https://api.github.com/users/borgdylan","html_url":"https://github.com/borgdylan","followers_url":"https://api.github.com/users/borgdylan/followers","following_url":"https://api.github.com/users/borgdylan/following{/other_user}","gists_url":"https://api.github.com/users/borgdylan/gists{/gist_id}","starred_url":"https://api.github.com/users/borgdylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgdylan/subscriptions","organizations_url":"https://api.github.com/users/borgdylan/orgs","repos_url":"https://api.github.com/users/borgdylan/repos","events_url":"https://api.github.com/users/borgdylan/events{/privacy}","received_events_url":"https://api.github.com/users/borgdylan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-06T16:07:04Z","updated_at":"2016-08-07T09:32:43Z","closed_at":"2016-08-07T07:50:44Z","body":"I have branched my compiler and started using Managed.Reflection. I noticed that the ppdb produced by the libraries make the mono debugger hit a weird assert.\r\n\r\n```\r\n* Assertion at metadata.c:1028, condition `idx >= 0' not met\r\n\r\nStacktrace:\r\n\r\n  at <unknown> <0xffffffff>\r\n  at hellotasks.Program.ReadAsync () [0x0001f] in /mnt/ssd/vnext/hellotasks/hellotasks.dyl:160\r\n  at hellotasks.Program.Main () [0x00010] in /mnt/ssd/vnext/hellotasks/hellotasks.dyl:203\r\n  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <IL 0x0004d, 0x002cd>\r\n\r\nNative stacktrace:\r\n\r\n\tmono() [0x4b32cf]\r\n\t/lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0) [0x7f9c095bf3d0]\r\n\t/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f9c09004418]\r\n\t/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f9c0900601a]\r\n\tmono() [0x67169b]\r\n\tmono() [0x671435]\r\n\tmono() [0x6715e9]\r\n\tmono(mono_metadata_decode_row+0xfb) [0x57a6fb]\r\n\tmono() [0x603e29]\r\n\tmono() [0x6047b0]\r\n\tmono() [0x4d1f3a]\r\n\tmono() [0x4ddfd0]\r\n\tmono() [0x4e0e51]\r\n\tmono() [0x59b5d7]\r\n\tmono() [0x515e71]\r\n\tmono() [0x425e21]\r\n\tmono() [0x4b4c38]\r\n\tmono() [0x4b5382]\r\n\t[0x40a9128c]\r\n\r\nDebug info from gdb:\r\n\r\n[New LWP 2615]\r\n[New LWP 2617]\r\n[New LWP 2618]\r\nwarning: File \"/usr/local/bin/mono-sgen-gdb.py\" auto-loading has been declined by your `auto-load safe-path' set to \"$debugdir:$datadir/auto-load\".\r\nTo enable execution of this file, add\r\n\tadd-auto-load-safe-path /usr/local/bin/mono-sgen-gdb.py\r\nline to your configuration file \"/home/dylan/.gdbinit\".\r\nTo completely disable this security protection, add\r\n\tset auto-load safe-path /\r\nline to your configuration file \"/home/dylan/.gdbinit\".\r\nFor more information about this security protection, see the\r\n\"Auto-loading safe path\" section in the GDB manual.  E.g., run from the shell:\r\n\tinfo \"(gdb)Auto-loading safe path\"\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\r\n0x00007f9c095befbb in __waitpid (pid=pid@entry=2789, stat_loc=stat_loc@entry=0x7ffcea07597c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29\r\n29\t../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.\r\n  Id   Target Id         Frame \r\n* 1    Thread 0x7f9c0a0ce780 (LWP 2614) \"Main\" 0x00007f9c095befbb in __waitpid (pid=pid@entry=2789, stat_loc=stat_loc@entry=0x7ffcea07597c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29\r\n  2    Thread 0x7f9c083ff700 (LWP 2615) \"SGen worker\" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\r\n  3    Thread 0x7f9c06b7b700 (LWP 2617) \"Finalizer\" 0x00007f9c095bd867 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x9a13e0 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205\r\n  4    Thread 0x7f9c0697a700 (LWP 2618) \"Debugger agent\" 0x00007f9c095be8bf in __libc_recv (fd=fd@entry=4, buf=buf@entry=0x7f9c06979d20, n=n@entry=11, flags=flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:28\r\n\r\nThread 4 (Thread 0x7f9c0697a700 (LWP 2618)):\r\n#0  0x00007f9c095be8bf in __libc_recv (fd=fd@entry=4, buf=buf@entry=0x7f9c06979d20, n=n@entry=11, flags=flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:28\r\n#1  0x00000000004e1825 in recv (__flags=0, __n=11, __buf=0x7f9c06979d20, __fd=4) at /usr/include/x86_64-linux-gnu/bits/socket2.h:44\r\n#2  socket_transport_recv (buf=0x7f9c06979d20, len=11) at debugger-agent.c:1130\r\n#3  0x00000000004de0fd in transport_recv (len=11, buf=0x7f9c06979d20) at debugger-agent.c:1536\r\n#4  debugger_thread (arg=<optimised out>) at debugger-agent.c:9849\r\n#5  0x0000000000665f1f in inner_start_thread (arg=<optimised out>) at mono-threads-posix.c:156\r\n#6  0x00007f9c095b56fa in start_thread (arg=0x7f9c0697a700) at pthread_create.c:333\r\n#7  0x00007f9c090d5b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109\r\n\r\nThread 3 (Thread 0x7f9c06b7b700 (LWP 2617)):\r\n#0  0x00007f9c095bd867 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x9a13e0 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205\r\n#1  do_futex_wait (sem=sem@entry=0x9a13e0 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:111\r\n#2  0x00007f9c095bd914 in __new_sem_wait_slow (sem=0x9a13e0 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:181\r\n#3  0x00007f9c095bd9ba in __new_sem_wait (sem=sem@entry=0x9a13e0 <finalizer_sem>) at sem_wait.c:29\r\n#4  0x00000000005cdb4f in mono_os_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0x9a13e0 <finalizer_sem>) at ../../mono/utils/mono-os-semaphore.h:209\r\n#5  mono_coop_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0x9a13e0 <finalizer_sem>) at ../../mono/utils/mono-coop-semaphore.h:40\r\n#6  finalizer_thread (unused=unused@entry=0x0) at gc.c:894\r\n#7  0x00000000005a9adc in start_wrapper_internal (data=<optimised out>) at threads.c:753\r\n#8  start_wrapper (data=<optimised out>) at threads.c:815\r\n#9  0x0000000000665f1f in inner_start_thread (arg=<optimised out>) at mono-threads-posix.c:156\r\n#10 0x00007f9c095b56fa in start_thread (arg=0x7f9c06b7b700) at pthread_create.c:333\r\n#11 0x00007f9c090d5b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109\r\n\r\nThread 2 (Thread 0x7f9c083ff700 (LWP 2615)):\r\n#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\r\n#1  0x00000000006399df in mono_os_cond_wait (mutex=0x9b0800 <lock>, cond=0x9b07c0 <work_cond>) at ../../mono/utils/mono-os-mutex.h:150\r\n#2  thread_func (thread_data=0x0) at sgen-thread-pool.c:110\r\n#3  0x00007f9c095b56fa in start_thread (arg=0x7f9c083ff700) at pthread_create.c:333\r\n#4  0x00007f9c090d5b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109\r\n\r\nThread 1 (Thread 0x7f9c0a0ce780 (LWP 2614)):\r\n#0  0x00007f9c095befbb in __waitpid (pid=pid@entry=2789, stat_loc=stat_loc@entry=0x7ffcea07597c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29\r\n#1  0x00000000004b33a6 in mono_handle_native_sigsegv (signal=<optimised out>, ctx=<optimised out>, info=<optimised out>) at mini-exceptions.c:2424\r\n#2  <signal handler called>\r\n#3  0x00007f9c09004418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54\r\n#4  0x00007f9c0900601a in __GI_abort () at abort.c:89\r\n#5  0x000000000067169b in monoeg_log_default_handler (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, message=0x1edbd30 \"* Assertion at metadata.c:1028, condition `idx >= 0' not met\\n\", unused_data=0x0) at goutput.c:231\r\n#6  0x0000000000671435 in monoeg_g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x67d988 \"* Assertion at %s:%d, condition `%s' not met\\n\", args=0x7ffcea076910) at goutput.c:111\r\n#7  0x00000000006715e9 in monoeg_assertion_message (format=0x67d988 \"* Assertion at %s:%d, condition `%s' not met\\n\") at goutput.c:131\r\n#8  0x000000000057a6fb in mono_metadata_decode_row (t=t@entry=0x1cfd440, idx=idx@entry=-1, res=res@entry=0x7ffcea076a20, res_size=res_size@entry=4) at metadata.c:1028\r\n#9  0x0000000000603e29 in get_docinfo (image=image@entry=0x1cfd070, docidx=<optimised out>, ppdb=0x1c8f840) at debug-mono-ppdb.c:219\r\n#10 0x00000000006047b0 in mono_ppdb_get_seq_points (minfo=<optimised out>, source_file=source_file@entry=0x7ffcea076ba8, source_file_list=source_file_list@entry=0x7ffcea076bb0, source_files=source_files@entry=0x0, seq_points=seq_points@entry=0x0, n_seq_points=n_seq_points@entry=0x0) at debug-mono-ppdb.c:433\r\n#11 0x00000000005915b0 in mono_debug_get_seq_points (minfo=<optimised out>, source_file=source_file@entry=0x7ffcea076ba8, source_file_list=source_file_list@entry=0x7ffcea076bb0, source_files=source_files@entry=0x0, seq_points=seq_points@entry=0x0, n_seq_points=n_seq_points@entry=0x0) at mono-debug.c:994\r\n#12 0x00000000004d1f3a in create_event_list (event=event@entry=EVENT_KIND_TYPE_LOAD, reqs=0x1c6d850, reqs@entry=0x0, ji=ji@entry=0x0, ei=ei@entry=0x7ffcea076c10, suspend_policy=suspend_policy@entry=0x7ffcea076c0c) at debugger-agent.c:3452\r\n#13 0x00000000004ddfd0 in process_profiler_event (event=event@entry=EVENT_KIND_TYPE_LOAD, arg=arg@entry=0x7f9bf800d168) at debugger-agent.c:3783\r\n#14 0x00000000004e0e51 in emit_type_load (user_data=0x0, value=0x7f9bf800d168, key=0x7f9bf800d168) at debugger-agent.c:3273\r\n#15 send_type_load (klass=0x7f9bf800d168) at debugger-agent.c:4007\r\n#16 jit_end (prof=<optimised out>, method=0x7f9bf8012a98, jinfo=0x1edeab8, result=0) at debugger-agent.c:4055\r\n#17 0x000000000059b5d7 in mono_profiler_method_end_jit (method=method@entry=0x7f9bf8012a98, jinfo=jinfo@entry=0x1edeab8, result=result@entry=0) at profiler.c:484\r\n#18 0x0000000000515e71 in mono_jit_compile_method_inner (method=method@entry=0x7f9bf8012a98, target_domain=target_domain@entry=0x1c87330, opt=opt@entry=370239999, error=error@entry=0x7ffcea076fb0) at mini.c:4402\r\n#19 0x0000000000425e21 in mono_jit_compile_method_with_opt (method=method@entry=0x7f9bf8012a98, opt=370239999, error=error@entry=0x7ffcea076fb0) at mini-runtime.c:1914\r\n#20 0x000000000042672a in mono_jit_compile_method (method=method@entry=0x7f9bf8012a98, error=error@entry=0x7ffcea076fb0) at mini-runtime.c:1958\r\n#21 0x00000000004b4c38 in common_call_trampoline (regs=regs@entry=0x7ffcea077088, code=code@entry=0x404ec560 \"A\\273\\001\", m=m@entry=0x7f9bf8012a98, vt=vt@entry=0x0, vtable_slot=<optimised out>, vtable_slot@entry=0x0, error=error@entry=0x7ffcea076fb0) at mini-trampolines.c:701\r\n#22 0x00000000004b5382 in mono_magic_trampoline (regs=0x7ffcea077088, code=0x404ec560 \"A\\273\\001\", arg=0x7f9bf8012a98, tramp=<optimised out>) at mini-trampolines.c:831\r\n#23 0x0000000040a9128c in ?? ()\r\n#24 0x0000000000000000 in ?? ()\r\n\r\n=================================================================\r\nGot a SIGABRT while executing native code. This usually indicates\r\na fatal error in the mono runtime or one of the native libraries \r\nused by your application.\r\n=================================================================\r\n```\r\n\r\nIs the ppdb support complete or is it still a work in progress?"},"comment":{"url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/comments/238072810","html_url":"https://github.com/jfrijters/Managed.Reflection/issues/4#issuecomment-238072810","issue_url":"https://api.github.com/repos/jfrijters/Managed.Reflection/issues/4","id":238072810,"user":{"login":"borgdylan","id":7761010,"avatar_url":"https://avatars.githubusercontent.com/u/7761010?v=3","gravatar_id":"","url":"https://api.github.com/users/borgdylan","html_url":"https://github.com/borgdylan","followers_url":"https://api.github.com/users/borgdylan/followers","following_url":"https://api.github.com/users/borgdylan/following{/other_user}","gists_url":"https://api.github.com/users/borgdylan/gists{/gist_id}","starred_url":"https://api.github.com/users/borgdylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgdylan/subscriptions","organizations_url":"https://api.github.com/users/borgdylan/orgs","repos_url":"https://api.github.com/users/borgdylan/repos","events_url":"https://api.github.com/users/borgdylan/events{/privacy}","received_events_url":"https://api.github.com/users/borgdylan/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T09:32:43Z","updated_at":"2016-08-07T09:32:43Z","body":"The only change I did is to add sequence points for auto generated constructors. I left the rest as before."}}
{"actor":{"display_login":"borgdylan"}}