diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2025-10-10 23:29:25 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2025-10-10 23:29:25 +0000 |
| commit | 7a289fe3cd5c6de7ddbe394b7700b20b0bafdb3e (patch) | |
| tree | 26b76764e40e75f4a61d41e3f3c11a4481af4146 | |
| parent | 9934558460e4e73e5b55648c4b13a702f4f019d7 (diff) | |
rpc.tlsservd.c: Pin max threads at 1 for now
PR#289734 reports a crash in tcp_use_close() when the rpc.tlsservd
daemon is being used. Although I have no, as yet, had time to track
down/fix the race, it turns out setting rpctls_maxthreads to 1
avoids the problem.
This patch pins rpctls_maxthreads to 1 to avoid the problem,
until there is a proper fix.
PR: 289734
MFC after: 3 days
| -rw-r--r-- | usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c index f07385a2baa7..fb0501b2db4c 100644 --- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c +++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c @@ -168,7 +168,12 @@ main(int argc, char **argv) rpctls_verbose = false; ncpu = (u_int)sysconf(_SC_NPROCESSORS_ONLN); +#ifdef notnow rpctls_maxthreads = ncpu > 1 ? ncpu / 2 : 1; +#else + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; +#endif while ((ch = getopt_long(argc, argv, "2C:D:dhl:N:n:mp:r:uvWw", longopts, NULL)) != -1) { @@ -199,6 +204,8 @@ main(int argc, char **argv) if (rpctls_maxthreads < 1 || rpctls_maxthreads > ncpu) errx(1, "maximum threads must be between 1 and " "number of CPUs (%d)", ncpu); + /* XXX For now, until fixed properly!! */ + rpctls_maxthreads = 1; break; case 'n': hostname[0] = '@'; |
