This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada ACATS random FAIL / scripting help wanted (was:Fix missed PRE optimization discovered)


On Sun, 2008-10-26 at 01:01 +0200, Laurent GUERBY wrote:
> On Sun, 2008-10-26 at 00:46 +0200, Andreas Schwab wrote:
> > Laurent GUERBY <laurent@guerby.net> writes:
> > 
> > > Is "mkdir X && cd X" known to be an unreliable script sequence?
> > 
> > If that doesn't work, then either your filesystem is broken, or another
> > process deleted the directory in between the commands.
> 
> I have only one continuous build script on this system launched with
> nohup and looping "while true; do" over invoking configure, make -j 1
> bootstrap and then make -j 1 check so no other process and no
> "background" tasks.
> 
> The OS is debian etch with only standard packages and kernel (2.6.18),
> the filesystem is the default ext3, from /proc/mounts:
> /dev/sda1 / ext3 rw,data=ordered 0 0
> Uptime is 246 days.
> 
> The hardware is bi-dual opteron (Dell SC1435) and load is usually
> at four or above (by other users of the compile farm).
> 
> As far as I remember the "sync" command I added lowered the number
> of random fails, but as you noted it shouldn't have any effect.

I added some logs after gnatmake in run_all.sh:

      ZSTAMP=none
      if [ ! -x $dir/tests/$chapter/$i/$binmain ]; then
         sync
         ZSTAMP=$(date '+%Y%m%dT%H%M%S')
         ls -l $dir/tests/$chapter/$i/ > /home/guerby/tmp/acats/postsync-${i}-${ZSTAMP} 2>&1
      fi
      target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
      if [ x$ZSTAMP != "xnone" ]; then
          ls -l $dir/tests/$chapter/$i/ > /home/guerby/tmp/acats/postsync2-${i}-${ZSTAMP} 2>&1
          cp -f $dir/tests/$chapter/$i/${i}.log /home/guerby/tmp/acats/last-${i}-${ZSTAMP}.log
          sleep 1
          ls -l $dir/tests/$chapter/$i/ > /home/guerby/tmp/acats/postsync3-${i}-${ZSTAMP} 2>&1
      fi

It trigered a few days ago:

guerby@gcc13:~/tmp/acats$ cat  postsync-c490001-20081101T131811
total 40
-rw-r--r-- 1 guerby guerby  412 2008-11-01 13:18 c490001_0.adb
-rw-r--r-- 1 guerby guerby 6896 2008-11-01 13:18 c490001_0.ads
-rw-r--r-- 1 guerby guerby 1625 2008-11-01 13:18 c490001_0.ali
-rw-r--r-- 1 guerby guerby 2640 2008-11-01 13:18 c490001_0.o
-rw-r--r-- 1 guerby guerby 1633 2008-11-01 13:18 c490001.adb
-rw-r--r-- 1 guerby guerby 1190 2008-11-01 13:18 c490001.ali
-rw-r--r-- 1 guerby guerby   12 2008-11-01 13:18 c490001.lst
-rw-r--r-- 1 guerby guerby 4192 2008-11-01 13:18 c490001.o
guerby@gcc13:~/tmp/acats$ cat  postsync2-c490001-20081101T131811
total 44
-rw-r--r-- 1 guerby guerby  412 2008-11-01 13:18 c490001_0.adb
-rw-r--r-- 1 guerby guerby 6896 2008-11-01 13:18 c490001_0.ads
-rw-r--r-- 1 guerby guerby 1625 2008-11-01 13:18 c490001_0.ali
-rw-r--r-- 1 guerby guerby 2640 2008-11-01 13:18 c490001_0.o
-rw-r--r-- 1 guerby guerby 1633 2008-11-01 13:18 c490001.adb
-rw-r--r-- 1 guerby guerby 1190 2008-11-01 13:18 c490001.ali
-rw-r--r-- 1 guerby guerby  159 2008-11-01 13:18 c490001.log
-rw-r--r-- 1 guerby guerby   12 2008-11-01 13:18 c490001.lst
-rw-r--r-- 1 guerby guerby 4192 2008-11-01 13:18 c490001.o
guerby@gcc13:~/tmp/acats$ cat last-c490001-20081101T131811.log
/home/guerby/trunk/gcc/testsuite/ada/acats/run_all.sh: line 16: /home/guerby/build/gcc/testsuite/ada/acats/tests/c4/c490001/c490001: No such file or directory
guerby@gcc13:~/tmp/acats$ cat postsync3-c490001-20081101T131811
total 1192
-rwxr-xr-x 1 guerby guerby 1170175 2008-11-01 13:18 c490001
-rw-r--r-- 1 guerby guerby     412 2008-11-01 13:18 c490001_0.adb
-rw-r--r-- 1 guerby guerby    6896 2008-11-01 13:18 c490001_0.ads
-rw-r--r-- 1 guerby guerby    1625 2008-11-01 13:18 c490001_0.ali
-rw-r--r-- 1 guerby guerby    2640 2008-11-01 13:18 c490001_0.o
-rw-r--r-- 1 guerby guerby    1633 2008-11-01 13:18 c490001.adb
-rw-r--r-- 1 guerby guerby    1190 2008-11-01 13:18 c490001.ali
-rw-r--r-- 1 guerby guerby     159 2008-11-01 13:18 c490001.log
-rw-r--r-- 1 guerby guerby      12 2008-11-01 13:18 c490001.lst
-rw-r--r-- 1 guerby guerby    4192 2008-11-01 13:18 c490001.o

As seen, after "sleep 1" the c490001 executable file appears at last
through "ls" so we now know gnatmake and ld didn't fail and produced
an executable but it appeared with an unexplainable delay.

I've observed this exact same behaviour two times in my logs.

I will propose a patch with a "sleep 1" after the "sync" unless
someone has another idea?

Thanks in advance,

Laurent



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]