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

zfs bced7e3aaa3cf54d5e8e4f94e067144b27cb744b causes null pointer deref in spl_kmem_cache_create #9302

Closed
prometheanfire opened this issue Sep 10, 2019 · 8 comments
Labels
Type: Regression Indicates a functional regression

Comments

@prometheanfire
Copy link
Contributor

System information

Type Version/Name
Distribution Name Gentoo
Distribution Version 😄
Linux Kernel 5.2.13
Architecture x86_64
ZFS Version b63e2d8
SPL Version b63e2d8

Describe the problem you're observing

Cannot Boot with builtin kernel (I CAN build it though, unlike in #9297)
Had to boot with earlycon=efifb and console=efifb to see it (and took 15 minutes to read out at 1 line every couple seconds)

Describe how to reproduce the problem

Build a 'built-in' kernel (static) with the commit refrenced above and try to boot.

Include any warning/errors/backtraces from the system logs

Best I have is a picture.

https://photos.app.goo.gl/eAaV8fXuXXfcUqDE7

@prometheanfire
Copy link
Contributor Author

a18f8bc boots

@prometheanfire
Copy link
Contributor Author

a57c82f boots (all those typo patches)

@prometheanfire
Copy link
Contributor Author

d02186e boots (sept 04)

@prometheanfire
Copy link
Contributor Author

870e7a5 boots that leaves 4 commits

not 4bbf047 as that's rpm only
not 43f4495 as it's test only
not b63e2d8 as it's test only

I'm not sure how, but it looks like bced7e3 introduced it, testing now

@prometheanfire
Copy link
Contributor Author

prometheanfire commented Sep 10, 2019

bced7e3 worked but master did not, odd... the diff confirms only tests were touched... going from master to bced7e3 confirms only tests/rpm touched.

GIT update -->
   repository:               https://github.com/zfsonlinux/zfs.git
   updating from commit:     b63e2d881f859f0c7d8596be2759dd096e324f48
   to commit:                bced7e3aaa3cf54d5e8e4f94e067144b27cb744b
 rpm/generic/zfs.spec.in                                                |  2 +-
 tests/zfs-tests/include/blkdev.shlib                                   | 88 +---------------------------------------------------------------------------------------
 tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh         | 27 ++++++++++++++++++---------
 tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies.kshlib | 77 +++++++++++++++++++++++++++++++++++++++++------------------------------------

I'm gonna leave this as is for other's to comment on

@prometheanfire
Copy link
Contributor Author

bced7e3 DID cause the issue on recompile

@prometheanfire prometheanfire changed the title zfs master@b63e2d881f859f0c7d8596be2759dd096e324f48 has null pointer deref in spl_kmem_cache_create zfs bced7e3aaa3cf54d5e8e4f94e067144b27cb744b causes null pointer deref in spl_kmem_cache_create Sep 10, 2019
@behlendorf
Copy link
Contributor

Thanks for bisecting this! It looks like bced7e3 accidentally reintroduced issue #7595, which was previously addressed by 517d247. Would it be possible for you to verify that reapplying the original fix addresses the issue.

diff --git a/copy-builtin b/copy-builtin
index c108cfc6733..9a35b1845c3 100755
--- a/copy-builtin
+++ b/copy-builtin
@@ -12,9 +12,15 @@ usage()
 KERNEL_DIR="$(readlink --canonicalize-existing "$1")"
 
 MODULES=()
+
+# When integrated in to the kernel the spl module must appear first to
+# ensure that it is initialized before the other kmods which depend on it.
+MODULES+="spl"
+
 for MODULE_DIR in module/* module/os/linux/*
 do
        [ -d "$MODULE_DIR" ] || continue
+       [ "spl" = "${MODULE_DIR##*/}" ] && continue
        [ "os" = "${MODULE_DIR#*/}" ] && continue
        MODULES+=("${MODULE_DIR#*/}")
 done

@behlendorf behlendorf added the Type: Regression Indicates a functional regression label Sep 10, 2019
@prometheanfire
Copy link
Contributor Author

heh, thought this sounded familiar, I'll test tonight when I update to 5.2.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Regression Indicates a functional regression
Projects
None yet
Development

No branches or pull requests

2 participants