驱动写用户态应用程序的标准输出卡死

问题描述

驱动写用户态应用程序的标准输出,pipe卡住,导致驱动不能正常继续工作
注:感谢木三的解决方法.

问题解决

  • lsof 查看pipe管道
#lsof
python3   25817                         li    7r     FIFO               0,13        0t0     259006 pipe
stcEventL 28339                         li    1w     FIFO               0,13        0t0     259006 pipe
stcEventL 28339                         li    2w     FIFO               0,13        0t0     259006 pipe
  • 尝试读取文件,解决管道堵塞问题
#cat /proc/28339/fd 2
kernel1 index 173 come in, ddr_data: 193
kernel1 index 174 come in, ddr_data: 194
kernel1 index 175 come in, ddr_data: 195
kernel1 index 176 come in, ddr_data: 196
kernel1 index 177 come in, ddr_data: 197
  • 分析
    stcEventL的标准输出和错误输出被合并(inode相同259006)
    python3 打开stcEventL的输出管道文件,但是未读取.(主动读取管道文件,阻塞解决)
posted @ 2022-07-20 09:12  反光  阅读(24)  评论(0编辑  收藏  举报