Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test failure] test_reclaimFilePageCache fails on Amazon Linux 2023 AARCH64 #897

Open
poiuj opened this issue Aug 12, 2024 · 3 comments · May be fixed by #1379
Open

[Test failure] test_reclaimFilePageCache fails on Amazon Linux 2023 AARCH64 #897

poiuj opened this issue Aug 12, 2024 · 3 comments · May be fixed by #1379
Assignees
Labels
test-failure An issue indicating a test failure

Comments

@poiuj
Copy link
Contributor

poiuj commented Aug 12, 2024

test_reclaimFilePageCache consistently fails on Amazon Linux 2023:

[test_reclaimFilePageCache - unit/test_util.c:302] Failed assertion: !cache_exist(fd)
[fail] - test_util.c:test_reclaimFilePageCache

The test successfully creates the tmp file. But looks like fadvise doesn't behave as expected. Another option is that mincore doesn't behave inside cache_exists test utility.

Kernel info:

$ uname -srv
Linux 6.1.87-99.174.amzn2023.aarch64 #1 SMP Tue Apr 23 00:06:47 UTC 2024
@poiuj poiuj changed the title [Test failure] test_reclaimFilePageCache fails on Amazon Linux 2023 [Test failure] test_reclaimFilePageCache fails on Amazon Linux 2023 AARCH64 Aug 12, 2024
@madolson madolson added the test-failure An issue indicating a test failure label Aug 12, 2024
@haoqixu
Copy link
Contributor

haoqixu commented Aug 27, 2024

I try to reproduce this failure on

Linux archlinux 6.10.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 15 Aug 2024 00:25:30 +0000 x86_64 GNU/Linux

and

Linux centos 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

It consistently fails with a path on tmpfs in both environments, and I suspect that the reclaimFilePageCache (POSIX_FADV_DONTNEED) does not function with tmpfs.

Can you please confirm if your /tmp is mounted as a tmpfs? @poiuj

@poiuj
Copy link
Contributor Author

poiuj commented Aug 29, 2024

Yes:

tmpfs             248G  8.0K  248G   1% /tmp

@xbasel xbasel self-assigned this Dec 1, 2024
@xbasel
Copy link
Member

xbasel commented Dec 1, 2024

Looks like posix_fadvise with POSIX_FADV_DONTNEED has no impact on tmpfs because tmpfs stores data in memory, not on disk,(so page cache / optimizations is likely to be skipped).
I suspect this is the relevant kernel code:
https://github.com/torvalds/linux/blob/master/mm/fadvise.c#L51

@xbasel xbasel linked a pull request Dec 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-failure An issue indicating a test failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants