test failure on 64 bit Linux with gcc-4.3.1

A couple days ago I reported some problems compiling on windows (I haven't
made progress, and didn't get suggestions in this forum. Am I looking for
help in the wrong place?). Today I was double-checking my installation on
64-bit Linux (gentoo) with gcc-4.3.1. It looks like configure and make were
successful, but "make check" crashed during the dt_arith testing:

Testing hard normalized long double -> signed char conversions Command
terminated by signal 11
0.23user 0.04system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+15369minor)pagefaults 0swaps
make[4]: *** [dt_arith.chkexe_] Error 1
make[4]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[3]: *** [build-check-s] Error 2
make[3]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[2]: *** [test] Error 2
make[2]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make: *** [check-recursive] Error 1

Does anyone have an idea how I could improve this? Incidentally, the 1.9.11
snapshot does not crash during dt_arith testing, all tests passed until it
tests the new file format. Here is the config summary for version 1.8.1:

General Information:

···

-------------------
                   HDF5 Version: 1.8.1
                  Configured on: Tue Jul 29 12:37:28 EDT 2008
                  Configured by: root@dale
                 Configure mode: production
                    Host system: x86_64-unknown-linux-gnu
              Uname information: Linux dale 2.6.25-gentoo-r5 #1 SMP Thu Jun 19
13:05:17 EDT 2008 x86_64 Dual Core AMD Opteron(tm) Processor 275 AuthenticAMD
GNU/Linux
                       Byte sex: little-endian
                      Libraries:
               Parallel support: no
             Installation
point: /var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/hdf5
                       Compiler: /usr/bin/gcc (gcc-4.3.1)
              Compiler
switches: -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE
                Extra libraries: -lz -lm
                       Archiver: ar
                         Ranlib: ranlib
              Debugged Packages:
                    API Tracing: no

Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/bin/gcc (gcc-4.3.1)
               
CFLAGS/H5_CFLAGS: -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer/-std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wunreachable-code -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wmissing-field-initializers -Wvariadic-macros -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var -O -fomit-frame-pointer -finline-functions
           
CPPFLAGS/H5_CPPFLAGS: -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE / -DNDEBUG -UH5_DEBUG_API
                        LDFLAGS:
                     Debug Mode:
               Shared Libraries: yes
               Static Libraries: yes
  Statically Linked Executables: no
Default Public Symbols Version: v18
With Deprecated Public Symbols: yes
                        Tracing: no
Clear file buffers before write: yes
           Using memory checker: no
   Optimization Instrumentation: no

Languages:
----------
                        Fortran: no
                            C++: no

Features:
---------
                        dmalloc: no
         Function Stack Tracing: no
                           GPFS: no
      Strict File Format Checks: no
            Default API Mapping: v18
         I/O filters (external): deflate(zlib)
         I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
Linux Large File Support (LFS): yes
                            MPE: no
                  Parallel HDF5: no
                     Direct VFD: no
                   Threadsafety: no
             High Level library: yes

Thanks,
Darren

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

I had problems on earlier GCC versions when I had -O2 as a flag. I had to use -O instead.

···

--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services

On Jul 29, 2008, at 12:52 PM, Darren Dale wrote:

A couple days ago I reported some problems compiling on windows (I haven't
made progress, and didn't get suggestions in this forum. Am I looking for
help in the wrong place?). Today I was double-checking my installation on
64-bit Linux (gentoo) with gcc-4.3.1. It looks like configure and make were
successful, but "make check" crashed during the dt_arith testing:

