Bug 271091 - tcp_rack KLD fails to load due to missing symbol tcp_trace_point_config
Summary: tcp_rack KLD fails to load due to missing symbol tcp_trace_point_config
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Tuexen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-27 07:18 UTC by Alexander Leidinger
Modified: 2023-05-06 09:07 UTC (History)
3 users (show)

See Also:


Attachments
kernel config file (7.35 KB, text/plain)
2023-04-27 10:19 UTC, Alexander Leidinger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Leidinger freebsd_committer freebsd_triage 2023-04-27 07:18:27 UTC
Hi,

error message when trying to load tcp_rack on -current as of Apr 26 (git describe is: vendor/tzdata/tzdata2023c-283134-ga85af9ff6b1):
    link_elf_obj: symbol tcp_trace_point_config undefined
    KLD file tcp_rack.ko - could not finalize loading

This seems to be a new dependency, as a kernel from March 20 (no change to the kernel config since then) is loading it just fine.

Bye,
Alexander.
Comment 1 Michael Tuexen freebsd_committer freebsd_triage 2023-04-27 09:21:43 UTC
Which kernel config / architecture are you using?
Comment 2 Alexander Leidinger freebsd_committer freebsd_triage 2023-04-27 09:32:40 UTC
amd64, stripped down config with a lot of stuff loaded as a module. It surely has INET, INET6 and TCPHPTS (as documented in tcp_rack(4).

Do you want to have the full kernel config?
Comment 3 Alexander Leidinger freebsd_committer freebsd_triage 2023-04-27 10:19:23 UTC
Created attachment 241787 [details]
kernel config file
Comment 4 (intentionally left blank) 2023-04-27 11:01:36 UTC
$ rg 'tcp_trace_point_config'
sys/netinet/tcp_log_buf.h
383:extern uint32_t tcp_trace_point_config;
450:	if (((tcp_trace_point_config == num)  ||
451:	    (tcp_trace_point_config == 0xffffffff)) &&

sys/netinet/tcp_log_buf.c
101:uint32_t tcp_trace_point_config = 0;
103:    &tcp_trace_point_config, TCP_LOG_STATE_HEAD_AUTO,

# rg 'tcp_log_buf.c'
conf/files
4359:netinet/tcp_log_buf.c		optional tcp_blackbox inet | tcp_blackbox inet6

(In reply to Alexander Leidinger from comment #3)

Does the module load if you add options TCP_BLACKBOX in kernel config?
Comment 5 Alexander Leidinger freebsd_committer freebsd_triage 2023-04-27 11:15:58 UTC
(In reply to throwaway_vthgwq4 from comment #4)

I expect it does (will test later).

The question is, if it is supposed to depend upon it (bug in docs), or not (bug in code).
Comment 6 Michael Tuexen freebsd_committer freebsd_triage 2023-04-27 14:34:42 UTC
The problem is that right now RACK depends on TCP_BLACKBOX. This wasn't catched via testing, since TCP_BLACKBOX is enabled in the default configs. I'll take a look.
Comment 7 Michael Tuexen freebsd_committer freebsd_triage 2023-04-27 21:16:36 UTC
The following patch fixes the issue: review D39860.
Comment 8 Alexander Leidinger freebsd_committer freebsd_triage 2023-04-28 06:14:57 UTC
I tested with TCP_BLACKBOX in the kernel config and the KLD loads.

What is the user-benefit of enabling TCP_BLACKBOX for rack?
Comment 9 Michael Tuexen freebsd_committer freebsd_triage 2023-04-28 10:57:47 UTC
(In reply to Alexander Leidinger from comment #8)
Thanks for testing.

BBLog is a logging facility for TCP (like the deprecated trpt, SIFTR, or TCP focused use of dtrace). You need a logging daemon for writing the events in .pcapng files and you can read these files with some tools.
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-05-06 09:05:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=113f56ba493037c752da15ed20eae18c9103ffa6

commit 113f56ba493037c752da15ed20eae18c9103ffa6
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-05-06 09:02:50 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-05-06 09:02:50 +0000

    tcp_rack: allow the module to be loaded without TCP_BLACKBOX

    PR:                     271091
    Reviewed by:            cc
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D39860

 sys/netinet/tcp_log_buf.h | 2 ++
 1 file changed, 2 insertions(+)