Menu

#1 segfault on x86_64

closed
growchie
None
5
2005-04-18
2005-04-15
No

kiax-0.8.4 segfaults on x86_64 :(

OS: Mandrakelinux 10.1/10.2

Discussion

  • growchie

    growchie - 2005-04-15

    Logged In: YES
    user_id=1230249

    which package do you use? there are no official packages for
    mandrake provied by us yet.

     
  • growchie

    growchie - 2005-04-15
    • assigned_to: nobody --> velislav
     
  • Oden Eriksson

    Oden Eriksson - 2005-04-16

    Logged In: YES
    user_id=831585

    I'm the package maintainer for kiax and iaxclient, plus all the
    asterisk stuff. kiax-0.8.3 did not segfault. Ehh, these packages
    are in the Mandriva cooker contrib rep.

    And btw. Mandrakelinux has changed name to Mandriva, I
    seem to forget that fact myself...

     
  • growchie

    growchie - 2005-04-16
    • status: open --> closed
     
  • Emo

    Emo - 2005-04-16
    • status: closed --> pending
     
  • growchie

    growchie - 2005-04-16

    Logged In: YES
    user_id=1230249

    Ok. What segfaults, the binary you compile from the sources,
    or some package, downloaded from here, and paste the exact
    error pls.

     
  • Emo

    Emo - 2005-04-16

    Logged In: YES
    user_id=1223718

    Strange. Do you do the packages from source or from binaries?
    If you have managed to package 0.8.3 from source it shouldnt
    be a problem for 0.8.4 as there is no added platform
    dependency in the new version.

    Please send a log or whatever that can help to Velislav.

     
  • growchie

    growchie - 2005-04-16
    • status: pending --> open
     
  • Oden Eriksson

    Oden Eriksson - 2005-04-17

    Logged In: YES
    user_id=831585

    I tried to provide some useful stuff with strace, but the output
    didn't seem so useful to me. Please tell me how I should do to
    provide the info you want.

     
  • Oden Eriksson

    Oden Eriksson - 2005-04-17

    Logged In: YES
    user_id=831585

    OK. Maybe this will help:

    [oden@oe bin]$ gdb ./kiax
    GNU gdb 6.3-3mdk (Mandrakelinux)
    Copyright 2004 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
    "x86_64-mandrake-linux-gnu"...Using host libthread_db library
    "/lib64/tls/libthread_db.so.1".

    (gdb) run
    Starting program: /home/oden/RPM/BUILD/kiax-0.8.4/bin/kiax
    [Thread debugging using libthread_db enabled]
    [New Thread 46912547355552 (LWP 27364)]
    Sun Apr 17 19:50:57 2005 Using IAXClient ver.
    CVS-2005/04/15-16:47

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912547355552 (LWP 27364)]
    0x00002aaaabebb890 in strlen () from /lib64/tls/libc.so.6
    Current language: auto; currently c

    Furthermore I make the iaxclient code as a shared library and
    link against that using patches. But I have also built this kiax
    version using the bundled iaxclient code and get the same
    segfault. I'm no gdb expert, nor a coder.

     
  • growchie

    growchie - 2005-04-17

    Logged In: YES
    user_id=1230249

    you may try DDD. this is graphical frontedn for gdb. But
    before you could use this you should recompile the client
    with debug option. (look at the src.pro.or file in the
    ./src dir.)
    look for config += and change the firs line from release to
    debug. Try to figure out the exact point it fails. I dont
    have access to amd64 machine so it is extremely difficult
    for me to figure out the problem. I suspect that migth be
    problem with a #define we added for recompilation of the
    corresponding paths for the icons and translations.

     
  • Emo

    Emo - 2005-04-18

    Logged In: YES
    user_id=1223718

    OK, it seems really, as Velislav suggested, something
    happens in the new debug method. And as I see after applying
    the va_list macro (earlier it was rather different
    implementation). The bad thing is really we don't have any
    x86_64 machine here to test..hmm. I'll have a look and try
    to suggest something.
    Thanks.

     
  • Oden Eriksson

    Oden Eriksson - 2005-04-18

    Logged In: YES
    user_id=831585

    i can provide you with a chrooted one. mail me in private and i
    make the arrangements. mail me at oeriksson (at) mandriva
    (dot) com. join the #mandriva-cooker channel at freenode and
    we can discuss this in realtime. mail me your nick so that i know
    who you are.

    i just tried ddd, but the only thing i get is:

    [New Thread 46912547355552 (LWP 22028)]
    Mon Apr 18 13:04:16 2005 Using IAXClient ver.
    CVS-2005/04/18-12:33

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912547355552 (LWP 22028)]
    0x00002aaaabebb890 in strlen () from /lib64/tls/libc.so.6
    Current language: auto; currently c
    (gdb)

     
  • Emo

    Emo - 2005-04-18

    Logged In: YES
    user_id=1223718

    Here is a diff that refers a similar problem in
    mysql-client. The va_* macros behave on x86_64 strangely
    when there are two nested v* methods. It seems that a
    workaround shown by Sergey Kostyliov fixes this (more info:
    http://bugs.mysql.com/bug.php?id=8499\). Please try to patch
    your iaxwrapper.cpp file with this .diff and run it on
    x86_64. Hopefully it works (on 32bit there is no problem
    also so). If not, then we can try with your offer for
    chrooted acces and continue trying..

    Here is the diff:

    Index: iaxwrapper.cpp

    --- iaxwrapper.cpp (revision 275)
    +++ iaxwrapper.cpp (working copy)
    @@ -604,14 +604,16 @@
    {
    QString dateStr = QDateTime::currentDateTime().toString();
    va_list ap;
    - va_start (ap, log);
    QString finalLog;
    finalLog = dateStr +" "+ log;
    + char debug_buf[500];
    + va_start (ap, log);
    vfprintf (stderr, (const char*)finalLog, ap);
    - char debug_buf[500];
    + va_end (ap);
    + va_start (ap, log);
    vsnprintf (debug_buf, 499, (const char*)finalLog, ap);
    + va_end (ap);
    emit signalDebug(debug_buf);
    - va_end (ap);
    }

    void IaxWrapper::debugStatistics(int callNo, int callInterval)

     
  • Oden Eriksson

    Oden Eriksson - 2005-04-18

    Logged In: YES
    user_id=831585

    That worked!

     
  • Emo

    Emo - 2005-04-18
    • status: open --> closed
     

Log in to post a comment.