[Mono-bugs] [Bug 431539] Segmentation Fault in mcs/gmcs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 10 08:32:37 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=431539

User Yury at serdyuk.botik.ru added comment
https://bugzilla.novell.com/show_bug.cgi?id=431539#c8





--- Comment #8 from Yury Serdyuk <Yury at serdyuk.botik.ru>  2008-11-10 06:32:36 MST ---
I have removed g_assert and got the following at now:

[user002 at cell8i-3 ~]$
MONO_PATH="/home/user002/mono-2.0.1/mcs/class/lib/monolite:$MONO_PATH" gdb
/home/user002/mono-2.0.1/mono/mini/mono
GNU gdb Fedora (6.8-1.fc9)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc-redhat-linux-gnu"...
(gdb) handle SIGPWR nostop
Signal        Stop      Print   Pass to program Description
SIGPWR        No        Yes     Yes             Power fail/restart
(gdb) handle SIGXCPU nostop
Signal        Stop      Print   Pass to program Description
SIGXCPU       No        Yes     Yes             CPU time limit exceeded
(gdb) run /home/user002/mono-2.0.1/mcs/class/lib/monolite/mcs.exe -v
SegFault.cs
Starting program: /home/user002/mono-2.0.1/mono/mini/mono
/home/user002/mono-2.0.1/mcs/class/lib/monolite/mcs.exe -v SegFault.cs
[Thread debugging using libthread_db enabled]
[New Thread 0xfff3390 (LWP 23138)]
[New Thread 0xf768f450 (LWP 23141)]
[New Thread 0xf762f450 (LWP 23142)]

Program received signal SIGPWR, Power fail/restart.

Program received signal SIGXCPU, CPU time limit exceeded.

Program received signal SIGPWR, Power fail/restart.

Program received signal SIGXCPU, CPU time limit exceeded.
** Message: Unknown errno: Success

SegFault.cs(7,0): error CS8025: Parsing error** Message: Unknown errno: Level 2
not synchronized

SegFault.cs(7,0): error CS8025: Parsing error** Message: Unknown errno: Level 2
not synchronized

System.IO.IOException: Win32 IO returned ERROR_GEN_FAILURE. Path: SegFault.cs
  at System.IO.FileStream.ReadData (IntPtr handle, System.Byte[] buf, Int32
offset, Int32 count) [0x00000]
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, Int32 offset, Int32
count) [0x00000]
  at System.IO.FileStream.Read (System.Byte[] array, Int32 offset, Int32 count)
[0x00000]
  at System.IO.StreamReader.ReadBuffer () [0x00000]
  at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32
count) [0x00000]
  at Mono.CSharp.SeekableStreamReader.ReadBuffer () [0x00000]
  at Mono.CSharp.SeekableStreamReader.Read () [0x00000]
  at Mono.CSharp.Tokenizer.peek_char () [0x00000]
  at Mono.CSharp.Tokenizer.is_punct (Char c, System.Boolean& doread) [0x00000]
  at Mono.CSharp.Tokenizer.xtoken () [0x00000]
  at Mono.CSharp.Tokenizer.token () [0x00000]
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000]
  at Mono.CSharp.CSharpParser.parse () [0x00000] ** Message: Unknown errno:
Unknown error 981

System.IO.IOException: Win32 IO returned ERROR_GEN_FAILURE. Path: SegFault.cs
  at System.IO.FileStream.ReadData (IntPtr handle, System.Byte[] buf, Int32
offset, Int32 count) [0x00000]
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, Int32 offset, Int32
count) [0x00000]
  at System.IO.FileStream.Read (System.Byte[] array, Int32 offset, Int32 count)
[0x00000]
  at System.IO.StreamReader.ReadBuffer () [0x00000]
  at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32
count) [0x00000]
  at Mono.CSharp.SeekableStreamReader.ReadBuffer () [0x00000]
  at Mono.CSharp.SeekableStreamReader.Read () [0x00000]
  at Mono.CSharp.Tokenizer.peek_char () [0x00000]
  at Mono.CSharp.Tokenizer.is_punct (Char c, System.Boolean& doread) [0x00000]
  at Mono.CSharp.Tokenizer.xtoken () [0x00000]
  at Mono.CSharp.Tokenizer.token () [0x00000]
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000]
  at Mono.CSharp.CSharpParser.parse () [0x00000] ** Message: Unknown errno:
Unknown error 981

System.IO.IOException: Win32 IO returned ERROR_GEN_FAILURE. Path: SegFault.cs
  at System.IO.FileStream.ReadData (IntPtr handle, System.Byte[] buf, Int32
offset, Int32 count) [0x00000]
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, Int32 offset, Int32
count) [0x00000]
  at System.IO.FileStream.Read (System.Byte[] array, Int32 offset, Int32 count)
[0x00000]
  at System.IO.StreamReader.ReadBuffer () [0x00000]
  at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32
count) [0x00000]
  at Mono.CSharp.SeekableStreamReader.ReadBuffer () [0x00000]
  at Mono.CSharp.SeekableStreamReader.Read () [0x00000]
  at Mono.CSharp.Tokenizer.peek_char () [0x00000]
  at Mono.CSharp.Tokenizer.is_punct (Char c, System.Boolean& doread) [0x00000]
  at Mono.CSharp.Tokenizer.xtoken () [0x00000]
  at Mono.CSharp.Tokenizer.token () [0x00000]
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000]
  at Mono.CSharp.CSharpParser.parse () [0x00000] ** Message: Unknown errno:
Unknown error 981

System.IO.IOException: Win32 IO returned ERROR_GEN_FAILURE. Path: SegFault.cs
  at System.IO.FileStream.ReadData (IntPtr handle, System.Byte[] buf, Int32
offset, Int32 count) [0x00000]
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, Int32 offset, Int32
count) [0x00000]
  at System.IO.FileStream.Read (System.Byte[] array, Int32 offset, Int32 count)
[0x00000]
  at System.IO.StreamReader.ReadBuffer () [0x00000]
  at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32
count) [0x00000]
  at Mono.CSharp.SeekableStreamReader.ReadBuffer () [0x00000]
  at Mono.CSharp.SeekableStreamReader.Read () [0x00000]
  at Mono.CSharp.Tokenizer.peek_char () [0x00000]
  at Mono.CSharp.Tokenizer.is_punct (Char c, System.Boolean& doread) [0x00000]
  at Mono.CSharp.Tokenizer.xtoken () [0x00000]
  at Mono.CSharp.Tokenizer.token () [0x00000]
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000]
  at Mono.CSharp.CSharpParser.parse () [0x00000] ** Message: Unknown errno:
Unknown error 981


Program received signal SIGPWR, Power fail/restart.

Program received signal SIGXCPU, CPU time limit exceeded.
[Thread 0xf762f450 (LWP 23142) exited]
**
** ERROR:(shared.c:489):shm_semaphores_remove: assertion failed: (proc_count >
0)

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xfff3390 (LWP 23138)]
0x0fdb6d4c in raise (sig=<value optimized out>) at
./nptl/sysdeps/unix/sysv/linux/raise.c:64
64        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install gcc.ppc
(gdb) info threads
  2 Thread 0xf768f450 (LWP 23141)  0x0ff511e8 in nanosleep () from
/lib/libpthread.so.0
* 1 Thread 0xfff3390 (LWP 23138)  0x0fdb6d4c in raise (sig=<value optimized
out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
(gdb) thread apply all bt

Thread 2 (Thread 0xf768f450 (LWP 23141)):
#0  0x0ff511e8 in nanosleep () from /lib/libpthread.so.0
#1  0x10128268 in collection_thread (unused=0x0) at collection.c:34
#2  0x0ff46e3c in start_thread (arg=<value optimized out>) at
pthread_create.c:299
#3  0x0fe7b710 in clone () from /lib/libc.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 1 (Thread 0xfff3390 (LWP 23138)):
#0  0x0fdb6d4c in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0fdb8ac4 in abort () at abort.c:88
#2  0x0fb76d60 in IA__g_assertion_message (domain=<value optimized out>,
    file=<value optimized out>, line=<value optimized out>, func=<value
optimized out>,
    message=<value optimized out>) at gtestutils.c:1218
#3  0x0fb77300 in IA__g_assertion_message_expr (domain=<value optimized out>,
    file=<value optimized out>, line=<value optimized out>, func=<value
optimized out>,
    expr=<value optimized out>) at gtestutils.c:1229
#4  0x1012d98c in shm_semaphores_remove () at shared.c:489
#5  0x1012df34 in _wapi_shm_semaphores_remove () at shared.c:712
#6  0x1012e43c in handle_cleanup () at handles.c:189
#7  0x0fdba8ec in exit (status=<value optimized out>) at exit.c:75
#8  0x0fd9d8f4 in generic_start_main (main=<value optimized out>, argc=<value
optimized out>,
    ubp_av=<value optimized out>, auxvec=<value optimized out>, init=<value
optimized out>,
    fini=<value optimized out>, rtld_fini=<value optimized out>,
    stack_end=<value optimized out>) at ../csu/libc-start.c:252
#9  0x0fd9dab0 in __libc_start_main (argc=<value optimized out>, ubp_av=<value
optimized out>,
    ubp_ev=<value optimized out>, auxvec=<value optimized out>,
    rtld_fini=<value optimized out>, stinfo=<value optimized out>,
    stack_on_entry=<value optimized out>) at
./sysdeps/unix/sysv/linux/powerpc/libc-start.c:92
#10 0x00000000 in ?? ()
Current language:  auto; currently asm
Current language:  auto; currently c
(gdb) quit
The program is running.  Exit anyway? (y or n) y
[user002 at cell8i-3 ~]$

After that I printed out the value of proc_count (io-layer/shared.c) like

static void shm_semaphores_remove (void)
{
        int thr_ret;
        int proc_count;

#ifdef DEBUG
        g_message ("%s: Checking process count (%d)", __func__,
                   _wapi_getpid ());
#endif

        thr_ret = _wapi_shm_sem_lock (_WAPI_SHARED_SEM_PROCESS_COUNT_LOCK);
        g_assert (thr_ret == 0);

        proc_count = semctl (_wapi_sem_id, _WAPI_SHARED_SEM_PROCESS_COUNT,
                             GETVAL);
        printf ( "proc_count = %d\n", proc_count );
        g_assert (proc_count > 0);

and got

proc_count = **
** ERROR:(shared.c:489):shm_semaphores_remove: assertion failed: (proc_count >
0)

Also I attached a reduced strace file ( see the above comment ).

Yury


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list