Bug 278163 - archivers/urbackup-server: Patch to stop Segfault using embedded cryptopp
Summary: archivers/urbackup-server: Patch to stop Segfault using embedded cryptopp
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on: 278859
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-04 10:03 UTC by ek
Modified: 2024-05-11 08:37 UTC (History)
1 user (show)

See Also:


Attachments
Embedded cryptopp patch (1.12 KB, patch)
2024-04-04 10:03 UTC, ek
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ek 2024-04-04 10:03:08 UTC
Created attachment 249700 [details]
Embedded cryptopp patch

Using the non-embedded security/cryptopp causes a segfault on FreeBSD. This is a simple patch that allows archivers/urbackup-server to run using the embedded cryptopp as suggested (https://www.truenas.com/community/threads/urbackup-client-not-starting-supposedly-for-a-outdated-jail-version.109549/)
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2024-04-04 18:52:01 UTC
Hello,

I did take a quick look at url you provide and it seems related to SIMD and I remember that it affected net-p2p/amule too.

I will search PR where we workaround SIMD crypto and get back here.
Maybe this fix could be possible without building embedded.
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2024-04-04 18:58:26 UTC
Could you take a look at:

https://cgit.freebsd.org/ports/commit/?id=4baf754027807e1ad7966055d40a4c4eb75a5717

(PR link is in commit msg)

Cheers
Comment 3 ek 2024-05-08 23:37:18 UTC
Hi Nuno,

Thank you for the info! I've submitted a new PR to update to the latest version and also updated the CXXFLAGS to fix the segfault (PR 278859) so I believe this as well as PR 266531 can be closed if PR 278859 is accepted.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-05-10 15:25:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=577ac1f839b1b164bd42af7c94a15be017b5e1d7

commit 577ac1f839b1b164bd42af7c94a15be017b5e1d7
Author:     ek <ek@purplehat.org>
AuthorDate: 2024-05-10 15:19:22 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-05-10 15:24:59 +0000

    archivers/urbackup-{client,server}: Fix segfault (cryptopp)

    - Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
      cryptopp-8.7.0 build with this option by default on i386 and amd64.
     (5a19c08: security/cryptopp: Update to 8.7.0)

    PR:             266531, 278163, 278859
    MFH:            2024Q2

 archivers/urbackup-client/Makefile | 10 +++++++++-
 archivers/urbackup-server/Makefile | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-05-10 21:20:38 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=469adf44f1c6f846ea06e4de2e5bae0e3339c7f3

commit 469adf44f1c6f846ea06e4de2e5bae0e3339c7f3
Author:     ek <ek@purplehat.org>
AuthorDate: 2024-05-10 15:19:22 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-05-10 21:11:30 +0000

    archivers/urbackup-{client,server}: Fix segfault (cryptopp)

    - Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
      cryptopp-8.7.0 build with this option by default on i386 and amd64.
     (5a19c08: security/cryptopp: Update to 8.7.0)

    PR:             266531, 278163, 278859
    MFH:            2024Q2
    (cherry picked from commit 577ac1f839b1b164bd42af7c94a15be017b5e1d7)

 archivers/urbackup-client/Makefile | 10 +++++++++-
 archivers/urbackup-server/Makefile | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)