Bug 12155 - [PPC] Runtime crashes when inspecting variable in XamarinStudio
Summary: [PPC] Runtime crashes when inspecting variable in XamarinStudio
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2013-05-08 03:31 UTC by tobias.tretter
Modified: 2018-04-05 19:58 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 NORESPONSE

Description tobias.tretter 2013-05-08 03:31:47 UTC
I stripped the problem down to a simple hello-world. The program (and many other, complex ones) run well when they are not being debugged. The problem arises when using the soft debugger from XamarinStudio. I can step through the program, set breakpoints, they are also hit, but as soon as i try to inspect a variable (hovering over it), the debugged program will crash. This can be reproduced 100%. The problem only occurs on WindRiver Linux on PPC. Doing the same on plain X86 Linux works well in all cases.

Configuration:
==============
root@P1015MC1-0:/tmp# bin/mono --version
Mono JIT compiler version 3.0.7 (tarball Tue May  7 16:02:00 CEST 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  ppc
        Disabled:      none
        Misc:          softdebug
        GC:            Included Boehm (with typed GC and Parallel Mark)

Mono was build from scratch using the following configuration:
./configure --disable-rpath --disable-mcs-build --enable-parallel-mark=yes --prefix=/tmp --host=powerpc-wrs-linux-gnu --target=powerpc-wrs-linux-gnu --build=i586-wrs-linux-gnu --program-prefix="" mono_cv_uscore=no mono_cv_clang=no with_tls=pthread with_sigaltstack=no --with-pic=yes --with-x=no CC=powerpc-wrs-linux-gnu-ppc_e500v2-glibc_std-gcc LD=powerpc-wrs-linux-gnu-ppc_e500v2-glibc_std-gcc CFLAGS="-D__ppc__ "

Linux version:
root@P1015MC1-0:/tmp# uname -a
Linux P1015MC1-0 2.6.34.8-wr #12 PREEMPT Mon Jul 30 15:56:05 CEST 2012 ppc ppc ppc GNU/Linux

GCC cross compiler version:
> powerpc-wrs-linux-gnu-ppc_e500v2-glibc_std-gcc --version
powerpc-wrs-linux-gnu-gcc (Wind River Linux Sourcery G++ 4.4a-323) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Sample Test Program:
====================
using System;

namespace Hello
{
    class MainClass
    {
        public static void Main (string[] args)
        {
             Console.WriteLine ("Hello World! {0},{1}", Console.BufferWidth, Console.BufferHeight);
        }
    }
}


Crash Dump:
===========
root@P1015MC1-0:/tmp# bin/mono --debug --debugger-agent=transport=dt_socket,address=172.16.212.116:45654,server=y Hello.exe
method construct_internal_locale_from_specific_name should come before method construct_internal_locale_from_name
Hello World! 0,0
Stacktrace:


Native stacktrace:

        bin/mono() [0x10144678]
        bin/mono() [0x10017a98]
        [0x100350]
        bin/mono() [0x10164870]
        bin/mono() [0x10172184]
        bin/mono() [0x101723f8]
        bin/mono() [0x10167e44]
        bin/mono() [0x1016a5dc]
        bin/mono() [0x1016d1ec]
        bin/mono() [0x1016d334]
        bin/mono() [0x1016d3c4]
        bin/mono() [0x1016d388]
        [0x4847b538]
        bin/mono() [0x100177c8]
        bin/mono() [0x102dc9b4]
        bin/mono() [0x102e00a4]
        bin/mono() [0x102df004]
        bin/mono() [0x10103958]
        bin/mono() [0x10103ca0]
        bin/mono() [0x10106b74]
        bin/mono() [0x10004180]
        bin/mono() [0x100041e0]
        /lib/libc.so.6(+0x1f588) [0xfd15588]
        /lib/libc.so.6(+0x1f748) [0xfd15748]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0x487ff490 (LWP 25084)]
[New Thread 0x485e6490 (LWP 25083)]
0x0fe908a8 in waitpid () from /lib/libpthread.so.0
  3 Thread 0x485e6490 (LWP 25083)  0x0fe8e320 in __new_sem_wait (sem=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:60
  2 Thread 0x487ff490 (LWP 25084)  0x0fe8fb5c in recv () from /lib/libpthread.so.0
* 1 Thread 0x48020aa0 (LWP 25081)  0x0fe908a8 in waitpid () from /lib/libpthread.so.0

Thread 3 (Thread 0x485e6490 (LWP 25083)):
#0  0x0fe8e320 in __new_sem_wait (sem=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:60
#1  0x1036d3dc in mono_sem_wait (sem=0x1049e638, alertable=1) at mono-semaphore.c:113
#2  0x102cea94 in finalizer_thread (unused=0x0) at gc.c:1077
#3  0x10284a64 in start_wrapper_internal (data=0x10521d78) at threads.c:593
#4  0x10284b38 in start_wrapper (data=0x10521d78) at threads.c:639
#5  0x10352540 in thread_start_routine (args=0x104d52b0) at wthreads.c:288
#6  0x10373190 in inner_start_thread (arg=0x10521c88) at mono-threads-posix.c:49
#7  0x1038be5c in GC_start_routine (arg=0x484dcfe0) at pthread_support.c:1510
#8  0x0fe862cc in start_thread (arg=<value optimized out>) at pthread_create.c:302
#9  0x0fde1d14 in clone () from /lib/libc.so.6

Thread 2 (Thread 0x487ff490 (LWP 25084)):
#0  0x0fe8fb5c in recv () from /lib/libpthread.so.0
#1  0x10162bb8 in socket_transport_recv (buf=0x487fe968, len=11) at debugger-agent.c:1068
#2  0x10163e44 in transport_recv (buf=0x487fe968, len=11) at debugger-agent.c:1458
#3  0x1017af1c in debugger_thread (arg=0x0) at debugger-agent.c:8714
#4  0x10352540 in thread_start_routine (args=0x104d5340) at wthreads.c:288
#5  0x10373190 in inner_start_thread (arg=0x10522998) at mono-threads-posix.c:49
#6  0x1038be5c in GC_start_routine (arg=0x484dcfe0) at pthread_support.c:1510
#7  0x0fe862cc in start_thread (arg=<value optimized out>) at pthread_create.c:302
#8  0x0fde1d14 in clone () from /lib/libc.so.6

Thread 1 (Thread 0x48020aa0 (LWP 25081)):
#0  0x0fe908a8 in waitpid () from /lib/libpthread.so.0
#1  0x101447a8 in mono_handle_native_sigsegv (signal=11, ctx=0xbfb94a80) at mini-exceptions.c:2331
#2  0x10017a98 in mono_sigsegv_signal_handler (_dummy=11, info=0xbfb94a00, context=0xbfb94a80) at mini.c:6387
#3  <signal handler called>
#4  0x102e2d44 in mono_object_unbox (obj=0xbfb94e38) at object.c:5246
#5  0x10172184 in do_invoke_method (tls=0x1051e978, buf=0xbfb95300, invoke=0x106d9b58, p=0x106dba39 "", endp=0xbfb953f8) at debugger-agent.c:6145
#6  0x101723f8 in invoke_method () at debugger-agent.c:6219
#7  0x10167e44 in suspend_current () at debugger-agent.c:2850
#8  0x1016a5dc in process_event (event=EVENT_KIND_STEP, arg=0x104e4f60, il_offset=0, ctx=0x1051eeb8, events=0x0, suspend_policy=2) at debugger-agent.c:3630
#9  0x1016d1ec in process_breakpoint_inner (tls=0x1051e978) at debugger-agent.c:4491
#10 0x1016d334 in process_signal_event (func=0x1016ca54 <process_breakpoint_inner>) at debugger-agent.c:4514
#11 0x1016d3c4 in process_breakpoint () at debugger-agent.c:4526
#12 0x1016d388 in process_signal_event (func=0xfe6bff4) at debugger-agent.c:4519
#13 0xbfb95998 in ?? ()
#14 0x00000000 in ?? ()

=================================================================
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.
=================================================================

Aborted (core dumped)
root@P1015MC1-0:/tmp#
Comment 1 Zoltan Varga 2013-05-08 15:06:42 UTC
ppc is not a very well supported architecture for mono.
Comment 2 Ludovic Henry 2018-01-18 22:47:12 UTC
Can you still reproduce with latest version of Mono? If so, could you please provide a reproduction case, like a VS solution.

Also, we do not actively maintain PowerPC, but if you provide us with a reproduction case, we would love to take a look.

Thank you.
Comment 3 Ludovic Henry 2018-04-05 19:58:13 UTC
Please reopen if you can still reproduce. Thank you.