Testing hard normalized long double -> signed char conversions Command
terminated by signal 11
0.23user 0.04system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+15369minor)pagefaults 0swaps
make[4]: *** [dt_arith.chkexe_] Error 1
make[4]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[3]: *** [build-check-s] Error 2
make[3]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[2]: *** [test] Error 2
make[2]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory
`/var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/test'
make: *** [check-recursive] Error 1

Does anyone have an idea how I could improve this? Incidentally, the 1.9.11
snapshot does not crash during dt_arith testing, all tests passed until it
tests the new file format. Here is the config summary for version 1.8.1:

General Information:
-------------------
                   HDF5 Version: 1.8.1
                  Configured on: Tue Jul 29 12:37:28 EDT 2008
                  Configured by: root@dale
                 Configure mode: production
                    Host system: x86_64-unknown-linux-gnu
              Uname information: Linux dale 2.6.25-gentoo-r5 #1 SMP Thu Jun 19
13:05:17 EDT 2008 x86_64 Dual Core AMD Opteron(tm) Processor 275 AuthenticAMD
GNU/Linux
                       Byte sex: little-endian
                      Libraries:
               Parallel support: no
             Installation
point: /var/tmp/portage/sci-libs/hdf5-1.8.1/work/hdf5-1.8.1/hdf5
                       Compiler: /usr/bin/gcc (gcc-4.3.1)
              Compiler
switches: -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE
                Extra libraries: -lz -lm
                       Archiver: ar
                         Ranlib: ranlib
              Debugged Packages:
                    API Tracing: no

Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/bin/gcc (gcc-4.3.1)

CFLAGS/H5_CFLAGS: -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer/-std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wunreachable-code -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wmissing-field-initializers -Wvariadic-macros -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var -O -fomit-frame-pointer -finline-functions

CPPFLAGS/H5_CPPFLAGS: -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE / -DNDEBUG -UH5_DEBUG_API
                        LDFLAGS:
                     Debug Mode:
               Shared Libraries: yes
               Static Libraries: yes
  Statically Linked Executables: no
Default Public Symbols Version: v18
With Deprecated Public Symbols: yes
                        Tracing: no
Clear file buffers before write: yes
           Using memory checker: no
   Optimization Instrumentation: no

Languages:
----------
                        Fortran: no
                            C++: no

Features:
---------
                        dmalloc: no
         Function Stack Tracing: no
                           GPFS: no
      Strict File Format Checks: no
            Default API Mapping: v18
         I/O filters (external): deflate(zlib)
         I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
Linux Large File Support (LFS): yes
                            MPE: no
                  Parallel HDF5: no
                     Direct VFD: no
                   Threadsafety: no
             High Level library: yes

Thanks,
Darren

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Thank you for the suggestion. I ran ./configure with an empty CFLAGS env
variable in a freshly unpacked directory, and unfortunately "make && make
check" yielded the same problem. Can anyone else reproduce this problem?

Darren

···

On Tuesday 29 July 2008 12:57:51 pm Mike Jackson wrote:

I had problems on earlier GCC versions when I had -O2 as a flag. I
had to use -O instead.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Darren,

I had problems on earlier GCC versions when I had -O2 as a flag. I
had to use -O instead.

Thank you for the suggestion. I ran ./configure with an empty CFLAGS env
variable in a freshly unpacked directory, and unfortunately "make && make
check" yielded the same problem. Can anyone else reproduce this problem?

  You should find these lines in the config/gnu-flags file in the distribution:

       gcc-3.[0-4]*|gcc-4.[012]*)
         # The optimization level is reduced for gcc 3.* and 4.* due to problems
         # with code generation for src/H5Tconv.c with the -O2 & -O3
         # optimization levels (which shows up as failures for various integer
         # types -> long long conversions in the test/dtypes test). Perhaps
         # later versions of gcc will fix this bug... - QAK - 2003/10/20
         PROD_CFLAGS="-O"
         ;;

  Change them to include gcc 4.3, like this (add a '3' to the regex in the first line):

       gcc-3.[0-4]*|gcc-4.[0123]*)
         # The optimization level is reduced for gcc 3.* and 4.* due to problems
         # with code generation for src/H5Tconv.c with the -O2 & -O3
         # optimization levels (which shows up as failures for various integer
         # types -> long long conversions in the test/dtypes test). Perhaps
         # later versions of gcc will fix this bug... - QAK - 2003/10/20
         PROD_CFLAGS="-O"
         ;;

  This is already fixed in our 1.8.x release branch and will be incorporated in the 1.8.2 release later this year.

  Quincey

···

On Jul 29, 2008, at 12:52 PM, Darren Dale wrote:

On Tuesday 29 July 2008 12:57:51 pm Mike Jackson wrote:

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Quincey,

  You should find these lines in the config/gnu-flags file in the
distribution:

       gcc-3.[0-4]*|gcc-4.[012]*)
         # The optimization level is reduced for gcc 3.* and 4.* due
to problems
         # with code generation for src/H5Tconv.c with the -O2 & -O3
         # optimization levels (which shows up as failures for various
integer
         # types -> long long conversions in the test/dtypes test).
Perhaps
         # later versions of gcc will fix this bug... - QAK - 2003/10/20
         PROD_CFLAGS="-O"
         ;;

  Change them to include gcc 4.3, like this (add a '3' to the regex in
the first line):

       gcc-3.[0-4]*|gcc-4.[0123]*)

Thanks for the response. That regex had already been changed in my gnu-flags
file, and I can confirm that hdf5-1.8.1 was compiled with -O, but "make
check" still segfaults:

Jul 29 14:28:42 dale lt-dt_arith[21741]: segfault at 70e000 ip 2b1ebfceae3a sp
7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
Jul 29 14:28:42 dale lt-dt_arith[21742]: segfault at 70e000 ip 2b1ebfceae3a sp
7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
Jul 29 14:28:42 dale lt-dt_arith[21695]: segfault at 7fffeb16c000 ip
2b1ebfceac1d sp 7fffeb168f48 error 4 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]

config/gnu-flags said the O2/O3 optimization levels resulted in failures,
perhaps this is something different, I'm seeing segfaults instead of failed
tests.

Thanks,
Darren

···

On Tuesday 29 July 2008 02:07:54 pm you wrote:

Hi Darren,

I compile 1.8.1 with "CFLAGS=-m64","CXXFLAGS=-m64" and gcc 4.0.2 without any
problems...

BR

-- ds

···

2008/7/29 Darren Dale <dsdale24@gmail.com>

On Tuesday 29 July 2008 12:57:51 pm Mike Jackson wrote:
> I had problems on earlier GCC versions when I had -O2 as a flag. I
> had to use -O instead.

Thank you for the suggestion. I ran ./configure with an empty CFLAGS env
variable in a freshly unpacked directory, and unfortunately "make && make
check" yielded the same problem. Can anyone else reproduce this problem?

Darren

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to
hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Darren,

···

On Jul 29, 2008, at 1:40 PM, Darren Dale wrote:

Hi Quincey,

On Tuesday 29 July 2008 02:07:54 pm you wrote:

  You should find these lines in the config/gnu-flags file in the
distribution:

      gcc-3.[0-4]*|gcc-4.[012]*)
        # The optimization level is reduced for gcc 3.* and 4.* due
to problems
        # with code generation for src/H5Tconv.c with the -O2 & -O3
        # optimization levels (which shows up as failures for various
integer
        # types -> long long conversions in the test/dtypes test).
Perhaps
        # later versions of gcc will fix this bug... - QAK - 2003/10/20
        PROD_CFLAGS="-O"
        ;;

  Change them to include gcc 4.3, like this (add a '3' to the regex in
the first line):

      gcc-3.[0-4]*|gcc-4.[0123]*)

Thanks for the response. That regex had already been changed in my gnu-flags
file, and I can confirm that hdf5-1.8.1 was compiled with -O, but "make
check" still segfaults:

Jul 29 14:28:42 dale lt-dt_arith[21741]: segfault at 70e000 ip 2b1ebfceae3a sp
7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
Jul 29 14:28:42 dale lt-dt_arith[21742]: segfault at 70e000 ip 2b1ebfceae3a sp
7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
Jul 29 14:28:42 dale lt-dt_arith[21695]: segfault at 7fffeb16c000 ip
2b1ebfceac1d sp 7fffeb168f48 error 4 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]

config/gnu-flags said the O2/O3 optimization levels resulted in failures,
perhaps this is something different, I'm seeing segfaults instead of failed
tests.

  Hmm, very odd then... I've used gcc 4.3.x on FreeBSD/64 and on my Mac, without any problems. It could be a gentoo issue, since that's not one of our testing platforms...

  Quicney

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Dimitris,

Thanks for the suggestion. Unfortunately adding -m64 to my empty CFLAGS didn't
help. There must be some issue related to the more recent gcc compilers,
something that was addressed by the time the 1.9.11 snapshot was released.

Darren

···

On Tuesday 29 July 2008 02:13:42 pm Dimitris Servis wrote:

Hi Darren,

I compile 1.8.1 with "CFLAGS=-m64","CXXFLAGS=-m64" and gcc 4.0.2 without
any problems...

BR

-- ds

2008/7/29 Darren Dale <dsdale24@gmail.com>

> On Tuesday 29 July 2008 12:57:51 pm Mike Jackson wrote:
> > I had problems on earlier GCC versions when I had -O2 as a flag. I
> > had to use -O instead.
>
> Thank you for the suggestion. I ran ./configure with an empty CFLAGS env
> variable in a freshly unpacked directory, and unfortunately "make && make
> check" yielded the same problem. Can anyone else reproduce this problem?
>
> Darren
>
> ----------------------------------------------------------------------
> This mailing list is for HDF software users discussion.
> To subscribe to this list, send a message to
> hdf-forum-subscribe@hdfgroup.org.
> To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Quincey,

>> You should find these lines in the config/gnu-flags file in the
>> distribution:
>>
>> gcc-3.[0-4]*|gcc-4.[012]*)
>> # The optimization level is reduced for gcc 3.* and 4.* due
>> to problems
>> # with code generation for src/H5Tconv.c with the -O2 & -O3
>> # optimization levels (which shows up as failures for various
>> integer
>> # types -> long long conversions in the test/dtypes test).
>> Perhaps
>> # later versions of gcc will fix this bug... - QAK -
>> 2003/10/20
>> PROD_CFLAGS="-O"
>> ;;
>>
>> Change them to include gcc 4.3, like this (add a '3' to the regex in
>> the first line):
>>
>> gcc-3.[0-4]*|gcc-4.[0123]*)
>
> Thanks for the response. That regex had already been changed in my
> gnu-flags
> file, and I can confirm that hdf5-1.8.1 was compiled with -O, but
> "make
> check" still segfaults:
>
> Jul 29 14:28:42 dale lt-dt_arith[21741]: segfault at 70e000 ip
> 2b1ebfceae3a sp
> 7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
> Jul 29 14:28:42 dale lt-dt_arith[21742]: segfault at 70e000 ip
> 2b1ebfceae3a sp
> 7fffeb1691c8 error 6 in libhdf5.so.5.0.1[2b1ebfb5b000+27d000]
> Jul 29 14:28:42 dale lt-dt_arith[21695]: segfault at 7fffeb16c000 ip
> 2b1ebfceac1d sp 7fffeb168f48 error 4 in libhdf5.so.
> 5.0.1[2b1ebfb5b000+27d000]
>
> config/gnu-flags said the O2/O3 optimization levels resulted in
> failures,
> perhaps this is something different, I'm seeing segfaults instead of
> failed
> tests.

  Hmm, very odd then... I've used gcc 4.3.x on FreeBSD/64 and on my
Mac, without any problems. It could be a gentoo issue, since that's
not one of our testing platforms...

It seems unlikely to me to be a problem with gentoo, since this segfault does
not occur with the 1.9.11 snapshot. In fact, I just tested 1.9.11 again and
make check was successful, no segfaults and I didn't notice any reported
failures.

Maybe I should not be overly concerned? I have been using version 1.8.1 on
this system and, aside from this issue during make check, I have not
encountered any problems.

Regards,
Darren

···

On Tuesday 29 July 2008 02:44:54 pm Quincey Koziol wrote:

On Jul 29, 2008, at 1:40 PM, Darren Dale wrote:
> On Tuesday 29 July 2008 02:07:54 pm you wrote: