From: Daniele Buono <dbuono@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: Re: [PATCH 2/2] gitlab-ci.yml: Add jobs to test CFI flags
Date: Wed, 24 Feb 2021 12:55:03 -0500 [thread overview]
Message-ID: <b8a6d3be-727e-9006-e6f8-c80c918d8caa@linux.vnet.ibm.com> (raw)
In-Reply-To: <e9973878-6181-41c6-5e65-afd07db7c476@redhat.com>
On 2/23/2021 3:11 AM, Paolo Bonzini wrote:
> On 23/02/21 00:01, Daniele Buono wrote:
>> +# Set JOBS=1 because this requires LTO and ld consumes a large amount
>> of memory.
>> +# On gitlab runners, default JOBS of 2 sometimes end up calling 2 lds
>> concurrently
>> +# and triggers an Out-Of-Memory error
>
> Does it make sense to test only one target instead?
I'd prefer grouping multiple targets per job so that the number of jobs
doesn't explode, and stopping ninja from linking in parallel does solve
the issue.
There's also the issue that tests are also compiled here so you may end
up with two linkers anyway. However the chance that this will end up in
an out-of-memory error is quite smaller (possibly zero) since tests
don't link that many object files together.
>
>> +# Because of how slirp is used in QEMU, we need to have CFI also on
>> libslirp.
>> +# System-wide version in fedora is not compiled with CFI so we
>> recompile it using
>> +# -enable-slirp=git
>
> Can you explain what you mean, and perhaps add a check or warning for
> incompatible settings?
Certainly. The issue here is that there is a function in libslirp that
is used as callbacks for QEMU Timers: ra_timer_handler
(There may be others, but of this one I'm sure because I traced it).
This is not an issue when you compile slirp with qemu, since the whole
library now has CFI informations and is statically linked in the QEMU
binary. It becomes an issue if you are dynamically linking a system-wide
libslirp, as it happens on Fedora.
I'd be happy to add a check on configure/meson that ends the configure
step with an error when this happens, but that would technically be an
independent patch that I'd work on in parallel to this one.
I would prefer to not automatically select the git-based libslirp
because that may go unnoticed when configuring.
>
> Paolo
>
next prev parent reply other threads:[~2021-02-24 17:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 23:01 [PATCH 0/2] gitlab-ci.yml: Add jobs to test CFI Daniele Buono
2021-02-22 23:01 ` [PATCH 1/2] gitlab-ci.yml: Allow custom make parallelism Daniele Buono
2021-02-23 8:12 ` Paolo Bonzini
2021-02-23 19:34 ` Daniele Buono
2021-02-24 7:44 ` Paolo Bonzini
2021-02-24 18:02 ` Daniele Buono
2021-02-23 15:03 ` Wainer dos Santos Moschetta
2021-02-22 23:01 ` [PATCH 2/2] gitlab-ci.yml: Add jobs to test CFI flags Daniele Buono
2021-02-23 8:11 ` Paolo Bonzini
2021-02-24 17:55 ` Daniele Buono [this message]
2021-02-24 18:28 ` Paolo Bonzini
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=b8a6d3be-727e-9006-e6f8-c80c918d8caa@linux.vnet.ibm.com \
--to=dbuono@linux.vnet.ibm.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/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 NNTP newsgroup(s).