Brian Crowell wrote:
I'm trying to reproduce a situation seen in my program involving the following
message:
After months of chasing this particular problem down, I think I finally found my
problem. Here it is, with some I found on the way:
http://bugzilla.ximian.com/show_bug.cgi?id=79061 (killwapi.cs)
WAPI shared handles don't seem to disappear when the AppDomain does. This causes
a really big problem, because a thread handle seems to appear for every
AppDomain in existence. This program will exhaust the handle table.
http://bugzilla.ximian.com/show_bug.cgi?id=79062 (sigsegv.cs)
The combination of unquoted parameters and standard out redirects, over three
attempts, will cause a SIGSEGV. Got this one entirely by accident.
http://bugzilla.ximian.com/show_bug.cgi?id=79063 (processdeadlock.cs)
This one is rare. There's a small chance of a deadlock if you run multiple
processes simultaneously.
--Brian
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Net.Sockets;
namespace Test {
class Test {
static void Main() {
for( int i = 0; i < 5; i++ ) {
Thread empty = new Thread( new ThreadStart(
StartProcess ) );
empty.Start();
}
Thread.Sleep( -1 );
}
static int __processIter = 0;
static void StartProcess() {
for( ;; ) {
ProcessStartInfo info = new ProcessStartInfo( "/bin/echo",
"\"I'm hen-er-y the 8th I am..." +
Interlocked.Increment( ref __processIter ).ToString() + "\"" );
info.UseShellExecute = false;
info.RedirectStandardOutput = true;
Process process = Process.Start( info );
Console.WriteLine(
process.StandardOutput.ReadLine() );
process.WaitForExit();
process.Dispose();
}
}
}
}
using System;
using System.Diagnostics;
namespace Test {
class TestClass {
static void Main() {
for( int i = 0; i < 3; i++ ) {
ProcessStartInfo info = new ProcessStartInfo(
"/bin/echo",
"I'm hen-er-y the 8th I am...8" );
info.UseShellExecute = false;
info.RedirectStandardOutput = true;
Process process = Process.Start( info );
Console.WriteLine( process.StandardOutput.ReadLine() );
process.WaitForExit();
}
}
}
}
using System;
namespace Test {
class Test {
static void Main() {
for( ;; ) {
AppDomain domain = AppDomain.CreateDomain(
"dummy" );
domain.DoCallBack( new CrossAppDomainDelegate(
Callback ) );
AppDomain.Unload( domain );
}
}
public static void Callback() {
}
}
}
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list