Open lfogel opened 9 years ago
This issue likely goes deeper than that. The alloc_contig(3) function is just a thin wrapper around mmap(2), and the actual issue most likely has something to do with the type of memory that VM allocates for these requests. I know that there have been issues with contiguously allocated memory on ARM, which have ultimately led to file systems no longer using this kind of memory for their buffer caches. I'm afraid I don't know any more details and I hope someone else can chime in here..
I've been tracking a bug that randomly appears in the eMMC driver, and I think I've found where it is hiding: the alloc_contig() function in the libsys. The bug triggers a "start reading past drive size" warning message from the block driver when a user tries to read a partition. This function is used by the libblockdriver, which is linked to the ARM eMMC and SD (mmc) drivers, and maybe others. I don't know whether the bug appears in other drivers and plataforms (i.e. x86). Please, find attached a patch that modifies the "hello" driver. In order to reproduce the bug, load and unload the driver, repeatedly:
Occasionally, the hello_read() function won't show the "Hello, World!" message.