[m-rev.] trivial diff: update test_mercury script for .par grades

Peter Wang wangp at students.cs.mu.OZ.AU
Mon Apr 3 14:56:08 AEST 2006


On 2006-03-20, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> 
> tools/test_mercury:
> 	Add a workaround from Peter Wang for a problem with the lowlevel .par
> 	grades on Linux hosts.  (The need for this should go away when we
> 	move to newer versions of libc).
> 
> 	Install asm_fast.par.gc on ceres.

Hi, it appears you never committed this.  However, it doesn't do
anything anyway.

Recap: asm_fast.par.gc grade programs are randomly crashing or
presenting strange behaviour.

I'm sure this has something to do with the GC and threads on linux.
I was able to bootcheck in asm_fast.par.gc on holly (Solaris) a couple
of weeks ago.

On jupiter & earth we have the strange behaviour that integer_test
crashes if dynamically linked to /lib/tls/pthread.so, but works fine if
statically linked to /usr/lib/libpthread.a.

On saturn integer_test works if you build it using `mmc --make',
but not if you build it with `mmake'.  The sizes are different:

  -rwxr-xr-x  1 wangp mercury 2891400 Apr  3 14:40 integer_test.mmake*
  -rwxr-xr-x  1 wangp mercury 2086856 Apr  3 14:40 integer_test.mmcmake*

And they are linked differently.

  wangp at saturn ..-saturn/hard_coded % file integer_test.mm*
  integer_test.mmake:   ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, statically linked, stripped
  integer_test.mmcmake: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), stripped

  wangp at saturn ..-saturn/hard_coded % ldd integer_test.mmake
  /usr/bin/ldd: line 1: /lib/ld-linux.so.2: No such file or directory
  ldd: /lib/ld-linux.so.2 exited with unknown exit code (127)
  zsh: exit 1     ldd integer_test.mmake

  wangp at saturn ..-saturn/hard_coded % ldd integer_test.mmcmake
	  libm.so.6 => /lib/libm.so.6 (0x00002aaaaabc1000)
	  libpthread.so.0 => /lib/libpthread.so.0 (0x00002aaaaad48000)
	  libdl.so.2 => /lib/libdl.so.2 (0x00002aaaaae5c000)
	  libc.so.6 => /lib/libc.so.6 (0x00002aaaaaf5f000)
	  /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

I would not read too much into it though as it appears static linking
with libpthread is completely broken on saturn:

  wangp at saturn ..-saturn/hard_coded % cat t.c
  #include <pthread.h>
  #include <stdio.h>
  int main(void)
  {
      pthread_key_t k;
      pthread_key_create(&k, NULL);
      printf("ok\n");
      return 0;
  }
  wangp at saturn ..-saturn/hard_coded % gcc -W -Wall -o t t.c -lpthread
  wangp at saturn ..-saturn/hard_coded % ./t
  ok
  wangp at saturn ..-saturn/hard_coded % gcc -W -Wall -o t t.c -lpthread -static
  wangp at saturn ..-saturn/hard_coded % ./t
  zsh: segmentation fault  ./t


I don't know if upgrading glibc will actually fix the problem, as I did
a bit of testing on my brother's AMD64 machine, which has glibc 2.3.5,
and integer_test crashed there as well.

Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list