-
Notifications
You must be signed in to change notification settings - Fork 220
Description
Describe the bug
I have noticed that a prime sieve might give me an incorrect count of primes mostly shortly after the boot.
I do not think that it is a SW bug since sanitizers report no errors and I observed both:
- the incorrect count (some ones were zeroed)
- the correct count but later write of the memory image to file contained some bits cleared (cleared between the counting and write to a binary file)
There is one example for the second case:
$ cmp -l memory_primes_right.img memory_primes_right_differ.img
5985247185 100 0
5985247187 40 0
5985247189 2 0
5985247191 21 0
5985247192 40 0
5985247193 100 0
5985247194 100 0
5985247195 42 0
5985247196 1 0
5985247197 1 0
5985247201 44 0
5985247202 4 0
5985247204 2 0
5985247209 10 0
5985247210 202 0
5985247211 54 0
5985247212 20 0
5985247213 200 0
5985247214 100 0
5985247215 2 0
5985247216 200 0
It seems to me that memory refresh interval is too long which maybe depends on the temperature or other tuning parameters. Note that memory images have 6750 MB (primes to 100 G) and I have not observed these mismatched on x86_64 architecture.
Steps to reproduce the behaviour
I may provide the source code if desired, or other memory tester writing patterns and reading them with a delay (under the full load) may help.
Device (s)
Raspberry Pi 5
Bootloader configuration.
[all]
BOOT_UART=1
POWER_OFF_ON_HALT=0
BOOT_ORDER=0xf146
SDRAM_BANKLOW=1
System
Raspberry Pi reference 2024-07-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 48efb5fc5485fafdc9de8ad481eb5c09e1182656, stage5
vcgencmd bootloader_version
2025/03/27 00:16:44
version 897f94edff080e2b325930669fa4e9caf469e090 (release)
timestamp 1743034604
update-time 1746369352
capabilities 0x0000007f
vcgencmd version
2025/03/27 00:16:44
Copyright (c) 2012 Broadcom
version 897f94ed (release) (embedded)
uname -a
Linux raspberrypi 6.12.25-bpf+ #1 SMP PREEMPT Sun May 4 15:25:58 CEST 2025 aarch64 GNU/Linux
Bootloader logs
No response
USB boot
No response
NVMe boot
No response
Network (TFTP boot)
No response