Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2023 20:30:55 +0100
From:      Kristof Provost <kp@FreeBSD.org>
To:        Brooks Davis <brooks@FreeBSD.org>, jrm@FreeBSD.org
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 8ccd0b876e67 - main - libc: expose execvpe for Linux  compat
Message-ID:  <A8CB3A81-0E01-4A58-9D0A-CD328C672C70@FreeBSD.org>
In-Reply-To: <202312111927.3BBJRWon091352@gitrepo.freebsd.org>
References:  <202312111927.3BBJRWon091352@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=_MailMate_478E9E23-66C9-48D3-A14C-E8D94C1F5B89_=
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Brooks, Joseph,

On 11 Dec 2023, at 20:27, Brooks Davis wrote:
> The branch main has been updated by brooks:
>
> URL: =

> https://cgit.FreeBSD.org/src/commit/?id=3D8ccd0b876e67fda6249f294ff4847=
98cc1e1569f
>
> commit 8ccd0b876e67fda6249f294ff484798cc1e1569f
> Author:     Brooks Davis <brooks@FreeBSD.org>
> AuthorDate: 2023-12-11 19:24:53 +0000
> Commit:     Brooks Davis <brooks@FreeBSD.org>
> CommitDate: 2023-12-11 19:24:53 +0000
>
>     libc: expose execvpe for Linux compat
>
>     We already implemented execvpe internally with an _ prefix in libc =

> so
>     go ahead and expose it for compatibility with Linux.
>
>     This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164.
>
>     Bump __FreeBSD_version for the addition and add definitions to =

> supress
>     compat shims in libzfs (zfs changes were merged from upstream).
>
>     PR:             275370 (request and exp-run (thanks antoine!))
>     Reviewed by:    kevans
>     Differential Revision:  https://reviews.freebsd.org/D42846

I don=E2=80=99t understand why, but this breaks devel/bear (=E2=80=9CTool=
 that =

generates a compilation database for clang tooling=E2=80=9D).

Rather than generate a list of commands it seems to recursively spawn =

endless =E2=80=9Cwrapper=E2=80=9D processes:

```
82661  0  I+       0:00.18 | |     `-- bear -- ls
82662  0  I+       0:06.90 | |       `-- /usr/local/bin/bear intercept =

--library /usr/local/lib/bear/libexec.so --wrapper =

/usr/local/lib/bear/wrapper --wrapper-dir /usr/local/lib/bear/wr
82663  0  I+       0:00.13 | |         `-- /usr/local/lib/bear/wrapper =

--destination dns:///localhost:30309 --execute /bin/ls -- ls
82664  0  I+       0:00.09 | |           `-- /usr/local/lib/bear/wrapper =

--destination dns:///localhost:30309 --execute /bin/ls -- ls
82665  0  I+       0:00.06 | |             `-- =

/usr/local/lib/bear/wrapper --destination dns:///localhost:30309 =

--execute /bin/ls -- ls
82666  0  I+       0:00.06 | |               `-- =

/usr/local/lib/bear/wrapper --destination dns:///localhost:30309 =

--execute /bin/ls -- ls
```

It=E2=80=99s trivially reproducible at least. Without this patch `bear --=
 ls` =

returns immediately and generates a compile_commands.json file (empty, =

but that=E2=80=99s fine here). With it it=E2=80=99ll spin endlessly.

Best regards,
Kristof
--=_MailMate_478E9E23-66C9-48D3-A14C-E8D94C1F5B89_=
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
</head>
<body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty=
le=3D"white-space: normal;">
<p dir=3D"auto">Hi Brooks, Joseph,</p>
<p dir=3D"auto">On 11 Dec 2023, at 20:27, Brooks Davis wrote:</p>
</div><div class=3D"plaintext" style=3D"white-space: normal;"><blockquote=
 style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136=
BCE; color: #136BCE;"><p dir=3D"auto">The branch main has been updated by=
 brooks:</p>
<p dir=3D"auto">URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D=
8ccd0b876e67fda6249f294ff484798cc1e1569f">https://cgit.FreeBSD.org/src/co=
mmit/?id=3D8ccd0b876e67fda6249f294ff484798cc1e1569f</a></p>
<p dir=3D"auto">commit 8ccd0b876e67fda6249f294ff484798cc1e1569f
<br>
Author:     Brooks Davis &lt;brooks@FreeBSD.org&gt;
<br>
AuthorDate: 2023-12-11 19:24:53 +0000
<br>
Commit:     Brooks Davis &lt;brooks@FreeBSD.org&gt;
<br>
CommitDate: 2023-12-11 19:24:53 +0000</p>
<p dir=3D"auto">    libc: expose execvpe for Linux compat</p>
<p dir=3D"auto">    We already implemented execvpe internally with an _ p=
refix in libc so
<br>
    go ahead and expose it for compatibility with Linux.</p>
<p dir=3D"auto">    This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164=
=2E</p>
<p dir=3D"auto">    Bump __FreeBSD_version for the addition and add defin=
itions to supress
<br>
    compat shims in libzfs (zfs changes were merged from upstream).</p>
<p dir=3D"auto">    PR:             275370 (request and exp-run (thanks a=
ntoine!))
<br>
    Reviewed by:    kevans
<br>
    Differential Revision:  <a href=3D"https://reviews.freebsd.org/D42846=
">https://reviews.freebsd.org/D42846</a></p>;
</blockquote></div>
<div class=3D"markdown" style=3D"white-space: normal;">
<p dir=3D"auto">I don=E2=80=99t understand why, but this breaks devel/bea=
r (=E2=80=9CTool that generates a compilation database for clang tooling=E2=
=80=9D).</p>
<p dir=3D"auto">Rather than generate a list of commands it seems to recur=
sively spawn endless =E2=80=9Cwrapper=E2=80=9D processes:</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; border=
: thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #=
E4E4E4;"><code style=3D"padding: 0 0.25em; background-color: #E4E4E4;">82=
661  0  I+       0:00.18 | |     `-- bear -- ls
82662  0  I+       0:06.90 | |       `-- /usr/local/bin/bear intercept --=
library /usr/local/lib/bear/libexec.so --wrapper /usr/local/lib/bear/wrap=
per --wrapper-dir /usr/local/lib/bear/wr
82663  0  I+       0:00.13 | |         `-- /usr/local/lib/bear/wrapper --=
destination dns:///localhost:30309 --execute /bin/ls -- ls
82664  0  I+       0:00.09 | |           `-- /usr/local/lib/bear/wrapper =
--destination dns:///localhost:30309 --execute /bin/ls -- ls
82665  0  I+       0:00.06 | |             `-- /usr/local/lib/bear/wrappe=
r --destination dns:///localhost:30309 --execute /bin/ls -- ls
82666  0  I+       0:00.06 | |               `-- /usr/local/lib/bear/wrap=
per --destination dns:///localhost:30309 --execute /bin/ls -- ls
</code></pre>
<p dir=3D"auto">It=E2=80=99s trivially reproducible at least. Without thi=
s patch <code style=3D"padding: 0 0.25em; background-color: #E4E4E4;">bea=
r -- ls</code> returns immediately and generates a compile_commands.json =
file (empty, but that=E2=80=99s fine here). With it it=E2=80=99ll spin en=
dlessly.</p>
<p dir=3D"auto">Best regards,<br>
Kristof</p>

</div>
</div>
</body>

</html>

--=_MailMate_478E9E23-66C9-48D3-A14C-E8D94C1F5B89_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8CB3A81-0E01-4A58-9D0A-CD328C672C70>