Archived

This forum has been archived. Please start a new discussion on GitHub.

core problem

Hi,there

I have a problem about icepatch2server ,when I run it in my program ,it always generate a core file .

I use it like this :
string patch = "icepatch2server --daemon --IcePatch2.Directory=/usr/local/uploadfiles/host_install --IcePatch2.Endpoints=tcp -p 9999";
system(patch.c_str())

gdb it shows :
warning: core file may not match specified executable file.
Failed to read a valid object file image from memory.
Core was generated by `icepatch2server --daemon --IcePatch2.Directory=/usr/local/uploadfiles/host_inst'.
Program terminated with signal 6, Aborted.

do u have any solutions ?

thank you !

cheers,
Sober

Comments

  • matthew
    matthew NL, Canada
    Does icepatch2server run if you run it directly from the command line?
  • datail

    Hi,

    Yes it surely run . And it still works in program ,the question is that everytime I run it ,it will generate a core file which is a trouble .

    Can you give some advice or it is a bug?

    cheers,
    Sober
  • matthew
    matthew NL, Canada
    Sorry, I don't understand.

    - When run directly from the command line does icepatch2server run correctly, or dump a core file?

    - When run from your application (using system) does icepatch2server run correctly, or dump a core file?
  • sorry

    Hi,

    Sorry about it . I did it again just now. And it indeed dump a core file when using command line .

    after calculate , I then use
    icepatch2server --IcePatch2.Endpoints="tcp -p 8888" .

    in another windows I killall icepatch2server ,and it dump the core file .

    I doubt I shouldn't use killall ,but how can I stop it ?

    thank you !
  • benoit
    benoit Rennes, France
    Using killall to stop the IcePatch2 server is fine. Can you post the stack trace from the core dump using gdb? The following commands should provide this information:
    $ gdb icepatch2server core.<pid>
    gdb> thread apply all bt
    

    Cheers,
    Benoit.
  • Hi

    Hi,

    When I first run , it runs correctly ,then I run again , I got core file.
    gdb icepatch2server core.28578
    GNU gdb Red Hat Linux (6.5-8.fc6rh)
    Copyright (C) 2006 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)
    Using host libthread_db library "/lib/libthread_db.so.1".


    warning: Can't read pathname for load map: Input/output error.
    Reading symbols from /opt/Ice-3.3b/lib/libIcePatch2.so.33b...(no debugging symbols found)...done.
    Loaded symbols for /opt/Ice/lib/libIcePatch2.so.33b
    Reading symbols from /opt/Ice-3.3b/lib/libIce.so.33b...(no debugging symbols found)...done.
    Loaded symbols for /opt/Ice/lib/libIce.so.33b
    Reading symbols from /opt/Ice-3.3b/lib/libIceUtil.so.33b...(no debugging symbols found)...done.
    Loaded symbols for /opt/Ice/lib/libIceUtil.so.33b
    Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
    Loaded symbols for /lib/libpthread.so.0
    Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib/librt.so.1
    Reading symbols from /usr/lib/libstdc++.so.6...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libstdc++.so.6
    Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib/libm.so.6
    Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib/libgcc_s.so.1
    Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /lib/libssl.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib/libssl.so.6
    Reading symbols from /lib/libcrypto.so.6...
    (no debugging symbols found)...done.
    Loaded symbols for /lib/libcrypto.so.6
    Reading symbols from /usr/lib/libbz2.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libbz2.so.1
    Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib/libdl.so.2
    Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib/ld-linux.so.2
    Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libgssapi_krb5.so.2
    Reading symbols from /usr/lib/libkrb5.so.3...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libkrb5.so.3
    Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib/libcom_err.so.2
    Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libk5crypto.so.3
    Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib/libresolv.so.2
    Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libz.so.1
    Reading symbols from /usr/lib/libkrb5support.so.0...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libkrb5support.so.0
    Failed to read a valid object file image from memory.
    Core was generated by `icepatch2server --daemon --IcePatch2.Directory=/usr/local/uploadfiles/host_inst'.
    Program terminated with signal 6, Aborted.
    #0 0x00e42402 in ?? ()
    (gdb) bt
    #0 0x00e42402 in ?? ()
    #1 0x4225bd40 in raise () from /lib/libc.so.6
    #2 0x4225d591 in abort () from /lib/libc.so.6
    #3 0x4229118b in __libc_message () from /lib/libc.so.6
    #4 0x42298efd in _int_free () from /lib/libc.so.6
    #5 0x4229c550 in free () from /lib/libc.so.6
    #6 0x433c8871 in operator delete () from /usr/lib/libstdc++.so.6
    #7 0x433c88cd in operator delete[] () from /usr/lib/libstdc++.so.6
    #8 0x002015ff in IceUtilInternal::ArgVector::~ArgVector () from /opt/Ice/lib/libIceUtil.so.33b
    #9 0x006550d7 in Ice::Service::main () from /opt/Ice/lib/libIce.so.33b
    #10 0x0804cb08 in main ()
    (gdb) thread apply all bt

    Thread 2 (process 28579):
    #0 0x00e42402 in ?? ()
    #1 0x423adebe in do_sigwait () from /lib/libpthread.so.0
    #2 0x423adf5f in sigwait () from /lib/libpthread.so.0
    #3 0x002035db in sigwaitThread () from /opt/Ice/lib/libIceUtil.so.33b
    #4 0x423a63db in start_thread () from /lib/libpthread.so.0
    #5 0x4230006e in clone () from /lib/libc.so.6

    Thread 1 (process 28578):
    #0 0x00e42402 in ?? ()
    #1 0x4225bd40 in raise () from /lib/libc.so.6
    #2 0x4225d591 in abort () from /lib/libc.so.6
    #3 0x4229118b in __libc_message () from /lib/libc.so.6
    #4 0x42298efd in _int_free () from /lib/libc.so.6
    #5 0x4229c550 in free () from /lib/libc.so.6
    #6 0x433c8871 in operator delete () from /usr/lib/libstdc++.so.6
    #7 0x433c88cd in operator delete[] () from /usr/lib/libstdc++.so.6
    #8 0x002015ff in IceUtilInternal::ArgVector::~ArgVector () from /opt/Ice/lib/libIceUtil.so.33b
    #9 0x006550d7 in Ice::Service::main () from /opt/Ice/lib/libIce.so.33b
    #10 0x0804cb08 in main ()
    (gdb)
    thank you for help.
  • benoit
    benoit Rennes, France
    It looks like a bug, thanks for reporting this! We'll have a closer look at it.

    Cheers,
    Benoit.