Bug 266568 - net/relayd: Link order causes random crashes
Summary: net/relayd: Link order causes random crashes
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-23 16:09 UTC by Mark Johnston
Modified: 2024-01-21 23:37 UTC (History)
2 users (show)

See Also:
koue: maintainer-feedback+
eduardo: merge-quarterly?


Attachments
relayd-5.5.20140810_9 v0 (887 bytes, patch)
2022-10-08 19:04 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnston freebsd_committer freebsd_triage 2022-09-23 16:09:58 UTC
Right now the net/relayd port always statically links libressl.  This is a problem because relayd also links libmd, and this weird combination of dynamically linked libmd and statically linked libcrypto means that libmd provides the implementations of hash functions used by LibreSSL.  Problem is, they're not quite compatible.

I wrote a patch for the upstream port, but because net/relayd is causing problems by statically linking libressl, it might be more correct to fix it here.  Some more details here: https://github.com/markjdb/relayd/commit/7372b73f645418c81c5c4ec88d877dbdca9e52c2

Basically, net/relayd should also move "-lmd" to the end of the LDADD line.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-07 19:31:01 UTC
(In reply to Mark Johnston from comment #0)

Hello Mark,

There is no pull request for that change at https://github.com/mmatuska/relayd

Should we patch port from your fork?

Thanks
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2022-10-08 15:37:06 UTC
(In reply to Nuno Teixeira from comment #1)
Yes please.  A user tested the patch last week and reported that it fixed crashes that they were seeing.  Let me know if I should do anything.
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-08 19:04:43 UTC
Created attachment 237159 [details]
relayd-5.5.20140810_9 v0

fails to build:

logs: https://people.freebsd.org/~eduardo/logs/relayd/

Any clues? I don't know if more changes were made in 5.5.20140810 tag.
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2022-10-08 19:06:57 UTC
(In reply to Nuno Teixeira from comment #3)
Is the error caused by my patch?  That's surprising, I don't have any idea offhand.  I've been testing a port of relayd that is more up to date with respect to OpenBSD: https://github.com/swills/relayd
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-08 19:27:42 UTC
(In reply to Mark Johnston from comment #4)

You are right, there's something wrong with port because it doesn't build at portrevision 8 but there is pkgs available so it seems that some dependency is causing this break.

I've uploaded logs.
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-16 17:53:42 UTC
Don't know what to do here, back to pool.
Comment 7 Nikola Kolev 2024-01-21 21:57:02 UTC
I believe the ticket could be closed as obsolete. net/relayd has new maintainer and newer version.
Comment 8 Mark Johnston freebsd_committer freebsd_triage 2024-01-21 23:37:15 UTC
Yes, this problem is fixed in the updated version.