Bug 1974665

Summary: rhel8.7 warning appear when interrupt the blkdiscard on MD raid5
Product: Red Hat Enterprise Linux 8 Reporter: ChanghuiZhong <czhong>
Component: kernelAssignee: XiaoNi <xni>
kernel sub component: Multiple Devices (MD) QA Contact: ChanghuiZhong <czhong>
Status: CLOSED MIGRATED Docs Contact:
Severity: unspecified    
Priority: medium CC: jmoyer, ncroxon, xni
Version: 8.5Keywords: MigratedToJIRA, Reopened, Triaged
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: 8.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-23 19:31:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1969483    

Description ChanghuiZhong 2021-06-22 09:29:31 UTC
Description of problem:
The blkdiscard can not be interrupted (ctrl+c) on the MD raid5 device,if run reboot, a warning will appear

Version-Release number of selected component (if applicable):
rhel8

How reproducible:
100%

Steps to Reproduce:
1.enable trim support of the raid456 module:
  modprobe raid456
  echo Y > /sys/module/raid456/parameters/devices_handle_discard_safely

2.mdadm -CR /dev/md0 -l5 -n3 /dev/nvme[0-2]n1 --assume-clean

3.blkdiscard --verbose  /dev/md0

4.reboot

Actual results:
warning appear

Expected results:
blkdiscard can be interrupted,no warning

Additional info:

*       
] A stop job is running for Session 4 of user root (2min 59s / 3min)   
[      
*        
*   
      
*      
] A stop job is running for Session 4 of user root (2min 59s / 3min)   
[       
*        
*   
      
*     
] A stop job is running for Session 4 of user root (3min / 3min)   

.
.
.


Rebooting. 
[ 1676.748418] WARNING: CPU: 33 PID: 3176 at drivers/md/md.c:8613 md_write_inc+0x15/0x40 
[ 1676.756246] Modules linked in: raid456 vfat fat isofs cdrom ext4 mbcache jbd2 xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun bridge stp llc intel_rapl_msr intel_rapl_common isst_if_common skx_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp sunrpc kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel async_raid6_recov rapl async_memcpy async_pq iTCO_wdt async_xor intel_cstate iTCO_vendor_support xor async_tx dell_smbios wmi_bmof dell_wmi_descriptor ipmi_ssif dcdbas mei_me acpi_ipmi raid6_pq pcspkr intel_uncore i2c_i801 mei lpc_ich ipmi_si wmi ipmi_devintf ipmi_msghandler acpi_power_meter ip_tables xfs libcrc32c sd_mod sg mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops nvme drm ahci nvme_core crc32c_intel libahci megaraid_sas tg3 libata t10_pi i2c_algo_bit dm_mirror dm_region_hash dm_log dm_mod 
[ 1676.756304]  [last unloaded: raid456] 
[ 1676.846498] CPU: 33 PID: 3176 Comm: blkdiscard Kdump: loaded Tainted: G          I      --------- -  - 4.18.0-314.el8.x86_64 #1 
[ 1676.857962] Hardware name: Dell Inc. PowerEdge R640/06DKY5, BIOS 2.8.1 06/26/2020 
[ 1676.865441] RIP: 0010:md_write_inc+0x15/0x40 
[ 1676.869714] Code: 6e 6f 6e 65 66 89 46 04 b8 05 00 00 00 c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 f6 46 10 01 74 29 8b 97 e4 01 00 00 85 d2 74 16 <0f> 0b 48 8b 87 58 03 00 00 a8 03 75 13 65 48 ff 00 e9 b5 42 a5 ff 
[ 1676.888457] RSP: 0018:ffffa6d1c26a3a58 EFLAGS: 00010002 
[ 1676.893683] RAX: ffff899d5411b710 RBX: ffff899d4d9d6000 RCX: dead000000000200 
[ 1676.900817] RDX: 0000000000000001 RSI: ffff899d50303500 RDI: ffff899d5bba9000 
[ 1676.907948] RBP: 0000000000000000 R08: ffff899d4d9d62c0 R09: 0000000000000400 
[ 1676.915079] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa5b307d0 
[ 1676.922205] R13: ffff899d50303500 R14: ffff899d5411b498 R15: ffff899d5bba9000 
[ 1676.929338] FS:  00007fb0aae43740(0000) GS:ffff899f37c00000(0000) knlGS:0000000000000000 
[ 1676.937422] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 
[ 1676.943170] CR2: 000055576748ae30 CR3: 000000028150c003 CR4: 00000000007706e0 
[ 1676.950300] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 
[ 1676.957435] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 
[ 1676.964564] PKRU: 55555554 
[ 1676.967270] Call Trace: 
[ 1676.969730]  raid5_make_request+0x4cb/0xb50 [raid456] 
[ 1676.974788]  ? finish_wait+0x80/0x80 
[ 1676.978364]  ? finish_wait+0x80/0x80 
[ 1676.981943]  ? finish_wait+0x80/0x80 
[ 1676.985522]  md_handle_request+0x127/0x1a0 
[ 1676.989624]  ? generic_make_request_checks+0x2a7/0x540 
[ 1676.994761]  md_make_request+0x84/0x160 
[ 1676.998599]  generic_make_request+0xed/0x350 
[ 1677.002872]  submit_bio+0x3c/0x160 
[ 1677.006279]  blk_next_bio+0x33/0x40 
[ 1677.009769]  __blkdev_issue_discard+0x12a/0x260 
[ 1677.014302]  blkdev_issue_discard+0x65/0xd0 
[ 1677.018488]  ? avc_has_extended_perms+0x182/0x440 
[ 1677.023194]  blk_ioctl_discard+0xdd/0x100 
[ 1677.027208]  blkdev_common_ioctl+0x257/0x870 
[ 1677.031480]  ? __handle_mm_fault+0x4d4/0x800 
[ 1677.035752]  blkdev_ioctl+0x182/0x250 
[ 1677.039416]  ? selinux_file_ioctl+0x17f/0x220 
[ 1677.043779]  block_ioctl+0x39/0x40 
[ 1677.047183]  do_vfs_ioctl+0xa4/0x680 
[ 1677.050763]  ksys_ioctl+0x60/0x90 
[ 1677.054080]  __x64_sys_ioctl+0x16/0x20 
[ 1677.057835]  do_syscall_64+0x5b/0x1a0 
[ 1677.061503]  entry_SYSCALL_64_after_hwframe+0x65/0xca 
[ 1677.066551] RIP: 0033:0x7fb0aa74a62b 
[ 1677.070130] Code: 0f 1e fa 48 8b 05 5d b8 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 2d b8 2c 00 f7 d8 64 89 01 48 
[ 1677.088876] RSP: 002b:00007ffd72ed5e58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 
[ 1677.096440] RAX: ffffffffffffffda RBX: 000001bf10400000 RCX: 00007fb0aa74a62b 
[ 1677.103575] RDX: 00007ffd72ed5eb0 RSI: 0000000000001277 RDI: 0000000000000003 
[ 1677.110705] RBP: 0000000000000000 R08: 00007ffd72f841b0 R09: 00000000000599bc 
[ 1677.117839] R10: 00000000000599bc R11: 0000000000000246 R12: 0000000000000000 
[ 1677.124971] R13: 0000000000000003 R14: 00007ffd72ed5eb0 R15: 0000000000000001 
[ 1677.132103] ---[ end trace 61ff1d70d4e39edb ]---

Comment 1 Ming Lei 2021-06-23 01:01:43 UTC
Cc Xiao Ni and Nigel

Comment 3 ChanghuiZhong 2021-08-17 02:28:37 UTC
Hi,Xiao

this issue exist on rhel9 too,

