gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

View: New views
4 Messages — Rating Filter:   Alert me  

gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

by Dennis Clarke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Everything was going well until I ran make check.

Thus :

PASS: t-set_f
check_in: result wrong
  i=1 zeros=0 neg=0
  got_ret  5
  want_ret 5
  got      =0x8100000000000000
  want     =0x81
/bin/bash: line 4:  9616 Abort                   (core dumped) ${dir}$tst
FAIL: t-io_raw
wrong at data[25]
    count=3 order=1  size=8 endian=1 nail=0  align=0
    got =0x44003300220011008800770066005500CC00BB00AA00990
    want=0x100120023003400450056006700780089009A00AB00BC00C
/bin/bash: line 4:  9636 Abort                   (core dumped) ${dir}$tst
FAIL: t-import
wrong result data
    at data[26]  align=0
    src "0x100120023003400450056006700780089009A00AB00BC00C"
    src=0x100120023003400450056006700780089009A00AB00BC00C
    order=1  size=8 endian=1 nail=0
    want count 3
    got count  3
    want 0x10, 0x01, 0x20, 0x02, 0x30, 0x03, 0x40, 0x04, 0x50, 0x05, 0x60,
0x06, 0x70, 0x07, 0x80, 0x08, 0x90, 0x09, 0xA0, 0x0A, 0xB0, 0x0B,
0xC0, 0x0C,
    got  0x04, 0x40, 0x03, 0x30, 0x02, 0x20, 0x01, 0x10, 0x08, 0x80, 0x07,
0x70, 0x06, 0x60, 0x05, 0x50, 0x0C, 0xC0, 0x0B, 0xB0, 0x0A, 0xA0,
0x09, 0x90,
/bin/bash: line 4:  9656 Abort                   (core dumped) ${dir}$tst
FAIL: t-export
PASS: t-pprime_p
==================================
3 of 56 tests failed

this info may or may not help :

$ elfdump .libs/libgmp.so.3.4.4 | grep PATH
       [5]  RUNPATH           0x196d            
/opt/local/lib/\$ISALIST:/opt/local/lib:/opt/SSX0903/prod/lib/stlport4/amd64
       [6]  RPATH             0x196d            
/opt/local/lib/\$ISALIST:/opt/local/lib:/opt/SSX0903/prod/lib/stlport4/amd64
$
$ elfdump .libs/libgmpxx.so.4.0.4 | grep PATH
       [6]  RUNPATH           0x253a9            
/opt/local/lib/\$ISALIST:/opt/local/lib:/opt/SSX0903/prod/lib/stlport4/amd64:/export/medusa/dclarke/build/libgmp/i386/CXX/gmp-4.2.4-build-amd64/.libs:/opt/csw/lib:/opt/csw/lib/SALIST:/opt/SSX0903/lib/rw7/amd64:/opt/SSX0903/lib/stlport4/amd64:/opt/SSX0903/lib/amd64:/usr/ccs/lib/amd64:/lib/64:/usr/lib/64
       [7]  RPATH             0x253a9            
/opt/local/lib/\$ISALIST:/opt/local/lib:/opt/SSX0903/prod/lib/stlport4/amd64:/export/medusa/dclarke/build/libgmp/i386/CXX/gmp-4.2.4-build-amd64/.libs:/opt/csw/lib:/opt/csw/lib/SALIST:/opt/SSX0903/lib/rw7/amd64:/opt/SSX0903/lib/stlport4/amd64:/opt/SSX0903/lib/amd64:/usr/ccs/lib/amd64:/lib/64:/usr/lib/64
$
$
$ file .libs/libgmp.so.3.4.4
.libs/libgmp.so.3.4.4: ELF 64-bit LSB dynamic lib AMD64 Version 1 [SSE2
MMX FPU], dynamically linked, not stripped
$
$ file .libs/libgmpxx.so.4.0.4
.libs/libgmpxx.so.4.0.4: ELF 64-bit LSB dynamic lib AMD64 Version 1 [SSE2
SSE CMOV FPU], dynamically linked, not stripped
$

What steps should I take ?

--
Dennis Clarke


_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://gmplib.org/mailman/listinfo/gmp-bugs

Re: gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

by Paul Zimmermann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Everything was going well until I ran make check.

it seems to be a big-endian vs little-endian issue. Maybe the configure script
was fooled by the combination Solaris - AMD64.

Paul Zimmermann
_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://gmplib.org/mailman/listinfo/gmp-bugs

Parent Message unknown Re: gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

by Dennis Clarke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>> Everything was going well until I ran make check.
>
> it seems to be a big-endian vs little-endian issue. Maybe the configure
> script
> was fooled by the combination Solaris - AMD64.

Why would that be a problem? Solaris has been 64-bit on AMD64 for years.

I just did a full re-compile again. No optimization and nothing fancy.
Same code segfaults and dumps core over and over.

$ ./tests/mpz/t-io_raw
check_in: result wrong
  i=1 zeros=0 neg=0
  got_ret  5
  want_ret 5
  got      =0x8100000000000000
  want     =0x81
Abort(coredump)
$ find . -type f | grep core
./tests/mpz/core.t-io_raw.isis_global_i86pc.16411:101.1238997336.20116
./tests/mpz/core.t-import.isis_global_i86pc.16411:101.1238997336.20136
./tests/mpz/core.t-export.isis_global_i86pc.16411:101.1238997337.20156
./core.t-io_raw.isis_global_i86pc.16411:101.1238997763.20239
$

I can generate core files on demand and I am thinking I should go back and
recompile such that I can single step into this until the fault occurs.
There must be a way to find the root cause here.

$ file ./tests/mpz/.libs/t-io_raw
./tests/mpz/.libs/t-io_raw: ELF 64-bit LSB executable AMD64 Version 1
[SSE2 SSE FXSR FPU], dynamically linked, not stripped
$ ldd ./tests/mpz/.libs/t-io_raw
        libgmp.so.3 =>  
/export/medusa/dclarke/build/libgmp/i386/CXX/gmp-4.2.4-build-amd64/.libs/libgmp.so.3
        libthread.so.1 =>        /lib/64/libthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libm.so.2 =>     /lib/64/libm.so.2

I have LD_LIBRARY_PATH set to find the correct libs.

$ dbx ./tests/mpz/.libs/t-io_raw
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.7' in your
.dbxrc
Reading t-io_raw
Reading ld.so.1
Reading libgmp.so.3.4.4
Reading libthread.so.1
Reading libc.so.1
(dbx) run
Running: t-io_raw
(process id 20265)
check_in: result wrong
  i=1 zeros=0 neg=0
  got_ret  5
  want_ret 5
  got      =0x8100000000000000
  want     =0x81
t@1 (l@1) signal ABRT (Abort) in __lwp_kill at 0xfffffd7fff27c94a
0xfffffd7fff27c94a: __lwp_kill+0x000a:  jae      __lwp_kill+0x18        [
0xfffffd7fff27c958, .+0xe ]
(dbx) where
current thread: t@1
=>[1] __lwp_kill(0x1, 0x6, 0xffffffff89dde400, 0x3, 0x0, 0x0), at
0xfffffd7fff27c94a
  [2] _thr_kill(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff275223
  [3] raise(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff221c39
  [4] abort(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff2011c0
  [5] check_in(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x403b73
  [6] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x40462b
(dbx) quit
$

I'll try to focus on one test at a time and see if I cna single step into
this.

Dennis


_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://gmplib.org/mailman/listinfo/gmp-bugs

Re: gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

by Torbjorn Granlund-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dennis Clarke <dclarke@...> writes:

  >> Everything was going well until I ran make check.
  >
  > it seems to be a big-endian vs little-endian issue. Maybe the configure
  > script
  > was fooled by the combination Solaris - AMD64.
 
  Why would that be a problem? Solaris has been 64-bit on AMD64 for years.
 
And GMP's configure should not have any problems with this particular
combination.

  I just did a full re-compile again. No optimization and nothing fancy.
  Same code segfaults and dumps core over and over.
 
How did you disable optimization?  Some compilers are hard to persuade
to not optimize.

I tried gmp 4.2.4 on a Slowaris 11 (uname says 5.11 snv_105) system
now, forcing it to use cc instead of gcc:

tray$ cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2008/10/22
usage: cc [ options] files.  Use 'cc -flags' for details

I started with:

tray$ path-to-gmp-4.2.4/configure CC=cc --disable-static >&cfg.log
tray$ gmake
tray$ gmake check

This failed because configure doesn't know how to put the compiler in
64-bit mode.  For sparc-slowris, one needs to pass an ISA option
"-xarch=v9" for choosing ABI, very odd.  But here the right option is
apparently "-m64".  GMP's configure doesn't know that.  Let's therefore
add it manually:

tray$ path-to-gmp-4.2.4/configure CC="cc -m64" --disable-shared >&cfg.log
tray$ gmake
tray$ gmake check

This worked.  I also tried a shared build:

tray$ path-to-gmp-4.2.4/configure CC="cc -m64" --disable-static >&cfg.log
tray$ gmake
tray$ gmake check

This worked too.

  I'll try to focus on one test at a time and see if I can single step into
  this.
 
Yes, I suppose you need to debug this.  The odds are on a compiler (or
assembler or linker) bug.

--
Torbjörn
_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://gmplib.org/mailman/listinfo/gmp-bugs