Client Crash with crypto++ 8.4

Hi there,

I run a couple of gentoo machines and I use urbackup to do my backups. So far - not much of a problem until libcryptopp.so.8.4 got to my clients. The urbackupclientsrv crashed as soon as it tries to connect with the server.

Versions used:

  • app-backup/urbackup-client-2.4.11
  • dev-libs/crypto+±8.4.0

Kernel dmesg shows a nice line on every crash

[ 6511.641959] urbackupserver:[40078]: segfault at 10 ip 00007f88e5ac5315 sp 00007f88d27faec0 error 4 in libcryptopp.so.8.4.0[7f88e5999000+1e8000]
[ 6511.641973] Code: 49 8d 5f ff 48 89 5c 24 18 e9 ab fe ff ff 0f 1f 80 00 00 00 00 85 db 74 2c 49 c1 ec 02 0f 84 7a ff ff ff 66 90 48 8b 5c 24 08 <0f> 38 f0 0c 83 41 89 4c 85 00 48 ff c0 49 39 c4 75 e9 e9 5c ff ff

reverting to dev-libs/crypto+±8.2.0-r2 is a workaround to that problem. Is there anything I can do to finally solve this issue?

Same here with dev-libs/crypto+±8.4.0. Version 8.2.0 is working.

[ 3465.849258] urbackupserver:[36231]: segfault at 10 ip 00007f76f6cb0fe0 sp 00007f76d3ffded0 error 4 in libcryptopp.so.8.4.0[7f76f6b87000+1e6000]
[ 3465.849272] Code: c1 49 8b 45 00 8d 71 f8 48 c1 e9 02 4c 8d 79 ff e9 b9 fe ff ff 0f 1f 44 00 00 85 db 74 2c 49 c1 ec 02 74 8e 66 0f 1f 44 00 00 <41> 8b 0c 86 48 8b 5c 24 08 0f c9 89 0c 83 48 83 c0 01 49 39 c4 75

dev-libs/crypto+±8.5.0 seems to behave better and solves the problem on my end. Tests still in progress, but I guess that’s it.

Correction: dev-libs/crypto+±8.5.0 seems to behave better and solves the problem on one machine while the others randomly crash.

crypto+±8.5.0 is now stable in gentoo. But it’s not working. Same error as with 8.4.0.

Same problem in gentoo, with version 8.5.0 it gives an error.

urbackupsrv[13535]: segfault at 10 ip 00007f3f799bcc55 sp 00007ffeeffbcf50 error 4 in libcryptopp.so.8.5.0[7f3f79868000+217000]
Code: d0 48 8d 44 85 00 e9 3f ff ff ff 66 2e 0f 1f 84 00 00 00 00 00 85 db 74 64 49 c1 ec 02 74 a6 66 0f 1f 44 00 00 48 8b 5c 24 08 <0f> 38 f0 0c 83 41 89 4c 85 00 48 ff c0 49 39 c4 75 e9 eb 87 0f 1f

I have run it with debug:

Starting program: /usr/sbin/urbackupclientbackend
[New LWP 38364]
[New LWP 38365]
2021-06-30 18:41:14: SQLite: recovered 24 frames from WAL file /var/urbackup/backup_client.db-wal code: 283
[New LWP 38366]
2021-06-30 18:41:14: ERROR: urbackupserver: Creating v6 SOCKET failed
2021-06-30 18:41:14: urbackupserver: Server started up successfully!
[New LWP 38368]
[New LWP 38369]
2021-06-30 18:41:14: ERROR: FileSrv: Failed setting SO_REUSEADDR in CUDPThread::CUDPThread
2021-06-30 18:41:14: ERROR: Binding ipv6 UDP socket to port 35622 failed
2021-06-30 18:41:14: FileSrv: Servername: -vpn.dmz.degetz.hu-
[New LWP 38372]
[New LWP 38373]
[New LWP 38374]
2021-06-30 18:41:14: Started UrBackupClient Backend…
[New LWP 38375]
2021-06-30 18:41:15: Looking for old Sessions… 0 sessions
[New LWP 38383]

Thread 11 “urbackupserver:” received signal SIGSEGV, Segmentation fault.
[Switching to LWP 38383]
0x00007ffff7e1a722 in CryptoPP::SHA256::InitState(unsigned int*) () from /usr/lib/libcryptopp.so.8

This happens with crypto++ 8.4 and 8.5

That sounds like the port is already in use; Can you check that?

I don’t have ipv6 on the interface hence the error.

I’m giving up - I’m done with it. Last rites for me: reporting it into the bug tracker as it seems the devs do not read the forums.

The only version of crypto++ in gentoo is now 8.6.0. This version is not working on my laptop.

I added an new useflag (system-cryptopp) to my ebuild (dsiggis-gentoo-overlay/urbackup-client-2.4.11.ebuild at master · dsiggi/dsiggis-gentoo-overlay · GitHub). So I can build the client now with the embedded crypto++ libs.