Subject: B20.0 on NT4.0/SP4: bash bug: spinning when executing a script
From: [email-masked] (Bill Nugent)

1 Dec 1998 02:35:36 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/mixed ;
	boundary="==_Exmh_-11833088650"
To: [email-masked]

This is a multipart MIME message.

--==_Exmh_-11833088650
Content-Type: text/plain; charset=us-ascii

Howdy,

I have encountered a repeatable bug when executing a bash script under 
Beta 20.0 on a Windows NT 4.0 w/SP4 box.  When executing the enclosed 
script bash will start to spin at some point and eating up the CPU (went 
for over 6 hours last night).  I've had it happen on the three times I've 
run the script and the first time it occured on the third loop, then then 
second loop and the third time on 9th loop - I've enclosed trace (set 
-xv) of this last time and from what I can gather awk exited and bash 
started to spin.

	Bill

--==_Exmh_-11833088650
Content-Type: application/x-sh ; name="compare-compress.sh"
Content-Description: compare-compress.sh
Content-Disposition: attachment; filename="compare-compress.sh"

#! /bin/sh
# Compare how well 'gzip --best' and bzip2 do
#
#for fn in *.wav New\ Folder/*.wav demo/*.wav
set -xv
find . -name "*.wav" -print | while read fn
do
  cp "$fn" fu
  ts1=`date '+%s'`
  gzip --best fu
  ts2=`date '+%s'`
  gz_size=`ls -l fu.gz | awk '{print \$5}'`

  cp "$fn" fu
  ts3=`date '+%s'`
  bzip2 fu
  ts4=`date '+%s'`
  bz_size=`ls -l fu.bz2 | awk '{print \$5}'`

  size=`ls -l "$fn" | awk '{print \$5}'`
  
  echo "$fn:"
  echo "  type    Time       Size    Reduction"
  printf "   orig  %6s %11d\n" " " $size
  echo -e "gzip $ts1 $ts2 $gz_size $size\\nbzip2 $ts3 $ts4 $bz_size $size" | \
   awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, ($4/$5)*100}'
  echo
  rm -f fu fu.gz fu.bz2
done

--==_Exmh_-11833088650
Content-Type: text/plain ; name="compare.trace"
Content-Description: compare.trace
Content-Disposition: attachment; filename="compare.trace"

find . -name "*.wav" -print | while read fn
do
  cp "$fn" fu
  ts1=`date '+%s'`
  gzip --best fu
  ts2=`date '+%s'`
  gz_size=`ls -l fu.gz | awk '{print \$5}'`

  cp "$fn" fu
  ts3=`date '+%s'`
  bzip2 fu
  ts4=`date '+%s'`
  bz_size=`ls -l fu.bz2 | awk '{print \$5}'`

  size=`ls -l "$fn" | awk '{print \$5}'`
  
  echo "$fn:"
  echo "  type    Time       Size    Reduction"
  printf "   orig  %6s %11d\n" " " $size
  echo -e "gzip $ts1 $ts2 $gz_size $size\\nbzip2 $ts3 $ts4 $bz_size 
$size" | \
   awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
  echo
  rm -f fu fu.gz fu.bz2
