Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Feb 2021 22:46:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        scsi@FreeBSD.org
Subject:   [Bug 240145] [smartpqi][zfs] kernel panic with hanging vdev
Message-ID:  <bug-240145-5313-FdVSwBOrZY@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-240145-5313@https.bugs.freebsd.org/bugzilla/>
References:  <bug-240145-5313@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240145

--- Comment #14 from rainer@ultra-secure.de ---
OK,

so I realized I can compile this anywhere, not just on my server.

This is what I did:

 - take a FreeBSD 12.2-RELEASE-p3 install
 - download src.txz, extract
 - freebsd-update fetch && freebsd-update install
 - cd /usr/src
 - patch -p 0 < /root/D24428.diff
 - make buildkernel && make installkernel


this is what I get:

cc -target x86_64-unknown-freebsd12.2
--sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasin=
g=20
-g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu=
de
opt_global.h -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-poin=
ter
-MD  -MF.depend.nehemiah.o -MTnehemiah.o
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/amd64/include
-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mcmodel=3Dkernel -mn=
o-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestand=
ing
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-comp=
are
-Wno-error-empty-body -Wno-error-parentheses-equality
-Wno-error-unused-function -Wno-error-pointer-sign
-Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes
-mno-avx  -std=3Diso9899:1999 -Werror  /usr/src/sys/dev/random/nehemiah.c
ctfconvert -L VERSION -g nehemiah.o
cc -target x86_64-unknown-freebsd12.2
--sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasin=
g=20
-g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu=
de
opt_global.h -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-poin=
ter
-MD  -MF.depend.smartpqi_cam.o -MTsmartpqi_cam.o
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/amd64/include
-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mcmodel=3Dkernel -mn=
o-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestand=
ing
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-comp=
are
-Wno-error-empty-body -Wno-error-parentheses-equality
-Wno-error-unused-function -Wno-error-pointer-sign
-Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes
-mno-avx  -std=3Diso9899:1999 -Werror  /usr/src/sys/dev/smartpqi/smartpqi_c=
am.c
In file included from /usr/src/sys/dev/smartpqi/smartpqi_cam.c:34:
In file included from /usr/src/sys/dev/smartpqi/smartpqi_includes.h:86:
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:973:27: error: redefinition of
typedef 'OS_ATOMIC64_T' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef volatile uint64_t OS_ATOMIC64_T;
                          ^
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:825:33: note: previous definit=
ion
is here
typedef volatile uint64_t       OS_ATOMIC64_T;
                                ^
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:975:9: error: 'OS_ATOMIC64_REA=
D'
macro redefined [-Werror,-Wmacro-redefined]
#define OS_ATOMIC64_READ(_softs, target)=20=20=20=20=20=20=20
atomic_load_acq_64(&(_softs)->target)
        ^
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:826:9: note: previous definiti=
on
is here
#define OS_ATOMIC64_READ(p)     atomic_load_acq_64(p)
        ^
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:976:9: error: 'OS_ATOMIC64_INC'
macro redefined [-Werror,-Wmacro-redefined]
#define OS_ATOMIC64_INC(_softs, target)=20=20=20=20=20=20=20=20
atomic_add_64(&(_softs)->target, 1)
        ^
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:831:9: note: previous definiti=
on
is here
#define OS_ATOMIC64_INC(p)      (atomic_fetchadd_64(p, 1) + 1)
        ^
/usr/src/sys/dev/smartpqi/smartpqi_cam.c:619:4: error: use of undeclared
identifier 'bsd_status'
                        bsd_status =3D EIO;
                        ^
/usr/src/sys/dev/smartpqi/smartpqi_cam.c:623:31: error: use of undeclared
identifier 'bsd_status'; did you mean 'dumpstatus'?
        DBG_FUNC("OUT error =3D %d\n", bsd_status);
                                     ^~~~~~~~~~
                                     dumpstatus
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:1083:58: note: expanded from m=
acro
'DBG_FUNC'
                                printf("[FUNC]:[ %s ] [ %d
]"fmt,__func__,__LINE__,##args);                     \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
     ^
/usr/src/sys/sys/systm.h:217:5: note: 'dumpstatus' declared here
int     dumpstatus(vm_offset_t addr, off_t count);
        ^
/usr/src/sys/dev/smartpqi/smartpqi_cam.c:623:31: error: format specifies ty=
pe
'int' but the argument has type 'int (*)(vm_offset_t, off_t)' (aka 'int
(*)(unsigned long, long)')
      [-Werror,-Wformat]
        DBG_FUNC("OUT error =3D %d\n", bsd_status);
                              ~~     ^~~~~~~~~~
/usr/src/sys/dev/smartpqi/smartpqi_defines.h:1083:58: note: expanded from m=
acro
'DBG_FUNC'
                                printf("[FUNC]:[ %s ] [ %d
]"fmt,__func__,__LINE__,##args);                     \
                                                             ~~~=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
     ^~~~
/usr/src/sys/dev/smartpqi/smartpqi_cam.c:625:9: error: use of undeclared
identifier 'bsd_status'; did you mean 'dumpstatus'?
        return bsd_status;
               ^~~~~~~~~~
               dumpstatus
/usr/src/sys/sys/systm.h:217:5: note: 'dumpstatus' declared here
int     dumpstatus(vm_offset_t addr, off_t count);
        ^
/usr/src/sys/dev/smartpqi/smartpqi_cam.c:625:9: error: incompatible pointer=
 to
integer conversion returning 'int (vm_offset_t, off_t)' (aka 'int (unsigned
long, long)') from a function
      with result type 'int' [-Werror,-Wint-conversion]
        return bsd_status;
               ^~~~~~~~~~
8 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/GENERIC
*** Error code 1
*** Error code 1


Unfortunately, I have no idea how to fix this.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240145-5313-FdVSwBOrZY>