Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 881161 - dev-cpp/tbb: please consider to cherry pick fix for sys-devel/mold
Summary: dev-cpp/tbb: please consider to cherry pick fix for sys-devel/mold
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL: https://github.com/oneapi-src/oneTBB/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-11-13 06:33 UTC by tt_1
Modified: 2023-01-05 00:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-11-13 06:33:09 UTC
hey there, I just read the release notes of mold-1.7.0 and it states that a certain fix for dev-cpp/tbb is needed if you do use system-tbb: 

from the release notes: 

mold 1.7.0 is a new release of the high-speed linker.

Just like previous versions, you need to apply oneapi-src/oneTBB@137c1a8 to libtbb if you do not use a bundled version of OneTBB library. OneTBB has merged this patch, but the most recent release of OneTBB hasn't picked it up yet.

link: https://github.com/oneapi-src/oneTBB/commit/137c1a88b690acf3525e0f279720ac489ce66481
Comment 1 tt_1 2022-11-13 06:34:17 UTC
from the issue/bug report:

>On many Unix-like systems, pthread_create can fail spuriously even if
>the running machine has enough resources to spawn a new thread.
>Therefore, if EAGAIN is returned from pthread_create, we actually have
>to try again.

>I observed this issue when running the mold linker
>(https://github.com/rui314/mold) under a heavy load. mold uses OneTBB
>for parallelization.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-19 02:18:46 UTC
Sorry, I thought we had. Good spot!
Comment 3 Larry the Git Cow gentoo-dev 2022-11-19 03:19:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae4a95da4cdb44ac97adfc4c48d89317c315b5d1

commit ae4a95da4cdb44ac97adfc4c48d89317c315b5d1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-19 02:27:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-19 03:19:13 +0000

    dev-cpp/tbb: backport pthread EAGAIN patch for mold
    
    Closes: https://bugs.gentoo.org/881161
    Signed-off-by: Sam James <sam@gentoo.org>

 .../tbb/files/tbb-2021.7.0-pthread-eagain.patch    | 135 +++++++++++++++++++++
 dev-cpp/tbb/tbb-2021.7.0-r1.ebuild                 |  41 +++++++
 2 files changed, 176 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-01-05 00:38:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55b2421aad41d6b1fed898ae6d551fd6f7c7e3d9

commit 55b2421aad41d6b1fed898ae6d551fd6f7c7e3d9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-05 00:38:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-05 00:38:12 +0000

    sys-devel/mold: depend on fixed dev-cpp/tbb for pthreads
    
    Bug: https://bugs.gentoo.org/881161
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/mold/{mold-1.7.1.ebuild => mold-1.7.1-r1.ebuild} | 4 ++--
 sys-devel/mold/{mold-1.8.0.ebuild => mold-1.8.0-r1.ebuild} | 4 ++--
 sys-devel/mold/mold-9999.ebuild                            | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)