aMule Forum

English => Backtraces => Topic started by: libre on October 11, 2010, 01:18:09 AM

Title: crash with recent crypto++ versions
Post by: libre on October 11, 2010, 01:18:09 AM
It's into a gentoo ~amd64 system. With recent libcrypto++ versions amule crash at startup.

This is with net-p2p/amule-10305  USE="daemon debug geoip gtk nls remote stats unicode upnp (-aqua) (-kdeenablefinal) -plasma -xchat" .

The last portage version of crypto++ that work with amule is dev-libs/crypto++-5.5.2-r1  USE="sse3".

It was already the case with older versions of amule, but I didn't get the time to make some backtrace until now.

With dev-libs/crypto++-5.6.1 (the devs removed the USE flag), I get the following:
Code: [Select]
2010-10-11 01:06:08: amuleAppCommon.cpp(329): Initialising aMule SVN compiled with wxGTK2 v2.8.11 (Snapshot: rev. 10305)
 2010-10-11 01:06:08: amuleAppCommon.cpp(375): Checking if there is an instance already running...
 2010-10-11 01:06:08: amuleAppCommon.cpp(406): No other instances are running.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff72629cf in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=16, flags=0) at cryptlib.cpp:142
142    cryptlib.cpp: Aucun fichier ou dossier de ce type.
    in cryptlib.cpp
(gdb) bt
#0  0x00007ffff72629cf in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=16, flags=0) at cryptlib.cpp:142
#1  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
#2  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
#3  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
#4  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
#5  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
#6  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
#7 ...
The same code is repeating itself I think without end. 
Code: [Select]
(gdb) bt full
#0  0x00007ffff72629cf in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=16, flags=0) at cryptlib.cpp:142
No locals.
#1  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
No locals.
#2  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
No locals.
#3  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
        xorIncrement = 0
        __PRETTY_FUNCTION__ = "virtual size_t CryptoPP::BlockTransformation::AdvancedProcessBlocks(const byte*, const byte*, byte*, size_t, CryptoPP::word32) const"
        blockSize = 16
        inIncrement = 16
        outIncrement = 16
#4  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
No locals.
#5  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
No locals.
#6  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
        xorIncrement = 0
        __PRETTY_FUNCTION__ = "virtual size_t CryptoPP::BlockTransformation::AdvancedProcessBlocks(const byte*, const byte*, byte*, size_t, CryptoPP::word32) const"
        blockSize = 16
        inIncrement = 16
        outIncrement = 16
#7 ...

Code: [Select]
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7f938e0 (LWP 1789)):
#0  0x00007ffff72629cf in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=16, flags=0) at cryptlib.cpp:142
#1  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
#2  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
#3  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
#4  0x00007ffff7357559 in CryptoPP::Rijndael::Enc::AdvancedProcessBlocks (this=0xc64670,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=<value optimized out>,
    flags=<value optimized out>) at rijndael.cpp:1237
#5  0x00007ffff7357591 in CryptoPP::Rijndael::Enc::ProcessAndXorBlock (this=0xc64678,
    inBlock=0xc45f60 "\330\"\002JK\222\004", xorBlock=0x0,
    outBlock=0xc45f60 "\330\"\002JK\222\004") at rijndael.cpp:354
#6  0x00007ffff7262b09 in CryptoPP::BlockTransformation::AdvancedProcessBlocks (this=0xc64678,
    inBlocks=0xc45f60 "\330\"\002JK\222\004", xorBlocks=0x0,
    outBlocks=0xc45f60 "\330\"\002JK\222\004", length=0, flags=<value optimized out>)
    at cryptlib.cpp:167
#7 ...

Title: Re: crash with recent crypto++ versions
Post by: Stu Redman on October 11, 2010, 10:36:48 PM
Wrong forum. Complain with the CryptoPP guys.
Or build CryptoPP without Assembler code (see its config.h).
Title: Re: crash with recent crypto++ versions
Post by: libre on October 14, 2010, 07:10:16 PM
Wrong forum. Complain with the CryptoPP guys.
Those guys are silly, I don't have the knowledge to build a test program for this bug, and they want it for a bug report!
Or build CryptoPP without Assembler code (see its config.h).
Thanks, it work.
Title: Re: crash with recent crypto++ versions
Post by: Dominique on January 08, 2011, 02:05:35 PM
It have been fixed : http://sourceforge.net/apps/trac/cryptopp/ticket/6 (http://sourceforge.net/apps/trac/cryptopp/ticket/6).
Title: Re: crash with recent crypto++ versions
Post by: Stu Redman on January 08, 2011, 04:55:26 PM
Thank you for the info!