Summary: | net-p2p/amule-2.2.6 segfaults with dev-libs/crypto++-2.6.0-r1 and USE=-sse3 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Bowler <nbowler> |
Component: | Current packages | Assignee: | Gentoo net-p2p team <net-p2p> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bent, boltomli, crypto+disabled, francoisvalenduc, kirin.yuri, mstrobl2, optiluca, stefano.priore, thomas, tommaso.pasini |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch for dev-libs/crypto++ to compile without sse3 |
Description
Nick Bowler
2010-03-22 19:57:42 UTC
I have the same here, net-p2p/amule-2.2.6, dev-libs/crypto++-5.6.0-r1 and P4 SMP CPU with flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr error message: amule[15156]: segfault at b75c4ff4 ip b74c0dbf sp bfee4e68 error 7 in libcrypto++.so.0.0.0[b71a5000+3e8000] Setting USE flag sse3 solves problem with amule on this non-SSE3 CPU. Strange. I got the same thing. Just mask amule-2.2.6 and crypto++-5.6.0-r1. Created attachment 225099 [details, diff]
Patch for dev-libs/crypto++ to compile without sse3
This is patch for dev-libs/crypto++ to compile on computers without sse3.
Amule works fine with new library.
(In reply to comment #3) > Created an attachment (id=225099) [details] > Patch for dev-libs/crypto++ to compile without sse3 > > This is patch for dev-libs/crypto++ to compile on computers without sse3. > Amule works fine with new library. > With patch it is ok ;) With the patch, it works for me too. Earlier versions also have this problem. That patch what does is pass -DCRYPTOPP_DISABLE_SSE3 instead of -DCRYPTOPP_DISABLE_SSE2. However -DCRYPTOPP_DISABLE_SSE3 does nothing while DISABLE_SSE2 does... So its not a proper fix... You are right. There is no -DCRYPTOPP_DISABLE_SSE3 in the cryptopp source code. Is it correct to just remove -DCRYPTOPP_DISABLE_SSE2 option for systems without sse3? (In reply to comment #1) > Setting USE flag sse3 solves problem with amule on this non-SSE3 CPU. Strange. Indeed, amule segfaulted if crypto++ was built with -sse3 and enabling it (on this also non-SSE3 CPU) corrected the problem. Do I interpret that "use sse3" line in crypto++-5.6.0-r1.ebuild correctly, if I understand it meaning "if sse3 is NOT used, then disable sse2" (note numbers)? I'd say, thoose two things are not really related in that way and should be changed to "if sse2 is not used, then disable sse2" (which in ebuild format is use sse2 || append-flags -DCRYPTOPP_DISABLE_SSE2 plus IUSE="sse2" )). That would raise a new problem, though: My CPU has sse2-support, so enabling (this new) sse2 would leave sse2 on in crypto++ and thus, would result in crashing amule. ...returning to initial square. (In reply to comment #8) > That would raise a new problem, though: My CPU has sse2-support, so enabling > (this new) sse2 would leave sse2 on in crypto++ and thus, would result in > crashing amule. ...returning to initial square. I meant of course, that +sse2 would work, but -sse2 would not which is weird. I might later take a look of some things including the meaning of *_DISABLE_SSE2. I have a pentium3 machine, which means that it doesn't support neither sse3 nor sse2; the segfault happened. Downgrading to crypto++-5.5.2-r1 (rebuilding amule afterwards) fixed it. I still have a problem where amuled freezes on first start and I have to kill it and restart it, but I still have to figure out why, and that should go on a separate bug. *** Bug 314695 has been marked as a duplicate of this bug. *** The sse2 use flag was turned into sse3 because of this bug http://bugs.gentoo.org/show_bug.cgi?id=314695, the reporter was using system without sse3, probably it was bug now the only file that uses that instruction (panama.cpp) correctly uses #if CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE to compile only if available. On my system without sse2 or sse3 compiles fine, probably the flag should be renamed back as sse2 and a new flag sse3 added. Sorry I wrote it in a hurry, I retry in english: The sse2 use flag was turned into sse3 because of this bug http://bugs.gentoo.org/show_bug.cgi?id=314695, the reporter was using a system without sse3, probably it was a bug in crypto++ that was later fixed: the only file that uses palignr (panama.cpp) correctly uses #if CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE to use sse3 instructions only if available. On my system without sse3 support and with with USE=sse3 compiles fine, probably the flag should be renamed back as sse2 and a new flag sse3 added that removes -DCRYPTOPP_DISABLE_SSSE3 "sse3" USE flag in dev-libs/crypto++-5.6.0-r1 has been deleted. This may be fixed for some but amule still will mot run for me on my athlon xp. The GUI doesn't appear and no error messages. Prior to the migration to crypto++-5.6.0-r1 I ran v2.2.6 and the svn snapshots with no problems. Currently amule pulls crypto++-5.6.0-r1 as a dependency making it impossible to test functionality with previous versions of crypto++ so I'm trying amule v2.2.5 with crypto++-5.5.2 |