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

Fix vd_path use after spa_vdev_exit() #8522

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

ikozhukhov
Copy link
Contributor

after port ikozhukhov@fedef6d to DilOS i have panic:

panic[cpu2]/thread=fffffe22fd0074a0:
BAD TRAP: type=e (#pf Page fault) rp=fffffe0011c82840 addr=fffffec8f8e3d000


zpool:
#pf Page fault
Bad kernel fault at addr=0xfffffec8f8e3d000
pid=51366, pc=0xfffffffffb8a52fd, sp=0xfffffe0011c82930, eflags=0x10283
cr0: 80050033<pg,wp,ne,et,mp,pe>  cr4: 1626f8<smep,osxsav,pcide,vmxe,xmme,fxsr,pge,mce,pae,pse,de>
cr2: fffffec8f8e3d000
cr3: 1cef51000
cr8: 0

        rdi:                0 rsi:                0 rdx:               5f
        rcx:               4e  r8: fffffffff79cdf3a  r9: fffffffffb9832f8
        rax:               ba rbx: fffffec8f8e3d001 rbp: fffffe0011c82a10
        r10:                0 r11:                0 r12:               60
        r13: fffffffff79cdf49 r14:                0 r15:                0
        fsb: fffffc7fef112a40 gsb: fffffe0bec52b000  ds:                0
         es:                0  fs:                0  gs:                0
        trp:                e err:                0 rip: fffffffffb8a52fd
         cs:               30 rfl:            10283 rsp: fffffe0011c82930
         ss:               38

fffffe0011c82740 unix:die+73 ()
fffffe0011c82830 unix:trap+1257 ()
fffffe0011c82840 unix:cmntrap+e6 ()
fffffe0011c82a10 unix:vsnprintf+8ad ()
fffffe0011c82aa0 zfs:log_internal+8b ()
fffffe0011c82b40 zfs:spa_history_log_internal+ec ()
fffffe0011c82be0 zfs:spa_vdev_remove+1a3 ()
fffffe0011c82c30 zfs:zfs_ioc_vdev_remove+41 ()
fffffe0011c82cd0 zfs:zfsdev_ioctl+4c4 ()
fffffe0011c82d10 genunix:cdev_ioctl+25 ()
fffffe0011c82d60 specfs:spec_ioctl+4d ()
fffffe0011c82df0 genunix:fop_ioctl+55 ()
fffffe0011c82f00 genunix:ioctl+a4 ()
fffffe0011c82f10 unix:brand_sys_syscall+21a ()

dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content: kernel + curproc
NOTICE: ahci0: ahci_tran_reset_dport port 0 reset port


> ::status
debugging crash dump vmcore.30 (64-bit) from zfs-tests2
operating system: 5.11 2.0.2.5-20190318-2-0+mm-zfs (i86pc)
image uuid: 3517a548-f3ca-4e9e-b220-1417c0cf386f
panic message: BAD TRAP: type=e (#pf Page fault) rp=fffffe0011c82840 addr=fffffec8f8e3d000
dump content: kernel pages and pages from PID -1
>
> $C
fffffe0011c82a10 vsnprintf+0x8ad(0, 0, fffffffff79cdf3a, fffffe0011c82ab8)
fffffe0011c82aa0 log_internal+0x8b(fffffe20fbb90b40, fffffffff79cdf4a, fffffea1d5ac4000, fffffe162eed8400, fffffffff79cdf3a, fffffe0011c82ab8)
fffffe0011c82b40 spa_history_log_internal+0xec(fffffea1d5ac4000, fffffffff79cdf4a, 0, fffffffff79cdf3a)
fffffe0011c82be0 spa_vdev_remove+0x1a3(fffffea1d5ac4000, 1e43bb7cbc2ff84f, 0)
fffffe0011c82c30 zfs_ioc_vdev_remove+0x41(fffffea1da905000)
fffffe0011c82cd0 zfsdev_ioctl+0x4c4(4100000000, 5a0c, fffffc7fffdf8c40, 202003, fffffff459abc2a0, fffffe0011c82e20)
fffffe0011c82d10 cdev_ioctl+0x25(4100000000, 5a0c, fffffc7fffdf8c40, 202003, fffffff459abc2a0, fffffe0011c82e20)
fffffe0011c82d60 spec_ioctl+0x4d(fffffe0bf0149600, 5a0c, fffffc7fffdf8c40, 202003, fffffff459abc2a0, fffffe0011c82e20, 0)
fffffe0011c82df0 fop_ioctl+0x55(fffffe0bf0149600, 5a0c, fffffc7fffdf8c40, 202003, fffffff459abc2a0, fffffe0011c82e20, 0)
fffffe0011c82f00 ioctl+0xa4(3, 5a0c, fffffc7fffdf8c40)
fffffe0011c82f10 sys_syscall+0x19f()
>
> fffffffff79cdf3a::print -i (char*)
mdb: failed to look up type (char*): No type information available for that name

proposed update fixed it.
panic has been found by loop of zfs tests more then 24h

Motivation and Context

Description

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

@codecov
Copy link

codecov bot commented Mar 20, 2019

Codecov Report

Merging #8522 into master will increase coverage by 0.07%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8522      +/-   ##
==========================================
+ Coverage   78.55%   78.62%   +0.07%     
==========================================
  Files         380      380              
  Lines      116324   116329       +5     
==========================================
+ Hits        91373    91459      +86     
+ Misses      24951    24870      -81
Flag Coverage Δ
#kernel 79.09% <100%> (+0.02%) ⬆️
#user 67.22% <88.88%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73c25a7...4768677. Read the comment docs.

Signed-off-by: Igor Kozhukhov <igor@dilos.org>
@behlendorf behlendorf changed the title fix for PR8162 Fix vd_path use after spa_vdev_exit() Mar 20, 2019
@behlendorf behlendorf requested a review from tcaputi March 20, 2019 22:12
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Mar 20, 2019
Copy link
Contributor

@tcaputi tcaputi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Mar 21, 2019
@behlendorf behlendorf merged commit c048dda into openzfs:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants