Am Thu, 6 Jun 2024 10:39:33 GMT
Sumit Saxena <ssax...@freebsd.org> schrieb:

> The branch main has been updated by ssaxena:
> 
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=8d3c3b52423f9740da424aa6dd73a20e694a9e08
> 
> commit 8d3c3b52423f9740da424aa6dd73a20e694a9e08
> Author:     Chandrakanth patil <chandrakanth.pa...@broadcom.com>
> AuthorDate: 2024-06-06 10:28:38 +0000
> Commit:     Sumit Saxena <ssax...@freebsd.org>
> CommitDate: 2024-06-06 10:39:16 +0000
> 
>     mpi3mr: Track IO per target counter during queue poll with local variable
>     
>     Reviewed by:            imp
>     Approved by:            imp
>     Differential revision:  https://reviews.freebsd.org/D44494
> ---
>  sys/dev/mpi3mr/mpi3mr_cam.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c
> index e3958ed8daf2..e00d61073d96 100644
> --- a/sys/dev/mpi3mr/mpi3mr_cam.c
> +++ b/sys/dev/mpi3mr/mpi3mr_cam.c
> @@ -1839,6 +1839,7 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc 
> *sc, U16 handle)
>  {
>       int retval = 0;
>       struct mpi3mr_target *target;
> +     unsigned int target_outstanding;
>  
>       mpi3mr_dprint(sc, MPI3MR_EVENT,
>               "Removing Device (dev_handle: %d)\n", handle);
> @@ -1856,16 +1857,17 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc 
> *sc, U16 handle)
>  
>       target->flags |= MPI3MRSAS_TARGET_INREMOVAL;
>  
> -     if (mpi3mr_atomic_read(&target->outstanding)) {
> -             mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding 
> IOs on target:
> %d"
> -                           "Poll reply queue once\n",
> mpi3mr_atomic_read(&target->outstanding),
> -                           target->per_id);
> -             mpi3mr_poll_pend_io_completions(sc);
> -             if (mpi3mr_atomic_read(&target->outstanding))
> -                     mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs 
> present on
> target: %d"
> -                                   "despite poll\n",
> mpi3mr_atomic_read(&target->outstanding),
> -                                   target->per_id);
> -     }
> +     target_outstanding = mpi3mr_atomic_read(&target->outstanding);
> +     if (target_outstanding) {
> +             mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding 
> IOs on target:
> %d "
> +                           "Poll reply queue once\n", target_outstanding,
> target->per_id);
> +             mpi3mr_poll_pend_io_completions(sc);
> +             target_outstanding = mpi3mr_atomic_read(&target->outstanding);
> +             if (target_outstanding)
> +                     target_outstanding = 
> mpi3mr_atomic_read(&target->outstanding);
> +                     mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs 
> present on
> target: %d "
> +                                   "despite poll\n", target_outstanding, 
> target->per_id);
> +     }
>  
>       if (target->exposed_to_os && !sc->reset_in_progress) {
>               mpi3mr_rescan_target(sc, target);
> 
On recent CURRENT (FreeBSD 15.0-CURRENT #6 main-n270784-d1e652bf04b: Sun Jun 16 
18:19:49 CEST
2024 amd64) "make installkernel" fails with:

[...]
--- realinstall_subdir_mpi3mr ---
install -T release -o root -g wheel -m 444   mpi3mr.ko /boot/kernel/
install -T dbg -o root -g wheel -m 444   mpi3mr.ko.debug 
/usr/lib/debug/boot/kernel/
install: /usr/lib/debug/boot/kernel/INS@QhWCmf: No such file or directory
*** [_kmodinstall] Error code 71

make[4]: stopped in /usr/src/sys/modules/mpi3mr
make[4]: 1 error
[...]

The problem occurs when diabling makeoptions DEBUG=... in kernel configuration 
and including:

# Debugging support.  Always need this:
#options    KDB         # Enable kernel debugger support.
#options    KDB_TRACE       # Print a stack trace for a panic.
# For full debugger support use (turn off in stable branch):
include "std.nodebug"


On another host with the same CURRENT and mostly same configs, the problem does 
not
occur! The differenc between both is: tha failing host hasn't been updated for 
tha last 20
days, the other one has been updated almost every day.

On the failing host, "make cleanworld" has been issued before building 
world/kernel.

/etc/src.conf is also the same on both checked hosts. GENERIC compiles flawless.



-- 
O. Hartmann

Reply via email to