Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.18 compat] 5.18-rc6 won't configure build #13463

Closed
ckane opened this issue May 15, 2022 · 6 comments · Fixed by #13465
Closed

[5.18 compat] 5.18-rc6 won't configure build #13463

ckane opened this issue May 15, 2022 · 6 comments · Fixed by #13465
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@ckane
Copy link
Contributor

ckane commented May 15, 2022

System information

Type Version/Name
Distribution Name Arch
Distribution Version Rolling
Kernel Version linux-mainline-rc6-1
Architecture x86-64
OpenZFS Version zfs-2.1.99-1202_gde82164518

Describe the problem you're observing

configure fails for kernel modules with the following error message:

	*** None of the expected "blk_queue_discard" interfaces were detected.
	*** This may be because your kernel version is newer than what is
	*** supported, or you are using a patched custom kernel with
	*** incompatible modifications.
	***
	*** ZFS Version: zfs-2.1.99-1202_gde82164518
	*** Compatible Kernels: 3.10 - 5.17

Describe how to reproduce the problem

Using the Arch Linux AUR for zfs-dkms-git and linux-mainline, which presently builds a 5.18-rc6 kernel, the current ZFS won't configure successfully, and thus never gets built.

Include any warning/errors/backtraces from the system logs

configure fails for kernel modules with the following error message:

	*** None of the expected "blk_queue_discard" interfaces were detected.
	*** This may be because your kernel version is newer than what is
	*** supported, or you are using a patched custom kernel with
	*** incompatible modifications.
	***
	*** ZFS Version: zfs-2.1.99-1202_gde82164518
	*** Compatible Kernels: 3.10 - 5.17
@ckane ckane added the Type: Defect Incorrect behavior (e.g. crash, hang) label May 15, 2022
@ckane ckane changed the title [5.18 comnp5.18-rc6 won't configure build [5.18 compat] 5.18-rc6 won't configure build May 15, 2022
@rincebrain
Copy link
Contributor

rincebrain commented May 15, 2022

Built fine for me against 5.18-rc6 without even a warning I can see, using 5.18.0-rc6 and zfs-2.1.99-1202-gde8216451.

Can you share any more logs about how it fails for you, and/or your kernel config?

@ckane
Copy link
Contributor Author

ckane commented May 15, 2022

That's good to hear, I'll dig more into it and see if I can reproduce from source code clone, instead of the Arch AUR, which might be the culprit.

@ckane
Copy link
Contributor Author

ckane commented May 16, 2022

So, checking out the source without using the AUR and trying the compile yields the following error in the blk_queue_discard test, and suggests a type mismatch is causing the error:

make modules -C /usr/src/linux-mainline  M=/home/username/src/zfs-test/build/blk_queue_discard
make: Entering directory '/usr/lib/modules/5.18.0-rc6-1-mainline/build'
  CC [M]  /home/username/src/zfs-test/build/blk_queue_discard/blk_queue_discard.o
In file included from ./include/linux/bitops.h:33,
                 from ./include/linux/kernel.h:22,
                 from ./arch/x86/include/asm/percpu.h:27,
                 from ./arch/x86/include/asm/current.h:6,
                 from ./arch/x86/include/asm/processor.h:17,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:65,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /home/username/src/zfs-test/build/blk_queue_discard/blk_queue_discard.c:83:
In function ‘constant_test_bit’,
    inlined from ‘test_bit’ at ./include/asm-generic/bitops/instrumented-non-atomic.h:135:9,
    inlined from ‘main’ at /home/username/src/zfs-test/build/blk_queue_discard/blk_queue_discard.c:94:11:
./arch/x86/include/asm/bitops.h:207:22: error: array subscript 0 is outside array bounds of ‘long unsigned int[0]’ [-Werror=array-bounds]
  207 |                 (addr[nr >> _BITOPS_LONG_SHIFT])) != 0;
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /home/username/src/zfs-test/build/blk_queue_discard/blk_queue_discard.o] Error 1
make: *** [Makefile:1834: /home/username/src/zfs-test/build/blk_queue_discard] Error 2
make: Leaving directory '/usr/lib/modules/5.18.0-rc6-1-mainline/build'

@rincebrain
Copy link
Contributor

rincebrain commented May 16, 2022 via email

@ckane
Copy link
Contributor Author

ckane commented May 16, 2022

Ok @rincebrain I think PR #13465 likely fixes this. Running the build on my system right now, would appreciate a test on yours too if you can get the chance. Turns out there were other failing tests, too.

@ckane
Copy link
Contributor Author

ckane commented May 16, 2022

Updated my clone of the AUR package build to apply this patch, and it built on 5.18-rc6 and also 5.17.7 on my system without error

behlendorf pushed a commit that referenced this issue May 17, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes #13463 
Closes #13465
behlendorf pushed a commit to behlendorf/zfs that referenced this issue May 17, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
behlendorf pushed a commit that referenced this issue May 20, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes #13463 
Closes #13465
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Sep 12, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
beren12 pushed a commit to beren12/zfs that referenced this issue Sep 19, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
The compiler appears to be expanding the unused NULL pointer into a
zero-length array via the inline bitops code. When -Werror=array-bounds
is used, this causes a build failure. Recommended solution is allocate
temporary structures, fill with zeros (to avoid uninitialized data use
warnings), and pass the pointer to those to the inline calls.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes openzfs#13463 
Closes openzfs#13465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants