395 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

umount xfs文件系统时hang住

已完成
缺陷
创建于  
2020-02-25 08:50

1.使用附件的tmp.c编译,tmp.img挂载到tmp_dir
2.执行./tmp tmp_dir
3.umount tmp_dir时长时间卡住(超过24h),内核会有hung_task告警:
[ 1571.817116] umount D 0 2647 2237 0x00000208
[ 1571.817845] Call trace:
[ 1571.818245] __switch_to+0xe4/0x148
[ 1571.818742] __schedule+0x28c/0x938
[ 1571.819228] schedule+0x2c/0x88
[ 1571.819684] wb_wait_for_completion+0x94/0xc0
[ 1571.820283] __writeback_inodes_sb_nr+0xdc/0x100
[ 1571.820897] writeback_inodes_sb+0x34/0x40
[ 1571.821513] sync_filesystem+0x44/0xc0
[ 1571.822024] generic_shutdown_super+0x34/0x128
[ 1571.822673] kill_block_super+0x2c/0x70
[ 1571.823232] deactivate_locked_super+0x64/0x90
[ 1571.823932] deactivate_super+0x74/0x80
[ 1571.824563] cleanup_mnt+0x44/0xa0
[ 1571.825042] __cleanup_mnt+0x20/0x30
[ 1571.825528] task_work_run+0xbc/0xf0
[ 1571.825995] do_notify_resume+0x12c/0x138
[ 1571.826586] work_pending+0x8/0x10

附件
tmp.rar(23.49 KB)下载
ltx 2020-02-25 08:44

评论 (2)

ltx 创建了缺陷
ltx 关联仓库设置为openEuler/kernel
ltx 上传了附件tmp.rar
展开全部操作日志

Hey @ltx, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developpers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/command.md to find the details.

Charlie_Li 负责人设置为Xie XiuQi

问题原因:

  1. 这个问题初步分析是由于xfs文件系统元数据区域中sb中空闲块个数和分配组ag内部free block个数不配置,导致在xfs进行writeback的过程中,长时间占有sb->umount信号量
  2. 在umount xfs文件系统的时候,由于需要等待sb->umount,进程切入到D状态时间超过hung_task_timeout,系统发生hung task报警

解决方案:

  1. 已经针对该问题和内核社区进行沟通,补充元数据校验。保证在元数据出现异常的情况下,不继续参与流程处理(具体信息参见邮件列表https://patchwork.kernel.org/patch/11395543/)
Charlie_Li 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936 5601591 lutianxiong 1587133339
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助