potential riscv special bug maybe found

Bo YU tsu.yubo at gmail.com
Thu Mar 9 07:18:41 PST 2023


Hi,

I am sorry if this is noise.

Some days ago I noticed strace 6.2 was built failed on riscv64 due to
test cases[0]. There is one program from strace can reproduce it:

```
./tests/read-write 
```

It will be hang.

In fact, the issue has existed since 5.18. I `git bisect` and finally
found out the issue was introduced by the commit[1]:

commit 631f871f071746789e9242e514ab0f49067fa97a
Author: Andreas Gruenbacher <agruenba at redhat.com>
Date:   Tue Nov 9 12:56:06 2021 +0100

     fs/iomap: Fix buffered write page prefaulting

I do not think there is a problem with this commit, because it does not
affect others arch expect riscv and after I reverted it, it will pass
all test cases from strace(There is still one case failed on qemu, but
this is another store). 

I try to debug something but failed.
Would be appreciated it any help.

PS:
This is `cat /proc/${read-write-pid}/stack` when hang:
[<0>] generic_perform_write+0x12e/0x1ec
[<0>] ext4_buffered_write_iter+0x5e/0xe6
[<0>] ext4_file_write_iter+0xb4/0x67c
[<0>] vfs_write+0x1d2/0x308
[<0>] ksys_write+0x56/0xc6
[<0>] sys_write+0xe/0x16
[<0>] check_syscall_nr+0x3c/0x3c

[0]: https://github.com/strace/strace/issues/242
[1]: https://lkml.org/lkml/2021/11/23/641

-- 
Regards,
--
   Bo YU

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230309/96d4d37b/attachment.sig>


More information about the linux-riscv mailing list