From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: posix/tst-spawn5 failes under make -j
Date: Fri, 09 Jul 2021 15:41:54 +0200 [thread overview]
Message-ID: <87tul3hae5.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <983c2a7f-b4f0-07b0-ba65-3f96e5bd8165@linaro.org> (Adhemerval Zanella's message of "Fri, 9 Jul 2021 10:10:12 -0300")
* Adhemerval Zanella:
> On 09/07/2021 06:45, Florian Weimer wrote:
>> This patch adds some additional diagonstics:
>>
>> diff --git a/posix/tst-spawn5.c b/posix/tst-spawn5.c
>> index 277b848794..5ba7c7fadb 100644
>> --- a/posix/tst-spawn5.c
>> +++ b/posix/tst-spawn5.c
>> @@ -116,7 +116,11 @@ handle_restart (int argc, char *argv[])
>> fds[i].found = found = true;
>>
>> if (!found)
>> - FAIL_EXIT1 ("unexpected open file descriptor: %ld", fd);
>> + {
>> + char *path = xasprintf ("/proc/self/fd/%s", e->d_name);
>> + char *resolved = xreadlink (path);
>> + FAIL_EXIT1 ("unexpected open file descriptor %ld: %s", fd, resolved);
>> + }
>> }
>> closedir (dirp);
>>
>> It's the pipe from the make job server:
>>
>> error: tst-spawn5.c:122: unexpected open file descriptor 3: pipe:[9958839]
>>
>> I think the test needs to be changed so that lowfd is passed across the
>> restart, and checking only considers descriptors >= lowfd.
>
> The restart process already receive a list of the expected opened files,
> for instance on my environment it will re-executed with:
>
> handle_restart: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
> handle_restart: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
> handle_restart: 3
> handle_restart:
> handle_restart: 3 4
>
> I am trying to reproduce the issue without much success, even with
> make -j or make posix/tests -j. Maybe we can limit the search to the
> argument range:
make -j2 should do it (make -j without argument probably doesn't involve
the job server), sorry.
The issue is that the verification should start only at lowfd.
This will supercede the STDIN_* checks here:
if (fd == dirfd (dirp)
|| fd == STDIN_FILENO
|| fd == STDOUT_FILENO
|| fd == STDERR_FILENO)
continue;
Thanks,
Florian
next prev parent reply other threads:[~2021-07-09 13:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 9:45 Florian Weimer
2021-07-09 13:10 ` Adhemerval Zanella
2021-07-09 13:41 ` Florian Weimer [this message]
2021-07-09 14:17 ` Adhemerval Zanella
2021-07-09 18:40 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tul3hae5.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).