public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: Ulrich Mueller <ulm@gentoo.org>, Zac Medico <zmedico@gentoo.org>
Cc: "Michał Górny" <mgorny@gentoo.org>, gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] config.environ: delay export of A and AA (bug 720180)
Date: Tue, 26 May 2020 12:07:30 -0700	[thread overview]
Message-ID: <8b483380-edb6-0498-febe-15d912866e00@gentoo.org> (raw)
In-Reply-To: <u8shesitq@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 2116 bytes --]

On 5/26/20 10:32 AM, Ulrich Mueller wrote:
>>>>>> On Tue, 26 May 2020, Zac Medico wrote:
> 
>> On 5/26/20 12:48 AM, Michał Górny wrote:
>>> On Mon, 2020-05-25 at 21:31 -0700, Zac Medico wrote:
>>>> Since variables like A and AA can contain extremely large values which
>>>> may trigger E2BIG errors during attempts to execute subprocesses, delay
>>>> export until the last moment, and unexport when appropriate.
>>>
>>> Please don't.  This will only hide the problem from developers who will
>>> unknowingly commit broken ebuilds and cause users of alternative package
>>> managers to suffer.
> 
>> We've seen in https://bugs.gentoo.org/719202 that developers can already
>> do that with existing versions of portage, since the failure can be
>> dependent on USE configuration.
> 
> We have seen in bug 719202 that A has exceeded _SC_ARG_MAX which is
> 128 KiB.
> 
> However, your commit message mentions E2BIG which will trigger at a much
> larger value, namely 2 MiB. We are far away from reaching that limit in
> any ebuild.
> 
> These are separate issues (although related), so I think we should make
> it very clear about which one we're talking.
> 
> Ulrich
> 
If we want to differentiate between these things then that's fine with me,
however, I have not seen an error other than errno 7 which I thought
corresponded to E2BIG. Test case:

$ python -c "import os, subprocess; os.environ['A'] = 131072 * ' '; subprocess.check_call(['echo', 'hello world'])"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.6/subprocess.py", line 306, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 287, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 7] Argument list too long: 'echo'
-- 
Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 343 bytes --]

  reply	other threads:[~2020-05-26 19:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  4:31 [gentoo-portage-dev] [PATCH] config.environ: delay export of A and AA (bug 720180) Zac Medico
2020-05-26  7:48 ` Michał Górny
2020-05-26 16:57   ` Zac Medico
2020-05-26 17:32     ` Ulrich Mueller
2020-05-26 19:07       ` Zac Medico [this message]
2020-05-26  8:43 ` Alec Warner
2020-05-26 16:46   ` Zac Medico
2020-05-26 17:16     ` Alec Warner
2020-05-26 17:40       ` Zac Medico

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=8b483380-edb6-0498-febe-15d912866e00@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    --cc=ulm@gentoo.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