calling NamedPipeServerStream.Disconnect causes SIGSEGV

Bug #700504 reported by Jason Crain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mono (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mono

When compiled and run, the following program crashes with SIGSEGV

public class Foo {
    static void Main() {
        new System.IO.Pipes.NamedPipeServerStream("testpipe").Disconnect();
    }
}

$ gmcs pipetest.cs
$ mono pipetest.exe
Stacktrace:

  at (wrapper managed-to-native) Mono.Unix.Native.Stdlib.fclose (intptr) <0x0005b>
  at (wrapper managed-to-native) Mono.Unix.Native.Stdlib.fclose (intptr) <0x0005b>
  at System.IO.Pipes.UnixNamedPipeServer.Disconnect () <0x0002b>
  at System.IO.Pipes.NamedPipeServerStream.Disconnect () <0x00020>
  at (wrapper remoting-invoke-with-check) System.IO.Pipes.NamedPipeServerStream.Disconnect () <0x00053>
  at Foo.Main () <0x0003b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x00049>

Native stacktrace:

        mono() [0x48563b]
        mono() [0x4d275f]
        /lib/libpthread.so.0(+0xfb40) [0x7f44c0ed4b40]
        /lib/libc.so.6(fclose+0x4) [0x7f44c09268a4]
        [0x41d4e91b]

Debug info from gdb:

Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.

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

$ mono --version
Mono JIT compiler version 2.6.7 (Debian 2.6.7-3ubuntu1)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS: __thread
        GC: Included Boehm (with typed GC and Parallel Mark)
        SIGSEGV: altstack
        Notifications: epoll
        Architecture: amd64
        Disabled: none

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.