[12557.818092] ------------[ cut here ]------------ 
[12557.822725] WARNING: CPU: 29 PID: 120131 at drivers/md/md.c:8546 md_write_inc+0x15/0x50 
[12557.830739] Modules linked in: raid456 async_raid6_recov async_memcpy async_pq async_xor xor async_tx raid6_pq ext4 mbcache jbd2 tls dm_service_time rfkill sunrpc dm_multipath intel_rapl_msr intel_rapl_common ipmi_ssif isst_if_common skx_edac nfit iTCO_wdt iTCO_vendor_support libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm mgag200 dcdbas i2c_algo_bit irqbypass drm_kms_helper dell_smbios rapl acpi_ipmi intel_cstate intel_uncore ipmi_si syscopyarea sysfillrect dell_wmi_descriptor wmi_bmof mei_me sysimgblt ipmi_devintf fb_sys_fops pcspkr i2c_i801 cec mei lpc_ich i2c_smbus ipmi_msghandler acpi_power_meter drm fuse xfs libcrc32c sd_mod ahci crct10dif_pclmul libahci nvme crc32_pclmul crc32c_intel nvme_core libata tg3 ghash_clmulni_intel megaraid_sas t10_pi wmi dm_mirror dm_region_hash dm_log dm_mod [last unloaded: nbd] 
[12557.904923] CPU: 29 PID: 120131 Comm: blkdiscard Kdump: loaded Tainted: G          I      --------- ---  5.14.0-0.rc4.35.el9.x86_64 #1 
[12557.916996] Hardware name: Dell Inc. PowerEdge R640/06DKY5, BIOS 2.8.1 06/26/2020 
[12557.924476] RIP: 0010:md_write_inc+0x15/0x50 
[12557.928746] Code: ae 59 27 00 b8 ea ff ff ff e9 3c fe ff ff 0f 1f 80 00 00 00 00 e8 db 1e 8e ff f6 46 10 01 74 29 8b 97 c4 01 00 00 85 d2 74 16 <0f> 0b 48 8b 87 f0 02 00 00 a8 03 75 13 65 48 ff 00 e9 55 6a 9e ff 
[12557.947490] RSP: 0018:ffffae224407bb58 EFLAGS: 00010002 
[12557.952718] RAX: 0000000000000003 RBX: ffff9ac66020a000 RCX: 0000000000000000 
[12557.959851] RDX: 0000000000000001 RSI: ffff9ac7c13ee300 RDI: ffff9ac86e4d8000 
[12557.966981] RBP: ffff9ac7c13ee300 R08: ffff9ac66020a2c0 R09: ffff9ac66020a2c0 
[12557.974116] R10: 0000000000000001 R11: ffffae224407b80c R12: ffff9ac86e4d8000 
[12557.981247] R13: 0000000000000000 R14: 0000000001da4f38 R15: ffff9ac908b7d500 
[12557.988380] FS:  00007f24609c6740(0000) GS:ffff9ac9b7b80000(0000) knlGS:0000000000000000 
[12557.996466] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 
[12558.002209] CR2: 00007fe8ef007004 CR3: 0000000230ffc006 CR4: 00000000007706e0 
[12558.009343] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 
[12558.016475] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 
[12558.023607] PKRU: 55555554 
[12558.026320] Call Trace: 
[12558.028775]  make_discard_request+0x20c/0x350 [raid456] 
[12558.034010]  ? do_wait_intr_irq+0xa0/0xa0 
[12558.038033]  raid5_make_request+0x48d/0x500 [raid456] 
[12558.043092]  ? prepare_ftrace_return+0x5c/0x80 
[12558.047547]  ? do_wait_intr_irq+0xa0/0xa0 
[12558.051561]  md_handle_request+0x11f/0x1b0 
[12558.055669]  md_submit_bio+0x67/0xb0 
[12558.059245]  __submit_bio_noacct+0xd0/0x2e0 
[12558.063442]  ? __submit_bio_noacct+0x5/0x2e0 
[12558.067721]  __blkdev_issue_discard+0x13f/0x280 
[12558.072258]  blkdev_issue_discard+0x65/0xd0 
[12558.076450]  blk_ioctl_discard+0xd8/0x100 
[12558.080470]  blkdev_ioctl+0xb1/0x2b0 
[12558.084047]  ? blkdev_ioctl+0x5/0x2b0 
[12558.087715]  block_ioctl+0x3b/0x40 
[12558.091127]  __x64_sys_ioctl+0x7f/0xb0 
[12558.094883]  do_syscall_64+0x38/0x90 
[12558.098469]  entry_SYSCALL_64_after_hwframe+0x44/0xae 
[12558.103522] RIP: 0033:0x7f2460ad03eb 
[12558.107109] Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0d 2a 0f 00 f7 d8 64 89 01 48 
[12558.125854] RSP: 002b:00007ffea5186748 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 
[12558.133419] RAX: ffffffffffffffda RBX: 000001bf10400000 RCX: 00007f2460ad03eb 
[12558.140551] RDX: 00007ffea51867c0 RSI: 0000000000001277 RDI: 0000000000000003 
[12558.147683] RBP: 0000000000000000 R08: 000055b69b0c45a0 R09: 0000000000000000 
[12558.154815] R10: 00007ffea51a7170 R11: 0000000000000246 R12: 0000000000000003 
[12558.161949] R13: 00007ffea51867c0 R14: 0000000000000000 R15: 0000000000000000 
[12558.169088] ---[ end trace 1e011b55b9f8b191 ]---

Comment 5 XiaoNi 2022-02-07 15:10:50 UTC
I tried with the latest upstream kernel. It has this problem too.

Comment 26 RHEL Program Management 2023-09-23 19:30:45 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 27 RHEL Program Management 2023-09-23 19:31:26 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.