[OpenAFS-devel] OpenAFS on FreeBSD 14.1

Ben Huntsman ben@huntsmans.net
Mon, 4 Nov 2024 18:00:00 +0000


--_000_BYAPR07MB587986BFAC90590D3D5AE6FFA7512BYAPR07MB5879namp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there!
   Has anyone looked at getting OpenAFS working on FreeBSD 14.1 lately?  Th=
ey've changed a bunch of stuff.  I managed to get it to compile, and I can =
load the kernel module and start bosserver, but as soon as I run bos setcel=
l, I get a kernel panic.  In fact, any command which takes a -server argume=
nt causes a panic.

   Here's a backtrace from a dump:

First of all, the stack backtrace while starting kgdb:

...
KDB: stack backtrace:
#0 0xffffffff80b7fbfd at kdb_backtrace+0x5d
#1 0xffffffff80b32961 at vpanic+0x131
#2 0xffffffff80b32823 at panic+0x43
#3 0xffffffff80fff91b at trap_fatal+0x40b
#4 0xffffffff80fff966 at trap_pfault+0x46
#5 0xffffffff80fd6a48 at calltrap+0x8
#6 0xffffffff832e3dfb at afs_syscall_call+0x1627
#7 0xffffffff832485c3 at afs3_syscall+0x89
#8 0xffffffff8100073b at amd64_syscall+0x67b
#9 0xffffffff80fd735b at fast_syscall_common+0xf8
...

And the backtrace:

(kgdb) backtrace
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
#1  doadump (textdump=3D<optimized out>) at /usr/src/sys/kern/kern_shutdown=
.c:405
#2  0xffffffff80b324f7 in kern_reboot (howto=3D260) at /usr/src/sys/kern/ke=
rn_shutdown.c:523
#3  0xffffffff80b329ce in vpanic (fmt=3D0xffffffff8115edb8 "%s", ap=3Dap@en=
try=3D0xfffffe005d6dfa10)
    at /usr/src/sys/kern/kern_shutdown.c:967
#4  0xffffffff80b32823 in panic (fmt=3D<unavailable>) at /usr/src/sys/kern/=
kern_shutdown.c:891
#5  0xffffffff80fff91b in trap_fatal (frame=3D0xfffffe005d6dfaf0, eva=3D200=
) at /usr/src/sys/amd64/amd64/trap.c:952
#6  0xffffffff80fff966 in trap_pfault (frame=3D<unavailable>, usermode=3Dfa=
lse, signo=3D<optimized out>,
    ucode=3D<optimized out>) at /usr/src/sys/amd64/amd64/trap.c:760
#7  <signal handler called>
#8  0xffffffff832bb1d3 in rxi_FindIfnet () from /usr/vice/etc/libafs.ko
#9  0x0000000000000000 in ?? ()


rxi_FindIfnet  is in src/rx/rx_kcommon.c.  One thing that I noticed that ju=
mps out at me is that on FreeBSD, the code calls CURVNET_SET.  This same ca=
ll and some similar ones are also present in a section of src/afs/afs_serve=
r.c that needed some changes due to removed calls in FreeBSD 14.1.

However, I'm much less familiar with FreeBSD than I am with AIX, so I would=
 appreciate a pointer if I'm looking in the right direction or this is a re=
d herring.

Debugging on this version of FreeBSD is also made more difficult as trying =
to build the OpenAFS tree with debug enabled results in many errors similar=
 to this:

usr/bin/ctfconvert -g -l openafs .libs/camellia.o ERROR: ctfconvert: rc =3D=
 1 Unsupported version [_dwarf_info_load(229)]


As always, many thanks in advance for any tips/pointers!

-Ben


--_000_BYAPR07MB587986BFAC90590D3D5AE6FFA7512BYAPR07MB5879namp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
Hi there!</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
&nbsp; &nbsp;Has anyone looked at getting OpenAFS working on FreeBSD 14.1 l=
ately?&nbsp; They've changed a bunch of stuff.&nbsp; I managed to get it to=
 compile, and I can load the kernel module and start bosserver, but as soon=
 as I run bos setcell, I get a kernel panic.&nbsp; In fact,
 any command which takes a -server argument causes a panic.</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
&nbsp; &nbsp;Here's a backtrace from a dump:</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
First of all, the stack backtrace while starting kgdb:</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
...</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
KDB: stack backtrace:</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#0 0xffffffff80b7fbfd at kdb_backtrace+0x5d</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#1 0xffffffff80b32961 at vpanic+0x131</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#2 0xffffffff80b32823 at panic+0x43</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#3 0xffffffff80fff91b at trap_fatal+0x40b</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#4 0xffffffff80fff966 at trap_pfault+0x46</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#5 0xffffffff80fd6a48 at calltrap+0x8</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#6 0xffffffff832e3dfb at afs_syscall_call+0x1627</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#7 0xffffffff832485c3 at afs3_syscall+0x89</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#8 0xffffffff8100073b at amd64_syscall+0x67b</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#9 0xffffffff80fd735b at fast_syscall_common+0xf8</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
...</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
And the backtrace:</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(kgdb) backtrace</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#0&nbsp; __curthread&nbsp;() at /usr/src/sys/amd64/include/pcpu_aux.h:57</d=
iv>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#1&nbsp; doadump&nbsp;(textdump=3D&lt;optimized out&gt;) at /usr/src/sys/ke=
rn/kern_shutdown.c:405</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#2&nbsp; 0xffffffff80b324f7&nbsp;in kern_reboot&nbsp;(howto=3D260) at /usr/=
src/sys/kern/kern_shutdown.c:523</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#3&nbsp; 0xffffffff80b329ce&nbsp;in vpanic&nbsp;(fmt=3D0xffffffff8115edb8 &=
quot;%s&quot;, ap=3Dap@entry=3D0xfffffe005d6dfa10)</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
&nbsp; &nbsp; at /usr/src/sys/kern/kern_shutdown.c:967</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#4&nbsp; 0xffffffff80b32823&nbsp;in panic&nbsp;(fmt=3D&lt;unavailable&gt;) =
at /usr/src/sys/kern/kern_shutdown.c:891</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#5&nbsp; 0xffffffff80fff91b&nbsp;in trap_fatal&nbsp;(frame=3D0xfffffe005d6d=
faf0, eva=3D200) at /usr/src/sys/amd64/amd64/trap.c:952</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#6&nbsp; 0xffffffff80fff966&nbsp;in trap_pfault&nbsp;(frame=3D&lt;unavailab=
le&gt;, usermode=3Dfalse, signo=3D&lt;optimized out&gt;,&nbsp;</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
&nbsp; &nbsp; ucode=3D&lt;optimized out&gt;) at /usr/src/sys/amd64/amd64/tr=
ap.c:760</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#7&nbsp; &lt;signal handler called&gt;</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#8&nbsp; 0xffffffff832bb1d3&nbsp;in rxi_FindIfnet&nbsp;() from /usr/vice/et=
c/libafs.ko</div>
<div style=3D"line-height: normal; margin: 0px; font-family: Aptos, Aptos_E=
mbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
#9&nbsp; 0x0000000000000000&nbsp;in ??&nbsp;()</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
rxi_FindIfnet&nbsp; is in src/rx/rx_kcommon.c.&nbsp; One thing that I notic=
ed that jumps out at me is that on FreeBSD, the code calls CURVNET_SET.&nbs=
p; This same call and some similar ones are also present in a section of sr=
c/afs/afs_server.c that needed some changes due
 to removed calls in FreeBSD 14.1.</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
However, I'm much less familiar with FreeBSD than I am with AIX, so I would=
 appreciate a pointer if I'm looking in the right&nbsp;direction or this is=
 a red herring.</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Debugging on this version of FreeBSD is also made more difficult as trying =
to build the OpenAFS tree with debug enabled results in many errors similar=
 to this:<br>
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
usr/bin/ctfconvert -g -l openafs .libs/camellia.o ERROR: ctfconvert: rc =3D=
 1 Unsupported version [_dwarf_info_load(229)]</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
As always, many thanks in advance for any tips/pointers!</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-Ben</div>
<div class=3D"elementToProof" style=3D"line-height: normal; margin: 0px; fo=
nt-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helveti=
ca, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>

--_000_BYAPR07MB587986BFAC90590D3D5AE6FFA7512BYAPR07MB5879namp_--