Bug #69347
openTest failure: test_async_io_fio (tasks.cephfs.test_nfs.TestNFS)
0%
Description
https://github.com/ceph/ceph/pull/61143 adds tests by running fio with asynchronous libcephfs. What's seen is failure in the read path due to an existing bug. Sample run: /a/vshankar-2024-12-19_10:00:45-fs-wip-vshankar-testing-20241219.063429-debug-testing-default-smithi/8044375
Possibly same as: https://tracker.ceph.com/issues/69315
Files
VS Updated by Venky Shankar almost 2 years ago
- Related to Bug #69315: client: async paths without OC fails for non-contiguous I/O added
VS Updated by Venky Shankar almost 2 years ago
- Status changed from New to Triaged
- Assignee set to Dhairya Parmar
- Target version set to v20.0.0
- Source set to Q/A
VS Updated by Venky Shankar almost 2 years ago
Hey @Dhairya Parmar - now that 69315 is irrelevant, do we have anything on this issue? Do we need anything more like logs, etc..?
DP Updated by Dhairya Parmar almost 2 years ago
Venky Shankar wrote in #note-3:
Hey @Dhairya Parmar - now that 69315 is irrelevant, do we have anything on this issue? Do we need anything more like logs, etc..?
hey sorry for the delay venky (consistent power issues in my area) - we need logs yes, i need to take a look at the docs kotresh shared with me and i'll get in touch with ganesha folks to get more insights on this.
DP Updated by Dhairya Parmar almost 2 years ago
- File fio_async_read_fail.txt fio_async_read_fail.txt added
- File fio_async_write_pass.txt fio_async_write_pass.txt added
RCA till now:
From my testings, it is clear that the fio workloads (--ioengine=libaio) fail only on smithi machines (used by teuthology suite to run test cases). I was able to manually run workloads on them by adding a sleep time of an hour and it is clear that the writes go through but the reads don't since a fio workload with --rw=randrw would fail but --rw=randwrite would pass. (Log files attached). So the question arises what's in smithi nodes? Let me put my thoughts here - I feel SELinux has to do something with the setup because when I did ls -Z on the fio file it showed me unconfined_u:object_r:unlabeled_t:s0 /mnt/fio/fio.randrw.test where the label unlabeled_t made me think is this really it because the AVC messages show denials:
type=AVC msg=audit(1738666619.810:7099): avc: denied { search } for pid=4562 comm=72733A6D61696E20513A526567 name="cephtest" dev="sda1" ino=393233 scontext=system_u:system_r:syslogd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1738666885.633:7264): avc: denied { search } for pid=4562 comm=72733A6D61696E20513A526567 name="cephtest" dev="sda1" ino=393233 scontext=system_u:system_r:syslogd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1738667205.159:7511): avc: denied { search } for pid=4562 comm=72733A6D61696E20513A526567 name="cephtest" dev="sda1" ino=393233 scontext=system_u:system_r:syslogd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1738667402.210:7628): avc: denied { search } for pid=4562 comm=72733A6D61696E20513A526567 name="cephtest" dev="sda1" ino=393233 scontext=system_u:system_r:syslogd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1
and
unlabeled_t just means the file on the disk doesn't have a SELinux xattr indicating a file label which also can be confirmed looking at dmesg:[ 4180.979957] SELinux: inode_doinit_use_xattr: getxattr returned 2 for dev=0:134 ino=1 [ 4180.988094] SELinux: inode_doinit_use_xattr: getxattr returned 2 for dev=0:134 ino=1
and the fact that the setup code skips the dirs while installing ceph-selinux makes my intuition even stronger:
2025-02-04T13:29:18.934 INFO:teuthology.orchestra.run.smithi151.stdout: Installing : ceph-selinux-2:19.3.0-7103.gb257c5b2.el9.x86_64 101/135 2025-02-04T13:29:31.624 INFO:teuthology.orchestra.run.smithi151.stdout: Running scriptlet: ceph-selinux-2:19.3.0-7103.gb257c5b2.el9.x86_64 101/135 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /sys 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /proc 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /mnt 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /var/tmp 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /home 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /root 2025-02-04T13:29:31.625 INFO:teuthology.orchestra.run.smithi151.stdout:skipping the directory /tmp
(does "skipping the directory X" mean those dirs weren't SELinux labelled?)
BUT then there's more to the saga - I found out that If i change the nfs mount version to v4.1 or v3 then it just works with this setup (yes, the smithi machines which I just described as a possible bad actor here :P) and here's the run link to it [0]. Another observation - sync read also fails with v4.2!
One might ask what happens on a local fs, does the same workload pass? well, yes! it just works. If I unmount the nfs client from /mnt or whatever the dir it might then yeah the workload runs fine. So it's indeed something to do with NFS and that too V4.2, so all in all it feels like the way smithi nodes are setup, its not gelling well with V4.2 for libaio engine. What exactly, I don't really know because I don't have ganesha logs or libcephfs logs to look at.
- sync/aync read workload failure is only observed on smithi nodes
- the smithi nodes skip dirs while installing
ceph-selinux - kernel ring buffer and audit logs speak of some SELinux denials/rejections
- everything works fine if we fallback to <= nfs v4.1
- fio workload on local fs works fine
- I don't have ganesha/libcephfs logs (:/)
CC: @Frank Filz @sachinpunadikar
FF Updated by Frank Filz almost 2 years ago
Hmm, it may be related to lseek as reported in this Ganesha github issue:
I'm not sure what cephfs actually implements that FSAL_CEPH is calling, but my guess is something's not right in Ceph.
SEEK is a new op in NFSv4.2...
DP Updated by Dhairya Parmar almost 2 years ago
last week i had synced up with sachinpunadikar and we were able to fetch (ceph) client logs from the qe machine, using the same measures i was able to fetch the logs in smithi node (manually sshing into the machine) and here is the job link [0]. I did scramble through the client log but couldn't find anything interesting, there were ll_read calls going through. I could see:
2025-02-06T15:51:49.369+0000 7fa4eafdd640 8 client.14444 _getxattr(0x1, "security.selinux", 1024) = -61
I checked the SELinux mode as well but that's permissive, I even followed a blog [1] that looks pretty aligned with the dmesg error lines i was seeing in smithi node (thanks @milind!) but it still didn't resolve it.
VS Updated by Venky Shankar almost 2 years ago
Dhairya Parmar wrote in #note-7:
last week i had synced up with sachinpunadikar and we were able to fetch (ceph) client logs from the qe machine, using the same measures i was able to fetch the logs in smithi node (manually sshing into the machine) and here is the job link [0]. I did scramble through the client log but couldn't find anything interesting, there were
ll_readcalls going through. I could see:
[...]
Its pretty normal for applications to request for security.selinux xattr and get -ENODATA, unless the application expect the xattr to be present and error out of-course.
I checked the SELinux mode as well but that's permissive, I even followed a blog [1] that looks pretty aligned with the dmesg error lines i was seeing in smithi node (thanks @milind!) but it still didn't resolve it.
I checked the client log and there isn't anything suspicious that I can point to.
DP Updated by Dhairya Parmar almost 2 years ago
Venky Shankar wrote in #note-8:
Dhairya Parmar wrote in #note-7:
last week i had synced up with sachinpunadikar and we were able to fetch (ceph) client logs from the qe machine, using the same measures i was able to fetch the logs in smithi node (manually sshing into the machine) and here is the job link [0]. I did scramble through the client log but couldn't find anything interesting, there were
ll_readcalls going through. I could see:
[...]Its pretty normal for applications to request for security.selinux xattr and get -ENODATA, unless the application expect the xattr to be present and error out of-course.
I checked the SELinux mode as well but that's permissive, I even followed a blog [1] that looks pretty aligned with the dmesg error lines i was seeing in smithi node (thanks @milind!) but it still didn't resolve it.
I checked the client log and there isn't anything suspicious that I can point to.
I checked MDS and client logs, they look fine.
DP Updated by Dhairya Parmar almost 2 years ago
Summarising:
1) FIO workload (sync/async randrw) in teuthology (smithi nodes) fail. Found to be working in QE clusters and local machines.
2) Initially thought to be SELinux because of the context label unlabeled_t but the label exists on QE clusters too, apart from this no solid evidence that SELinux is the culprit. Checkout https://tracker.ceph.com/issues/69347#note-5.
3) Finally fetched libcephfs to check what's going wrong at CephFS layer but there isn't anything interesting to look at in libcephfs logs apart from:
2025-02-06T15:51:49.369+0000 7fa4eafdd640 8 client.14444 _getxattr(0x1, "security.selinux", 1024) = -61
but @Venky Shankar mentioned it's normal and shouldn't be a blocker.
4) Interestingly - only NFS v4.2 fails, test case runs fine with 4.1 or 3.X.
@Frank Filz can you take a look at this one?
DP Updated by Dhairya Parmar almost 2 years ago
- Assignee deleted (
Dhairya Parmar)
FF Updated by Frank Filz almost 2 years ago
Hmm, ceph_fsal_getxattrs handles the ENODATA case.
It would help to understand exactly what the test case failure is.
Also, it would help to have a tcpdump of the failure, especially if we can isolate a short test that triggers the failure.
We could try enabling debug logging in Ganesha.
VS Updated by Venky Shankar almost 2 years ago
Hi Frank,
Frank Filz wrote in #note-12:
Hmm, ceph_fsal_getxattrs handles the ENODATA case.
It would help to understand exactly what the test case failure is.
Right, but AFAICT, there isn't anything in the cephfs (debug) client logs that suspicious, therefore, its a bit hard to write a standalone reproducer.
Also, it would help to have a tcpdump of the failure, especially if we can isolate a short test that triggers the failure.
We don't have isolated reproducer - the only failure is with running fio test with v4.2 (Dhairya mentioned that other versions run just fine). Would it be possible to mimic the fio tests with v4.2 in a debug environment, Frank?
VS Updated by Venky Shankar almost 2 years ago
- Related to Bug #70203: nfs: fio workload in teuthology fails with NFS mount V4.2 added
PD Updated by Patrick Donnelly over 1 year ago
- Target version deleted (
v20.0.0)
KS Updated by Konstantin Shalygin 8 months ago
- Backport changed from squid,reef to squid
VS Updated by Venky Shankar 5 months ago
- Target version set to v22.0.0