[OpenAFS-devel] OpenAFS on FreeBSD 14.1

Ben Huntsman ben@huntsmans.net
Tue, 5 Nov 2024 16:24:29 +0000


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

Hi there!
   Thanks for the reply!

> Getting the debug build working might be more fruitful than starting at a
coarse-grained backtrace or debug-via-printf.

I'm looking into this.  On FreeBSD 14.1, we have both gcc 13.3.0 and clang =
18.1.5 installed.  If we just run ./configure, it selects gcc by default.  =
Building with gcc compiles with a few changes, but throws all those CTF err=
ors.   building with clang breaks on this:

src/rx/rx_packet.c:1770:13: error: passing arguments to a function without =
a prototype is deprecated in all versions of C and is not supported in C23 =
[-Werror,-Wdeprecated-non-prototype]
 1770 |     (*free) (amb);
      |             ^

Going back to the gcc build, I used the following configure options:

--enable-transarc-paths --enable-kauth --enable-debug --enable-debug-kernel=
 --enable-debug-locks --enable-debug-lwp

However, something doesn't look right in the kernel module.  Shouldn't ther=
e be more than this:

 objdump --syms /usr/vice/etc/libafs.ko | grep debug
00000000000006c8 l     O .bss 0000000000000008 debugvc
000000000025c9f8 l     O .bss 0000000000000004 debugsetsp
000000000025a7c0 l     O .bss 0000000000000008 rx_tq_debug
0000000000000000 l    d  .gnu_debuglink 0000000000000000 .gnu_debuglink


When I run kgdb during the startup messages it prints this:

Reading symbols from /usr/vice/etc/libafs.ko...
(No debugging symbols found in /usr/vice/etc/libafs.ko)

Any idea how to actually enable debugging info on the kernel module?

Many thanks!

-Ben


--_000_BYAPR07MB587925318E74E3C52D6EB246A7522BYAPR07MB5879namp_
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;Thanks for the reply!</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);">
&gt; Getting the debug build working might be more fruitful than starting a=
t a<br>
coarse-grained backtrace or debug-via-printf.</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);">
I'm looking into this.&nbsp; On FreeBSD 14.1, we have both gcc 13.3.0 and c=
lang 18.1.5 installed.&nbsp; If we just run ./configure, it selects gcc by =
default.&nbsp; Building with gcc compiles with a few changes, but throws al=
l those CTF errors.&nbsp; &nbsp;building with clang breaks
 on this:</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);">
src/rx/rx_packet.c:1770:13: error: passing arguments to a function without =
a prototype is deprecated in all versions of C and is not supported in C23 =
[-Werror,-Wdeprecated-non-prototype]</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
&nbsp;1770 | &nbsp; &nbsp; (*free) (amb);</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; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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);">
Going back to the gcc build, I used the following configure options:<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);">
--enable-transarc-paths --enable-kauth --enable-debug --enable-debug-kernel=
 --enable-debug-locks --enable-debug-lwp</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);">
However, something doesn't look right in the kernel module.&nbsp; Shouldn't=
 there be more than this:</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);">
&nbsp;objdump --syms /usr/vice/etc/libafs.ko | grep debug</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);">
00000000000006c8 l &nbsp; &nbsp; O .bss 0000000000000008 debugvc</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);">
000000000025c9f8 l &nbsp; &nbsp; O .bss 0000000000000004 debugsetsp</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);">
000000000025a7c0 l &nbsp; &nbsp; O .bss 0000000000000008 rx_tq_debug</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);">
0000000000000000 l&nbsp; &nbsp; d&nbsp; .gnu_debuglink 0000000000000000 .gn=
u_debuglink</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"font-family: Aptos, Aptos_EmbeddedFo=
nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c=
olor: rgb(0, 0, 0);">
When I run kgdb during the startup messages it prints this:</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);">
Reading symbols from /usr/vice/etc/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);">
(No debugging symbols found in /usr/vice/etc/libafs.ko)</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);">
Any idea how to actually enable debugging info on the kernel module?</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);">
Many thanks!</div>
<div id=3D"appendonsend"></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);">
-Ben</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>
</body>
</html>

--_000_BYAPR07MB587925318E74E3C52D6EB246A7522BYAPR07MB5879namp_--