Skip to content

Conversation

@DavidSpickett
Copy link
Collaborator

Since we (Linaro) moved out bots to a new machine, this test has been failing:
https://lab.llvm.org/buildbot/#/builders/121/builds/1566

Most of the time, the rss difference is greater than 512 on the first iteration then settles down to 512 for all the rest.

starting rss 512 shadow pages: 1024 p = 0xe083e0800000 1536 -> 740 diff 796 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 p = 0xe083e0800000 passed 1 out of 10 release-shadow.c.tmp: /home/tcwg-buildbot/worker/clang-aarch64-lld-2stage/llvm/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c:81: int main(): Assertion `success_count > total_count * 0.8' failed. 

Given that the test was looking for a diff of at least 513, I guess that 512 is ok too.

For future reference, the original bot host was running this kernel: Linux 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:51:36 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

And the new host:
Linux 6.8.0-64-generic #67-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 15 20:23:40 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

Though the new host also has more RAM, so the kernel may be less aggresive with memory management.

Since we (Linaro) moved out bots to a new machine, this test has been failing: https://lab.llvm.org/buildbot/#/builders/121/builds/1566 Most of the time, the rss difference is greater than 512 on the first iteration then settles down to 512 for all the rest. ``` starting rss 512 shadow pages: 1024 p = 0xe083e0800000 1536 -> 740 diff 796 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 p = 0xe083e0800000 passed 1 out of 10 release-shadow.c.tmp: /home/tcwg-buildbot/worker/clang-aarch64-lld-2stage/llvm/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c:81: int main(): Assertion `success_count > total_count * 0.8' failed. ``` Given that the test was looking for a diff of at least 513, I guess that 512 is ok too. For future reference, the original bot host was running this kernel: Linux 5.15.0-136-generic llvm#147-Ubuntu SMP Sat Mar 15 15:51:36 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux And the new host: Linux 6.8.0-64-generic #67-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 15 20:23:40 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux Though the new host also has more RAM, so the kernel may be less aggresive with memory management.
@llvmbot
Copy link
Member

llvmbot commented Aug 12, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: David Spickett (DavidSpickett)

Changes

Since we (Linaro) moved out bots to a new machine, this test has been failing:
https://lab.llvm.org/buildbot/#/builders/121/builds/1566

Most of the time, the rss difference is greater than 512 on the first iteration then settles down to 512 for all the rest.

starting rss 512 shadow pages: 1024 p = 0xe083e0800000 1536 -> 740 diff 796 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 1252 -> 740 diff 512 p = 0xe083e0800000 passed 1 out of 10 release-shadow.c.tmp: /home/tcwg-buildbot/worker/clang-aarch64-lld-2stage/llvm/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c:81: int main(): Assertion `success_count > total_count * 0.8' failed. 

Given that the test was looking for a diff of at least 513, I guess that 512 is ok too.

For future reference, the original bot host was running this kernel: Linux 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:51:36 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

And the new host:
Linux 6.8.0-64-generic #67-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 15 20:23:40 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

Though the new host also has more RAM, so the kernel may be less aggresive with memory management.


Full diff: https://github.com/llvm/llvm-project/pull/153181.diff

1 Files Affected:

  • (modified) compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c (+1-1)
diff --git a/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c b/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c index c17dc8453f82c..db9df0ac9f6a6 100644 --- a/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c +++ b/compiler-rt/test/hwasan/TestCases/Linux/release-shadow.c @@ -57,7 +57,7 @@ int test_rss_difference(void *p) { size_t diff = rss_before - rss_after; fprintf(stderr, "diff %zu\n", diff); // Check that the difference is at least close to kNumShadowPages. - return diff > kNumShadowPages / 2; + return diff >= kNumShadowPages / 2; } int main() { 
@DavidSpickett
Copy link
Collaborator Author

At times I do see 1024 diference, which I think is the upper limit we'd expect.

starting rss 512 shadow pages: 1024 p = 0xea9868000000 1536 -> 511 diff 1025 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 1535 -> 511 diff 1024 p = 0xea9868000000 

So I think the mechanism is working just to different extents and it was not exactly 512 until now.

@DavidSpickett
Copy link
Collaborator Author

Since this isn't going to break any bot currently passing, I'm going to merge this to get our bot green again.

Happy to implement a better fix, or investigate if there's a real problem here.

@DavidSpickett DavidSpickett merged commit b0151cb into llvm:main Aug 14, 2025
13 checks passed
@DavidSpickett DavidSpickett deleted the hwasan-shadow branch August 14, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants