在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

Linux内核Bug怎么解决

178次阅读
没有评论

共计 4869 个字符,预计需要花费 13 分钟才能阅读完成。

本篇内容介绍了“Linux 内核 Bug 怎么解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让丸趣 TV 小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

一个 bug,  有人升级内核到 V5.10-rcX 之后,执行 dd 和 sync 之后看到进程有 hang 住的情况:

Some guys internally upgraded to v5.10-rcX and start to see a hang after dd + sync for a large file: - mount /dev/sda1 (ext4 filesystem) to directory /mnt; - run  if=/dev/zero of=test1 bs=1M count=2000  on directory /mnt; - run  sync

系统提示打印 hang 住进程的堆栈信息:

and get: [ 367.912761] INFO: task jbd2/sdb1-8:3602 blocked for more than 120 seconds. [ 367.919618] Not tainted 5.10.0-rc1-109488-g32ded76956b6 #948 [ 367.925776]  echo 0   /proc/sys/kernel/hung_task_timeout_secs  disables this message. [ 367.933579] task:jbd2/sdb1-8 state:D stack: 0 pid: 3602 ppid: 2 flags:0x00000028 [ 367.941901] Call trace: [ 367.944351] __switch_to+0xb8/0x168 [ 367.947840] __schedule+0x30c/0x670 [ 367.951326] schedule+0x70/0x108 [ 367.954550] io_schedule+0x1c/0xe8 [ 367.957948] bit_wait_io+0x18/0x68 [ 367.961346] __wait_on_bit+0x78/0xf0 [ 367.964919] out_of_line_wait_on_bit+0x8c/0xb0 [ 367.969356] __wait_on_buffer+0x30/0x40 [ 367.973188] jbd2_journal_commit_transaction+0x1370/0x1958 [ 367.978661] kjournald2+0xcc/0x260 [ 367.982061] kthread+0x150/0x158 [ 367.985288] ret_from_fork+0x10/0x34 [ 367.988860] INFO: task sync:3823 blocked for more than 120 seconds. [ 367.995102] Not tainted 5.10.0-rc1-109488-g32ded76956b6 #948 [ 368.001265]  echo 0   /proc/sys/kernel/hung_task_timeout_secs  disables this message. [ 368.009067] task:sync state:D stack: 0 pid: 3823 ppid: 3450 flags:0x00000009 [ 368.017397] Call trace: [ 368.019841] __switch_to+0xb8/0x168 [ 368.023320] __schedule+0x30c/0x670 [ 368.026804] schedule+0x70/0x108 [ 368.030025] jbd2_log_wait_commit+0xbc/0x158 [ 368.034290] ext4_sync_fs+0x188/0x1c8 [ 368.037947] sync_fs_one_sb+0x30/0x40 [ 368.041606] iterate_supers+0x9c/0x138 [ 368.045350] ksys_sync+0x64/0xc0 [ 368.048569] __arm64_sys_sync+0x10/0x20 [ 368.052398] el0_svc_common.constprop.3+0x68/0x170 [ 368.057177] do_el0_svc+0x24/0x90 [ 368.060482] el0_sync_handler+0x118/0x168 [ 368.064478] el0_sync+0x158/0x180

并反馈 8 号硬队列绑定的第 100 号 cpu 上派发队列和完成队列不一致,但是没有 inflight 的情况,因为这个情况,苦恼了三天三夜,头发掉满了整个键盘。

estuary:/sys/kernel/debug/block/sda/hctx8$ cat cpu100/dispatched 3 0 estuary:/sys/kernel/debug/block/sda/hctx8$ cat cpu100/completed 2 0 On cpu100, it seems completed is less than number dispatched. /sys/devices/pci0000:74/0000:74:02.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/block/sda/sda1/inflight), the number of inflight is 0.

然后 Ming Lei (自带音响出场) 给出意见, 需要收集 /sys/kernel/debug/block/sda   目录和 /sys/block/sda/device 目录下所有文件的输出:

hello chenxiang, Can you collect the debugfs log via the following commands after the io hang is triggered? 1) debugfs log: (cd /sys/kernel/debug/block/sda   find . -type f -exec grep -aH . {} \;) 2) scsi sysfs info: (cd /sys/block/sda/device   find . -type f -exec grep -aH . {} \;) Suppose the disk is /dev/sda.

chenxiang 反馈:

~$ cd /sys/kernel/debug/block/sdb   find . -type f -exec grep -aH . {} \; ... ./hctx9/tags:cleared=3891 ./hctx9/tags:bits_per_word=64 ./hctx9/tags:map_nr=63 ./hctx9/tags:alloc_hint={3264, 3265, 0, 3731, 2462, 842, 0, 0, 1278, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2424, 0, 0, 0, 346, 3, 3191, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1165, 538, 0, 372, 277, 3476, 0, 0, 0, 111, 0, 2081, 0, 112, 0, 0, 0, 0, 904, 1127, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 321, 0} ./hctx9/tags:wake_batch=8 ./hctx9/tags:wake_index=7 ./hctx9/tags:ws_active=0 ./hctx9/tags:ws={ ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags: {.wait_cnt=8, .wait=inactive}, ./hctx9/tags:} ./hctx9/tags:round_robin=1 ./hctx9/tags:min_shallow_depth=4294967295 ./hctx9/ctx_map:00000000: 00 ...

Ming Lei 大神看了一下 debug 输出,小喝一杯大红袍,就直接建议去测试这个 patch:

Please try the following patch: diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 60c7a7d74852..03c6d0620bfd 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1703,8 +1703,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx, break; case BLK_STS_RESOURCE: case BLK_STS_ZONE_RESOURCE: - if (atomic_read( sdev- device_busy) || - scsi_device_blocked(sdev)) + if (scsi_device_blocked(sdev)) ret = BLK_STS_DEV_RESOURCE; break; default:

chenxiang 测试反馈之后,问题解决,内心洋溢着 Linux 从业者单纯的喜悦,眼神中流露出满满的崇敬之情,恨不得以身相许:

I have tested the patch 100+ times on two envirments(on which the issue occurs frequently before), and the issue doesn t occur.

“Linux 内核 Bug 怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注丸趣 TV 网站,丸趣 TV 小编将为大家输出更多高质量的实用文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-25发表,共计4869字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 久久97久久97精品免视看清纯 | 亚洲人成网7777777国产 | 国产精品999在线 | 国产在线a不卡免费视频 | 又湿又紧又大又爽a视频国产 | 精品亚洲成a人在线观看 | 欧美成人精品高清在线播放 | 4hu永久影院在线四虎 | 久久久久亚洲av成人网人人网站 | 日本xxxx色视频在线观看 | 日本久久久久 | 18禁裸体动漫美女无遮挡网站 | 图片区欧美色图 | 麻豆久久久9性大片 | 色综合久久久久久久久五月 | 亚洲精品国产一区二区精华液 | 中文日韩字幕一区在线观看 | 国产精品尤物 | 国产成人免费 | 黄色在线免费观看 | 中文字幕无线观看中文字幕 | 看一级毛片 | 91精品91久久久 | 啪啪无码人妻丰满熟妇 | 欧美成人毛片在线视频 | 欧美综合区自拍亚洲综合图区 | 国产伦精品一区二区三区 | 久九精品 | 午夜网站在线观看免费网址免费 | 国产aⅴ精品一区二区三区久久 | 国产精品无码一本二本三本色 | 国产精品高清一区二区 | 国产大屁股喷水视频在线观看 | 日日夜夜综合 | 法国少妇xxxx做受 | 亚洲人成a在线网站 | 久久夜色精品国产噜噜亚洲av | 狠狠色噜噜狠狠狠狠97俺也去 | 九九精品免费 | 色综合色天天久久婷婷基地 | 免费的黄视频 |