done
+ find . -name '*.wav' -print
+ read fn
+ cp './Bhavatu Sabba Mangalam 1 Hour.wav' fu
date '+%s'
++ date +%s
+ ts1=912426419
+ gzip --best fu
gzip: fu.gz already exists;	not overwritten
date '+%s'
++ date +%s
+ ts2=912426419
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=711817294
+ cp './Bhavatu Sabba Mangalam 1 Hour.wav' fu
date '+%s'
++ date +%s
+ ts3=912426423
+ bzip2 fu
bzip2: Output file fu.bz2 already exists, skipping.
date '+%s'
++ date +%s
+ ts4=912426423
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=730403271
ls -l "$fn" | awk '{print $5}'
++ ls -l './Bhavatu Sabba Mangalam 1 Hour.wav'
++ awk '{print $5}'
+ size=40390972
+ echo './Bhavatu Sabba Mangalam 1 Hour.wav:'
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 40390972
+ echo -e 'gzip 912426419 912426419 711817294 40390972\nbzip2 912426423 
912426423 730403271 40390972'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/1.orig.wav fu
date '+%s'
++ date +%s
+ ts1=912426428
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912426615
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=6375405
+ cp ./Demo/1.orig.wav fu
date '+%s'
++ date +%s
+ ts3=912426617
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912426656
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=4066575
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/1.orig.wav
++ awk '{print $5}'
+ size=13100928
+ echo ./Demo/1.orig.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 13100928
+ echo -e 'gzip 912426428 912426615 6375405 13100928\nbzip2 912426617 
912426656 4066575 13100928'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/full1.wav fu
date '+%s'
++ date +%s
+ ts1=912426975
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912427820
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=711817294
+ cp ./Demo/full1.wav fu
date '+%s'
++ date +%s
+ ts3=912428139
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912433166
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=730403271
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/full1.wav
++ awk '{print $5}'
+ size=771637776
+ echo ./Demo/full1.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 771637776
+ echo -e 'gzip 912426975 912427820 711817294 771637776\nbzip2 912428139 
912433166 730403271 771637776'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/full2.wav fu
date '+%s'
++ date +%s
+ ts1=912433425
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912434287
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=711817294
+ cp ./Demo/full2.wav fu
date '+%s'
++ date +%s
+ ts3=912434564
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912439523
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=730403271
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/full2.wav
++ awk '{print $5}'
+ size=771637776
+ echo ./Demo/full2.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 771637776
+ echo -e 'gzip 912433425 912434287 711817294 771637776\nbzip2 912434564 
912439523 730403271 771637776'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp './Demo/Sayagyi U Ba Khin - Tikipatthana.wav' fu
date '+%s'
++ date +%s
+ ts1=912439693
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912440141
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=313261083
+ cp './Demo/Sayagyi U Ba Khin - Tikipatthana.wav' fu
date '+%s'
++ date +%s
+ ts3=912440302
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912442092
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=223821189
ls -l "$fn" | awk '{print $5}'
++ ls -l './Demo/Sayagyi U Ba Khin - Tikipatthana.wav'
++ awk '{print $5}'
+ size=385819000
+ echo './Demo/Sayagyi U Ba Khin - Tikipatthana.wav:'
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 385819000
+ echo -e 'gzip 912439693 912440141 313261083 385819000\nbzip2 912440302 
912442092 223821189 385819000'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/test.wav fu
date '+%s'
++ date +%s
+ ts1=912442093
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912442094
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=226
+ cp ./Demo/test.wav fu
date '+%s'
++ date +%s
+ ts3=912442094
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912442094
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=267
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/test.wav
++ awk '{print $5}'
+ size=248
+ echo ./Demo/test.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 248
+ echo -e 'gzip 912442093 912442094 226 248\nbzip2 912442094 912442094 
267 248'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/Tiki-demo.wav fu
date '+%s'
++ date +%s
+ ts1=912442105
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912442134
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=24163975
+ cp ./Demo/Tiki-demo.wav fu
date '+%s'
++ date +%s
+ ts3=912442137
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912442290
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=17817730
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/Tiki-demo.wav
++ awk '{print $5}'
+ size=29999404
+ echo ./Demo/Tiki-demo.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 29999404
+ echo -e 'gzip 912442105 912442134 24163975 29999404\nbzip2 912442137 
912442290 17817730 29999404'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'
+ echo
+ rm -f fu fu.gz fu.bz2
+ read fn
+ cp ./Demo/tiki.1.wav fu
date '+%s'
++ date +%s
+ ts1=912442295
+ gzip --best fu
date '+%s'
++ date +%s
+ ts2=912442309
ls -l fu.gz | awk '{print $5}'
++ ls -l fu.gz
++ awk '{print $5}'
+ gz_size=12670660
+ cp ./Demo/tiki.1.wav fu
date '+%s'
++ date +%s
+ ts3=912442311
+ bzip2 fu
date '+%s'
++ date +%s
+ ts4=912442398
ls -l fu.bz2 | awk '{print $5}'
++ ls -l fu.bz2
++ awk '{print $5}'
+ bz_size=13003745
ls -l "$fn" | awk '{print $5}'
++ ls -l ./Demo/tiki.1.wav
++ awk '{print $5}'
+ size=13677044
+ echo ./Demo/tiki.1.wav:
+ echo '  type    Time       Size    Reduction'
+ printf '   orig  %6s %11d\n' ' ' 13677044
+ echo -e 'gzip 912442295 912442309 12670660 13677044\nbzip2 912442311 
912442398 13003745 13677044'
+ awk '{printf "  %5s %6d  %11d  %2.1f%%\n", $1, ($3 - $2), $4, 
($4/$5)*100}'

--==_Exmh_-11833088650--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".