icegridnode crashes

sinofoolsinofool Member Bochun BaiOrganization: sinofool.comProject: http://sinofool.com/ ✭✭
While trying to upgrade my grid to 3.3.0, icegridnode cannot started.
*** glibc detected *** realloc(): invalid next size: 0x00000000008386d0 ***
Aborted

I have located the problem, Ice/Buffer.cpp causes it.
Compiling with optimize=no is all right.
I compile all the source with optimized=yes in Make.rules file. And change line 88 of Make.rules.Linux to -O1 and touch src/Ice/Buffer.cpp, it also works.

With -g -O2 flag, core dump file contains only 4 line stack trace but no source name and line number.

It looks like a problem of my gcc. I will confirm it again.
Do you have some report like this?

P.S. My environment :
RHEL4-Update5
gcc-4.2.4 ( Compiled from source )
mcpp ( static linked )

Comments

  • sinofoolsinofool Member Bochun BaiOrganization: sinofool.comProject: http://sinofool.com/ ✭✭
    -O -fstrict-aliasing
    is the key problem of Buffer.cpp
  • sinofoolsinofool Member Bochun BaiOrganization: sinofool.comProject: http://sinofool.com/ ✭✭
    Backtrace

    *** glibc detected *** bin/icegridnode: realloc(): invalid next size: 0x000000000092a980 ***
    ======= Backtrace: =========
    /lib/libc.so.6[0x2ab116fae2fd]
    /lib/libc.so.6[0x2ab116fb15db]
    /lib/libc.so.6(realloc+0x127)[0x2ab116fb28f7]
    lib/libIce.so.33(_ZN11IceInternal6Buffer9Container7reserveEm+0x82)[0x2ab115d696e2]
    bin/icegridnode[0x477190]
    lib/libIce.so.33(_ZN11IceInternal11BasicStream13writeInstanceERKNS_6HandleIN3Ice6ObjectEEEi+0xcd)[0x2ab115d6ad7d]
    lib/libIce.so.33(_ZN11IceInternal11BasicStream19writePendingObjectsEv+0x203)[0x2ab115d6d793]
    bin/icegridnode[0x487179]
    bin/icegridnode[0x464d83]
    bin/icegridnode[0x4cae71]
    bin/icegridnode[0x50eed1]
    bin/icegridnode[0x50f653]
    bin/icegridnode[0x519199]
    bin/icegridnode[0x518662]
    lib/libIceUtil.so.33[0x2ab11617a6a2]
    /lib/libpthread.so.0[0x2ab116391067]
    /lib/libc.so.6(clone+0x6d)[0x2ab117003f0d]
    ======= Memory map: ========
    00400000-006b1000 r-xp 00000000 08:01 2640901 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/bin/icegridnode
    008b0000-008f8000 r--p 002b0000 08:01 2640901 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/bin/icegridnode
    008f8000-008fb000 rw-p 002f8000 08:01 2640901 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/bin/icegridnode
    008fb000-00942000 rw-p 008fb000 00:00 0 [heap]
    40000000-40001000 ---p 40000000 00:00 0
    40001000-40801000 rw-p 40001000 00:00 0
    40801000-40802000 ---p 40801000 00:00 0
    40802000-41002000 rw-p 40802000 00:00 0
    41002000-41003000 ---p 41002000 00:00 0
    41003000-41803000 rw-p 41003000 00:00 0
    41803000-41804000 ---p 41803000 00:00 0
    41804000-42004000 rw-p 41804000 00:00 0
    42004000-42005000 ---p 42004000 00:00 0
    42005000-42805000 rw-p 42005000 00:00 0
    42805000-42806000 ---p 42805000 00:00 0
    42806000-43006000 rw-p 42806000 00:00 0
    43006000-43007000 ---p 43006000 00:00 0
    43007000-43807000 rw-p 43007000 00:00 0
    43807000-43808000 ---p 43807000 00:00 0
    43808000-44008000 rw-p 43808000 00:00 0
    44008000-44009000 ---p 44008000 00:00 0
    44009000-44809000 rw-p 44009000 00:00 0
    2aaaaaad5000-2aaaaaadf000 r-xp 00000000 08:01 978021 /lib64/libnss_files-2.8.so
    2aaaaaadf000-2aaaaacde000 ---p 0000a000 08:01 978021 /lib64/libnss_files-2.8.so
    2aaaaacde000-2aaaaacdf000 r--p 00009000 08:01 978021 /lib64/libnss_files-2.8.so
    2aaaaacdf000-2aaaaace0000 rw-p 0000a000 08:01 978021 /lib64/libnss_files-2.8.so
    2aaaac000000-2aaaac021000 rw-p 2aaaac000000 00:00 0
    2aaaac021000-2aaab0000000 ---p 2aaaac021000 00:00 0
    2ab113e74000-2ab113e8f000 r-xp 00000000 08:01 977995 /lib64/ld-2.8.so
    2ab113e8f000-2ab113e91000 rw-p 2ab113e8f000 00:00 0
    2ab11408e000-2ab11408f000 r--p 0001a000 08:01 977995 /lib64/ld-2.8.so
    2ab11408f000-2ab114090000 rw-p 0001b000 08:01 977995 /lib64/ld-2.8.so
    2ab114090000-2ab1142bf000 r-xp 00000000 08:01 2640888 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceGrid.so.3.3.0
    2ab1142bf000-2ab1144be000 ---p 0022f000 08:01 2640888 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceGrid.so.3.3.0
    2ab1144be000-2ab1144fa000 r--p 0022e000 08:01 2640888 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceGrid.so.3.3.0
    2ab1144fa000-2ab1144fc000 rw-p 0026a000 08:01 2640888 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceGrid.so.3.3.0
    2ab1144fc000-2ab1144fe000 rw-p 2ab1144fc000 00:00 0
    2ab1144fe000-2ab114641000 r-xp 00000000 08:01 2640895 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceStormService.so.3.3.0
    2ab114641000-2ab114841000 ---p 00143000 08:01 2640895 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceStormService.so.3.3.0
    2ab114841000-2ab11485e000 r--p 00143000 08:01 2640895 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceStormService.so.3.3.0
    2ab11485e000-2ab114860000 rw-p 00160000 08:01 2640895 /home/bbc/code/Ice-3.3/Ice-3.3.0/cpp/lib/libIceStormService.so.3.3.0
    2ab114860000-2ab114862000 rw-p 2ab114860000 00:00 0
    2ab114862000-2ab11Aborted
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I'm unable to reproduce this problem on CentOS 4.6 with gcc 4.2.4 built from source. However, it looks like you're using a 64 bits distribution and only tried a 32 bits version. I'll check on a 64 bits distribution. I suspect this is a problem in the GCC optimizer rather than a problem with Ice. Did you try with gcc 4.3.x or/and with an earlier Linux distribution (such as RHEL 4 update 6)?

    Cheers,
    Benoit.
  • sinofoolsinofool Member Bochun BaiOrganization: sinofool.comProject: http://sinofool.com/ ✭✭
    It works!
    Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
    $ gcc -v
    Using built-in specs.
    Target: x86_64-unknown-linux-gnu
    Configured with: ../gcc-4.3.1/configure --prefix=/opt/gcc-4.3.1 --with-mpfr=/opt/mpfr-2.3.1/ --enable-languages=c,c++,java --enable-bootstrap
    Thread model: posix
    gcc version 4.3.1 (GCC)

    Thanks a lot !
Sign In or Register to comment.