[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    AW: [bug] dd piped input truncates ~1% of values to %4096 on multi-core systems
From:       Walter Harms <wharms () bfs ! de>
Date:       2020-11-30 12:09:52
Message-ID: 7e7e03fa36fa4eb2a6f14554a452e0b9 () bfs ! de
[Download RAW message or body]

I do not think so,
full_block switches from safe_read to full_read
where full_read is while() safe_read()

I guess read gets "interrupted" and returns before everything is
read. But really i have no idea where to search (OS, Libc, ...) but 
i would say disabling the buffer is a good start (and easy done).

re,
 wh
________________________________________
Von: John Thomson <lists@johnthomson.fastmail.com.au>
Gesendet: Montag, 30. November 2020 10:00
An: Walter Harms; busybox@busybox.net
Betreff: Re: [bug] dd piped input truncates ~1% of values to %4096 on multi-core systems

On Mon, 30 Nov 2020, at 08:39, Walter Harms wrote:
> did you play with the buffering (man stdbuf) ?
> I suspect the kernel has a more aggressive buffering these days.
> In one project i had to add fflush() to make sure that i really get all
> data. I never found a good explanation.

I will look into it. Thank you.

I have now found the fullblock iflag [1], which consistently gives me the expected result.
Guessing the issue I was seeing relates to my bs being greater than PIPE_BUF?

[1]: https://git.busybox.net/busybox/commit/coreutils/dd.c?id=77a6678c427db5ea15d6d0005a579f441277df06

Cheers,
--
  John Thomson
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic