X-Spam-Check-By: sourceware.org Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <5C77EDDF-45E1-4165-92EC-C5D364FDB6CC@rehley.net> References: <5C77EDDF-45E1-4165-92EC-C5D364FDB6CC AT rehley DOT net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <07F4517D-67C2-4E3F-B19A-00CF928AB3DE@rehley.net> Content-Transfer-Encoding: 7bit From: Peter Rehley Subject: Re: hang when using pthread and fork in 1.5.23-1 and snapshot 20070118, and now 1.5.24-1. Date: Fri, 26 Jan 2007 19:15:04 -0800 To: Cygwin List X-Mailer: Apple Mail (2.752.2) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note-from-DJ: This may be spam Hello, I tried the latest release of cygwin1.dll (1.5.24-1) and it still is hanging in the same way. I've tried to debug further with gdb, but so far I haven't got any useful information out of gdb. I'll keep trying to get some debug information, but if any one else can reproduce the problem I would be most appreciative. Thanks, Peter p.s. my machines spec's are windows xp, sp2, 2.93 GHz, 760MB ram. windows xp, sp1 2.39 GHz, 508MB ram. both are single processor units. On Jan 19, 2007, at 6:03 PM, Peter Rehley wrote: > Hello, > > One of the applications I've been working with has hanging issues. > It will sometimes work properly, and sometimes it will hang and > never continue through the rest of the program. > > I've created a simple test case that does some of what the > application does, and it will hang too. The test case has a loop > that continually creates a pthread. The pthread calls a function > that forks and execve's to another program. Eventually the main > program will be unable to fork, and it will hang inside of the > pthread after the thread's function has completed. However, I can > also get two other different results depending on how the program > is compiled and run. > > 1) pthread_create failed : rc 11 - valid error. > build with "g++ -DPRFAIL main.cc" > and run without redirecting output. Adds additional printf > statements to output > 2) fork called but never returns. one hang situation. > build with g++ main.cc > and run with redirecting output to a file. > 3) Unable to create fork, but program doesn't appear to leave > thread and program hangs. > build with g++ main.cc > and run without redirecting output. > > I suspect, maybe incorrectly, that the hangs are race conditions. > I'm hoping that someone will be able to take the test case and be > able to reproduce what I'm seeing. > > The machine is a fresh install of windows xp only. No webcam > drivers or other known programs that interact badly with cygwin. I > have AVG antivirus installed but even with it uninstalled the > program can still hang. > > I've attached the cygcheck output and the simple test case. > > Thanks, > Peter > > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/