Re: [IronPython] os.popen() + Mono == segfault

2006-12-13 Thread Paolo Molaro
On 12/09/06 Anthony Baxter wrote:
> On 12/8/06, Paolo Molaro <[EMAIL PROTECTED]> wrote:
> > The bug is fixed in svn (at least on non-win32): Process didn't handle
> > the case when only the filename is set in ProcessStartInfo.
> 
> Fabulous! Thanks for the quick response. This will be in the 1.2.3 release?

Yes. Note the workaround I mentioned: use an argument to the program
to get it to work on earlier versions.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] os.popen() + Mono == segfault

2006-12-08 Thread Anthony Baxter
On 12/8/06, Paolo Molaro <[EMAIL PROTECTED]> wrote:
> The bug is fixed in svn (at least on non-win32): Process didn't handle
> the case when only the filename is set in ProcessStartInfo.

Fabulous! Thanks for the quick response. This will be in the 1.2.3 release?
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] os.popen() + Mono == segfault

2006-12-07 Thread Paolo Molaro
On 12/07/06 Anthony Baxter wrote:
> On both IronPython 1.0.1 and IPCE release 4, os.popen() segfaults
> under Mono 1.17.1 (on Ubuntu edgy).
> 
> To reproduce:
> ipy.exe -c "import os; print os.popen('/bin/ls', 'r').read()"
> 
> Stacktrace follows, for whatever value it is... I can't tell
> immediately whether it's an IronPython or Mono problem, although it
> _appears_ to be in Mono. If other people agree, I'll log a Mono bug
> tomorrow.

The bug is fixed in svn (at least on non-win32): Process didn't handle
the case when only the filename is set in ProcessStartInfo.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] os.popen() + Mono == segfault

2006-12-06 Thread Dino Viehland
I would expect this to be a Mono bug as IronPython is entirely managed code.

There's always the possibility we are generating invalid IL but we're not aware 
of any places where we currently do that (as we validate all the IL we generate 
w/ peverify during our test runs, which include importing the CPython os 
module).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony Baxter
Sent: Wednesday, December 06, 2006 8:51 AM
To: Discussion of IronPython
Subject: [IronPython] os.popen() + Mono == segfault

On both IronPython 1.0.1 and IPCE release 4, os.popen() segfaults
under Mono 1.17.1 (on Ubuntu edgy).

To reproduce:
ipy.exe -c "import os; print os.popen('/bin/ls', 'r').read()"

Stacktrace follows, for whatever value it is... I can't tell
immediately whether it's an IronPython or Mono problem, although it
_appears_ to be in Mono. If other people agree, I'll log a Mono bug
tomorrow.

It looks like most of the os module to do with spawning commands is
missing, apart from os.spawnl(), which _appears_ to work. It should be
possible to re implement the stdlib's popen2 module on top of that.
Whether it will work is another matter entirely, of course :-)




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

Stacktrace

  at (wrapper managed-to-native)
System.Diagnostics.Process.CreateProcess_internal
(System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
<0x4>
  at (wrapper managed-to-native)
System.Diagnostics.Process.CreateProcess_internal
(System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
<0x>
  at System.Diagnostics.Process.Start_noshell
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
<0x00547>
  at System.Diagnostics.Process.Start_common
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
<0x0007c>
  at System.Diagnostics.Process.Start
(System.Diagnostics.ProcessStartInfo) <0x00032>
  at IronPython.Modules.PythonNT.OpenPipedCommand
(IronPython.Runtime.Calls.ICallerContext,string,string,int) <0x000ae>
  at IronPython.Modules.PythonNT.OpenPipedCommand
(IronPython.Runtime.Calls.ICallerContext,string,string) <0x00015>
  at (wrapper dynamic-method) System.Object.OpenPipedCommand##49
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
  at (wrapper delegate-invoke)
System.MulticastDelegate.invoke_object_ICallerContext_object_object
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
  at IronPython.Runtime.Calls.FastCallableWithContextAny.Call
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
  at IronPython.Runtime.Calls.BuiltinFunction.Call
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
  at IronPython.Runtime.Operations.Ops.CallWithContext
(IronPython.Runtime.Calls.ICallerContext,object,object,object)
<0x00042>
  at (wrapper dynamic-method) System.Object.##47
(IronPython.Runtime.ModuleScope) <0x>
  at (wrapper delegate-invoke)
System.MulticastDelegate.invoke_object_ModuleScope
(IronPython.Runtime.ModuleScope) <0x>
  at IronPython.Hosting.CompiledCode.Run
(IronPython.Runtime.ModuleScope) <0x00048>
  at IronPython.Hosting.PythonEngine.ExecuteToConsole
(string,IronPython.Hosting.EngineModule,System.Collections.Generic.IDictionary`2)
<0x00180>
  at IronPython.Hosting.PythonEngine.ExecuteToConsole (string) <0x00015>
  at IronPythonConsole.PythonCommandLine.RunString
(IronPython.Hosting.PythonEngine,string) <0x000bc>
  at IronPythonConsole.PythonCommandLine.Run
(IronPython.Hosting.PythonEngine,string) <0x0002b>
  at IronPythonConsole.PythonCommandLine.Main (string[]) <0x002bf>
  at (wrapper runtime-invoke)
System.Object.runtime_invoke_int_string[]
(object,intptr,intptr,intptr) <0x>

Native stacktrace:

/usr/bin/mono(mono_handle_native_sigsegv+0xde) [0x815644e]
/usr/bin/mono [0x8122c88]
[0xe440]
/usr/bin/mono(mono_unicode_to_external+0x3f) [0x811309f]
/usr/bin/mono [0x8103947]
/usr/bin/mono [0x80d6b57]
[0xb6e5d3fa]
[0xb6e5c880]
[0xb6e5c275]
[0xb6e5c0cb]
[0xb6e5ba5f]
[0xb6e5b996]
[0xb6e5b90a]
[0xb6e6b45c]
[0xb6e6b3d4]
[0xb6e5acfc]
[0xb6e5ac73]
[0xb6e5b6b3]
[0xb6e5378a]
[0xb6e53711]
[0xb6e5af89]
[0xb6e5adee]
[0xb706d4fd]
[0xb706d34c]
[0xb79725a0]
[0xb7971a84]
/usr/bin/mono(mono_runtime_exec_main+0x9f) [0

Re: [IronPython] os.popen() + Mono == segfault

2006-12-06 Thread Sylvain Hellegouarch
Just to confirm I get the same issue with IPCE-r3 and mono 1.2.1

- Sylvain

Anthony Baxter wrote:
> On both IronPython 1.0.1 and IPCE release 4, os.popen() segfaults
> under Mono 1.17.1 (on Ubuntu edgy).
> 
> To reproduce:
> ipy.exe -c "import os; print os.popen('/bin/ls', 'r').read()"
> 
> Stacktrace follows, for whatever value it is... I can't tell
> immediately whether it's an IronPython or Mono problem, although it
> _appears_ to be in Mono. If other people agree, I'll log a Mono bug
> tomorrow.
> 
> It looks like most of the os module to do with spawning commands is
> missing, apart from os.spawnl(), which _appears_ to work. It should be
> possible to re implement the stdlib's popen2 module on top of that.
> Whether it will work is another matter entirely, of course :-)
> 
> 
> 
> 
> =
> 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.
> =
> 
> Stacktrace
> 
>   at (wrapper managed-to-native)
> System.Diagnostics.Process.CreateProcess_internal
> (System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
> <0x4>
>   at (wrapper managed-to-native)
> System.Diagnostics.Process.CreateProcess_internal
> (System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
> <0x>
>   at System.Diagnostics.Process.Start_noshell
> (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
> <0x00547>
>   at System.Diagnostics.Process.Start_common
> (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
> <0x0007c>
>   at System.Diagnostics.Process.Start
> (System.Diagnostics.ProcessStartInfo) <0x00032>
>   at IronPython.Modules.PythonNT.OpenPipedCommand
> (IronPython.Runtime.Calls.ICallerContext,string,string,int) <0x000ae>
>   at IronPython.Modules.PythonNT.OpenPipedCommand
> (IronPython.Runtime.Calls.ICallerContext,string,string) <0x00015>
>   at (wrapper dynamic-method) System.Object.OpenPipedCommand##49
> (IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
>   at (wrapper delegate-invoke)
> System.MulticastDelegate.invoke_object_ICallerContext_object_object
> (IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
>   at IronPython.Runtime.Calls.FastCallableWithContextAny.Call
> (IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
>   at IronPython.Runtime.Calls.BuiltinFunction.Call
> (IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
>   at IronPython.Runtime.Operations.Ops.CallWithContext
> (IronPython.Runtime.Calls.ICallerContext,object,object,object)
> <0x00042>
>   at (wrapper dynamic-method) System.Object.##47
> (IronPython.Runtime.ModuleScope) <0x>
>   at (wrapper delegate-invoke)
> System.MulticastDelegate.invoke_object_ModuleScope
> (IronPython.Runtime.ModuleScope) <0x>
>   at IronPython.Hosting.CompiledCode.Run
> (IronPython.Runtime.ModuleScope) <0x00048>
>   at IronPython.Hosting.PythonEngine.ExecuteToConsole
> (string,IronPython.Hosting.EngineModule,System.Collections.Generic.IDictionary`2)
> <0x00180>
>   at IronPython.Hosting.PythonEngine.ExecuteToConsole (string) <0x00015>
>   at IronPythonConsole.PythonCommandLine.RunString
> (IronPython.Hosting.PythonEngine,string) <0x000bc>
>   at IronPythonConsole.PythonCommandLine.Run
> (IronPython.Hosting.PythonEngine,string) <0x0002b>
>   at IronPythonConsole.PythonCommandLine.Main (string[]) <0x002bf>
>   at (wrapper runtime-invoke)
> System.Object.runtime_invoke_int_string[]
> (object,intptr,intptr,intptr) <0x>
> 
> Native stacktrace:
> 
> /usr/bin/mono(mono_handle_native_sigsegv+0xde) [0x815644e]
> /usr/bin/mono [0x8122c88]
> [0xe440]
> /usr/bin/mono(mono_unicode_to_external+0x3f) [0x811309f]
> /usr/bin/mono [0x8103947]
> /usr/bin/mono [0x80d6b57]
> [0xb6e5d3fa]
> [0xb6e5c880]
> [0xb6e5c275]
> [0xb6e5c0cb]
> [0xb6e5ba5f]
> [0xb6e5b996]
> [0xb6e5b90a]
> [0xb6e6b45c]
> [0xb6e6b3d4]
> [0xb6e5acfc]
> [0xb6e5ac73]
> [0xb6e5b6b3]
> [0xb6e5378a]
> [0xb6e53711]
> [0xb6e5af89]
> [0xb6e5adee]
> [0xb706d4fd]
> [0xb706d34c]
> [0xb79725a0]
> [0xb7971a84]
> /usr/bin/mono(mono_runtime_exec_main+0x9f) [0x80996ef]
> /usr/bin/mono(mono_runtime_run_main+0x1b9) [0x809]
> /usr/bin/mono(mono_main+0xe47) [0x805d477]
> /usr/bin/mono [0x805c122]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7d058cc]
> /usr/bin/mono [0x805c071]
> ___
> users mailing list
> users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

_

[IronPython] os.popen() + Mono == segfault

2006-12-06 Thread Anthony Baxter
On both IronPython 1.0.1 and IPCE release 4, os.popen() segfaults
under Mono 1.17.1 (on Ubuntu edgy).

To reproduce:
ipy.exe -c "import os; print os.popen('/bin/ls', 'r').read()"

Stacktrace follows, for whatever value it is... I can't tell
immediately whether it's an IronPython or Mono problem, although it
_appears_ to be in Mono. If other people agree, I'll log a Mono bug
tomorrow.

It looks like most of the os module to do with spawning commands is
missing, apart from os.spawnl(), which _appears_ to work. It should be
possible to re implement the stdlib's popen2 module on top of that.
Whether it will work is another matter entirely, of course :-)




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

Stacktrace

  at (wrapper managed-to-native)
System.Diagnostics.Process.CreateProcess_internal
(System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
<0x4>
  at (wrapper managed-to-native)
System.Diagnostics.Process.CreateProcess_internal
(System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&)
<0x>
  at System.Diagnostics.Process.Start_noshell
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
<0x00547>
  at System.Diagnostics.Process.Start_common
(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
<0x0007c>
  at System.Diagnostics.Process.Start
(System.Diagnostics.ProcessStartInfo) <0x00032>
  at IronPython.Modules.PythonNT.OpenPipedCommand
(IronPython.Runtime.Calls.ICallerContext,string,string,int) <0x000ae>
  at IronPython.Modules.PythonNT.OpenPipedCommand
(IronPython.Runtime.Calls.ICallerContext,string,string) <0x00015>
  at (wrapper dynamic-method) System.Object.OpenPipedCommand##49
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
  at (wrapper delegate-invoke)
System.MulticastDelegate.invoke_object_ICallerContext_object_object
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x>
  at IronPython.Runtime.Calls.FastCallableWithContextAny.Call
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
  at IronPython.Runtime.Calls.BuiltinFunction.Call
(IronPython.Runtime.Calls.ICallerContext,object,object) <0x00023>
  at IronPython.Runtime.Operations.Ops.CallWithContext
(IronPython.Runtime.Calls.ICallerContext,object,object,object)
<0x00042>
  at (wrapper dynamic-method) System.Object.##47
(IronPython.Runtime.ModuleScope) <0x>
  at (wrapper delegate-invoke)
System.MulticastDelegate.invoke_object_ModuleScope
(IronPython.Runtime.ModuleScope) <0x>
  at IronPython.Hosting.CompiledCode.Run
(IronPython.Runtime.ModuleScope) <0x00048>
  at IronPython.Hosting.PythonEngine.ExecuteToConsole
(string,IronPython.Hosting.EngineModule,System.Collections.Generic.IDictionary`2)
<0x00180>
  at IronPython.Hosting.PythonEngine.ExecuteToConsole (string) <0x00015>
  at IronPythonConsole.PythonCommandLine.RunString
(IronPython.Hosting.PythonEngine,string) <0x000bc>
  at IronPythonConsole.PythonCommandLine.Run
(IronPython.Hosting.PythonEngine,string) <0x0002b>
  at IronPythonConsole.PythonCommandLine.Main (string[]) <0x002bf>
  at (wrapper runtime-invoke)
System.Object.runtime_invoke_int_string[]
(object,intptr,intptr,intptr) <0x>

Native stacktrace:

/usr/bin/mono(mono_handle_native_sigsegv+0xde) [0x815644e]
/usr/bin/mono [0x8122c88]
[0xe440]
/usr/bin/mono(mono_unicode_to_external+0x3f) [0x811309f]
/usr/bin/mono [0x8103947]
/usr/bin/mono [0x80d6b57]
[0xb6e5d3fa]
[0xb6e5c880]
[0xb6e5c275]
[0xb6e5c0cb]
[0xb6e5ba5f]
[0xb6e5b996]
[0xb6e5b90a]
[0xb6e6b45c]
[0xb6e6b3d4]
[0xb6e5acfc]
[0xb6e5ac73]
[0xb6e5b6b3]
[0xb6e5378a]
[0xb6e53711]
[0xb6e5af89]
[0xb6e5adee]
[0xb706d4fd]
[0xb706d34c]
[0xb79725a0]
[0xb7971a84]
/usr/bin/mono(mono_runtime_exec_main+0x9f) [0x80996ef]
/usr/bin/mono(mono_runtime_run_main+0x1b9) [0x809]
/usr/bin/mono(mono_main+0xe47) [0x805d477]
/usr/bin/mono [0x805c122]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7d058cc]
/usr/bin/mono [0x805c071]
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com