Most recent kernel where this bug did *NOT* occur: Unknown Hardware Environment: Itanium or x86 chip with SMP enabled Software Environment: 2.6 kernel with SMP enabled Problem Description: Data received is corrupted - contains mix of expected data and data from previous sendfile call. Steps to reproduce: 1. Allocate a file buffer and mmap it. 2. Next, the buffer is filled with the contents of a file, or manually filled with the same character via a loop. 3. A very small header is appended to the buffer (some blank space was left during the previous step.) 4. The buffer is sent via sendfile() 5. The client receives the buffer and checks it for corruption.
Created attachment 9765 [details] Test case with readme file
2.6.15 is rather old, can you confirm this happens with 2.6.19? Thanks, Nish
I can confirm that the bug appears on the 2.6.17 kernel. Unfortunately, I don't have access to a machine with 2.6.19, and redhat hasn't updated the yum repo yet. I will see if I manually update the kernel.
Sorry that took so long, the upgrade was not an easy one. Anyway, I can confirm that the bug is still present in 2.6.19
I believe that this bug may be related to a similar one that was recently fixed, where memory pages were not being properly marked as dirty, due to concurrent access. (http://lkml.org/lkml/2006/12/29/44) I applied the patch and got no change. Is there anywhere else where pages are marked dirty, or not properly protected from multi-threaded access?
See http://thread.gmane.org/gmane.linux.kernel/488806/focus=54629