This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/2] posix: Implement preadv2 and pwritev2


On Fri, Jun 2, 2017 at 10:07 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
> On 02/06/2017 10:34, Florian Weimer wrote:
>> On 06/02/2017 03:04 PM, Zack Weinberg wrote:
>>> I see this as well, for both tst-preadvwritev2 and
>>> tst-preadvwritev64v2 on my x86-64 machine (kernel 4.9).  Like HJ, if I
>>> run the test manually, it succeeds.
>>
>> I see this on x86-64.
>>
>> pwritev2(3,
>> [{iov_base="\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360",
>> iov_len=32},
>> {iov_base="\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17"...,
>> iov_len=64}], 2, 0, 0x30 /* RWF_??? */) = -1 EOPNOTSUPP (Operation not
>> supported)
>>
>> On a kernel which supports pwritev2 in general.  I do not know yet where
>> the 0x30 comes from.
>>
>> Florian
>>
>
> This one still puzzles me, on 4.10.0 with gcc 6.3.0 I am seeing:
>
> [...]
> [pid 28447] setpgid(0, 0)               = 0
> [pid 28447] pwritev2(3, [{"\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360", 32}, {"\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17"..., 64}], 2, 0, 0) = 96
> [pid 28447] pwritev2(3, [{"\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360", 32}, {"\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17"..., 64}], 2, 96, 0) = 96
> [pid 28447] preadv2(3, [{"\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360", 32}, {"\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17"..., 64}], 2, 0, 0) = 96
> [pid 28447] preadv2(3, [{"\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360\360", 32}, {"\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17"..., 64}], 2, 96, 0) = 96
> [pid 28447] getpid()                    = 28447
> [...]
>
> This only issue I can think of is something very fuzzy in test build or a miscompilation.

There's gotta be something wonky with the argument passing. Maybe try
running the test case under valgrind?  Also this trick often helps
when a failure goes away when you run it manually:

export CHANGE_SIZE_OF_ENV=""
while
    the-command-that-should-fail
do
    CHANGE_SIZE_OF_ENV="${CHANGE_SIZE_OF_ENV}x"
    echo -n .
done; echo

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]