[PATCH] Increase the amount of data tested in stdio-common/tst-fwrite-bz29459.c
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Fri Feb 14 14:32:26 GMT 2025
On 14/02/25 10:45, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
>
>> On 14/02/25 09:43, Tulio Magno Quites Machado Filho wrote:
>>> Florian Weimer <fweimer@redhat.com> writes:
>>>
>>>> Have you applied the patch? We saw this as well. But with the patch, 6
>>>> million bytes are written, which I believe exceeds even the most
>>>> generous kernel pipe buffer.
>>>
>>> I decided to test this myself.
>>> The test does fail very frequently when the system is under high load.
>>> I was able to reproduce the issue in less than 10s when executing this
>>> test in a loop.
>>>
>>> After applying this patch, I left the test running in a loop on high
>>> load. It's been running for 14h+ without any failures.
>>> I believe this is indeed an effective fix.
>>>
>>> Adhemerval, would you object to applying this patch as-is?
>>>
>>
>> The main problem with this test is pipe buffer configurable but the caller
>> (in this case the shell), and on Linux the default size depends on the page
>> size.
>>
>> If the idea is to force a pipe write error, I think using a buffer larger
>> than the default pipe buffer would be better. Something like:
>
> I believe Tulio's patch achieves that. The idea is to stay close to the
> reported reproducer.
The test issues a lot of fwrite in hope it would fill pipe buffer in time,
I think forcing a failure without resorting to system specific is kinda
more robust.
But I don't really opposes to this issue, I just think my idea is simpler
to trigger the issue we are trying to test.
>
> I think there is still gap with SSH testing due to network buffering.
> Fixing this gap could involve a custom head implementation that would
> run from the test itself, after fork.
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list