X-Spam-Check-By: sourceware.org Message-ID: <442C25D0.7030605@pondol.com> Date: Thu, 30 Mar 2006 12:39:12 -0600 From: David Carter User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: problems with gawk 3.1.5-3 hanging Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Hi all: First, I found another gentleman with a similar issue in the mailing list archive: http://www.cygwin.com/ml/cygwin/2006-03/msg00425.html Seems he thought the problem wasn't with gawk 3.1.5-3 in the end, however I'm having very similar issues with gawk hanging and it only happens with 3.1.5-3. When I revert to 3.1.5-2, the problem seems to go away. Unfortunately, the issue is intermittent and only seems to occur when i call gawk from the bowels of my fairly long bash script. When I try to isolate the problem by running the same gawk script manually from a prompt, the problem disappears. Perhaps this is related to why the other poster became convinced the problem wasn't actually with gawk, when in fact it the problem was with gawk, but hard to pin down. The gawk script in question is very simple and is meant to reduce the output from an rsync transfer. Here's a snippet: rsync -vP sourcefile remotesys:~/remotefile | gawk \ ' BEGIN { RS="\r|\n"; FS=" "; } { if ( $2 ~ /\%/ ) { # if field 2 contains a percent sign if ( FNR % 10 == 0 || $5 ~/\(/ ) { # if its the tenth line, or field 5 contains a "(" print $0; fflush(); } } else { print $0; fflush(); } } ' Again, if I run this command from a prompt, it works (with 3.1.5-3 and 3.1.5-2). But when called from the bowels of a longer shell script (not included for brevity), it usually (but not always) hangs with 3.1.5-3. I can verify the rsync transfer finishes properly, but gawk never exits and I don't get all the output that I should to stdout, either. I don't see anything going to stderr. Again, it works 100% of the time with 3.1.5-2 Does anyone have some pointers on how I can further debug this? I'd like to forward more information to the appropriate parties. Regards; David Carter -- 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/