Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938598 - ebuild fails under distcc with proxy error
Summary: ebuild fails under distcc with proxy error
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-28 16:43 UTC by Chris
Modified: 2025-02-16 15:17 UTC (History)
2 users (show)

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


Attachments
OUTPUT of emerge --info AND ebuild dev-lang/perl-5.38.2-r3.ebuild compile (file_938598.txt,106.88 KB, text/plain)
2024-08-28 16:43 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2024-08-28 16:43:04 UTC
Created attachment 901415 [details]
OUTPUT of emerge --info  AND ebuild dev-lang/perl-5.38.2-r3.ebuild compile

While using distcc and updating world during a stage3 install, spurious distcc errors occur and cause the emerge to fail on specific packages.

These errors don't persist when using make/distcc to build the same prepared source in a separate workdir, but are repeatable when using ebuild or emerge.

The distcc errors report SOCKS5 connection errors - no SOCKS5 is in use, only local LAN distcc client/server hosts on the same subnet.

exerpt from full log (attached), when merging dev-lang/perl-5.38.2-r3:
distcc[24086] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x05

The distcc ebuild contains:
	# SOCKSv5 support needed for Portage, bug #537616
	"${FILESDIR}/${PN}-3.2_rc1-socks5.patch"

And the relevant source indicates the `DISTCC_SOCKS_PROXY` environment variable controls the behavior, but this variable is not set.

distcc is installed using instructions at wiki.gentoo.org/wiki/Distcc#With_Portage

livecd /work # distcc-config --get-env
# This file is managed by distcc-config; use it to change these settings.
# DISTCC_LOG and DISTCC_DIR should not be set.
DISTCC_VERBOSE="0"
DISTCC_FALLBACK="1"
DISTCC_SAVE_TEMPS="0"
DISTCC_TCP_CORK=""
DISTCC_SSH=""
UNCACHED_ERR_FD=""
DISTCC_ENABLE_DISCREPANCY_EMAIL=""
DCC_EMAILLOG_WHOM_TO_BLAME=""
Comment 1 Zac Medico gentoo-dev 2024-08-29 21:31:44 UTC
(In reply to Chris from comment #0)
> The distcc errors report SOCKS5 connection errors - no SOCKS5 is in use,
> only local LAN distcc client/server hosts on the same subnet.

Portage provides an internal SOCKS5 proxy so that FEATURES=distcc can work with FEATURES=network-sandbox enabled. So, you could test to verify that FEATURES=-network-sandbox suppresses your issue.
Comment 2 Christophe PEREZ 2025-02-15 21:11:04 UTC
(In reply to Zac Medico from comment #1)
> (In reply to Chris from comment #0)
> > The distcc errors report SOCKS5 connection errors - no SOCKS5 is in use,
> > only local LAN distcc client/server hosts on the same subnet.
> 
> Portage provides an internal SOCKS5 proxy so that FEATURES=distcc can work
> with FEATURES=network-sandbox enabled. So, you could test to verify that
> FEATURES=-network-sandbox suppresses your issue.

I realized I had the same error. I don't know where it comes from or how long it's been (I've been using distcc for a long time) and adding FEATURES=network-sandbox unfortunately didn't change anything.
Comment 3 Christophe PEREZ 2025-02-15 21:12:04 UTC
# grep ^distcc /var/log/portage/net-nntp:pan-0.162:20250215-210900.log
distcc[54] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x04
distcc[56] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x04
distcc[53] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x04
distcc[55] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x04
distcc[57] (dcc_connect_via_socks5) ERROR: proxy connection failed, reason=0x04
Comment 4 Zac Medico gentoo-dev 2025-02-16 03:03:53 UTC
(In reply to Christophe PEREZ from comment #2)
> (In reply to Zac Medico from comment #1)
> > (In reply to Chris from comment #0)
> > > The distcc errors report SOCKS5 connection errors - no SOCKS5 is in use,
> > > only local LAN distcc client/server hosts on the same subnet.
> > 
> > Portage provides an internal SOCKS5 proxy so that FEATURES=distcc can work
> > with FEATURES=network-sandbox enabled. So, you could test to verify that
> > FEATURES=-network-sandbox suppresses your issue.
> 
> I realized I had the same error. I don't know where it comes from or how
> long it's been (I've been using distcc for a long time) and adding
> FEATURES=network-sandbox unfortunately didn't change anything.

You should try FEATURES="-network-sandbox" with emphasis on the minus (-) sign.
Comment 5 Christophe PEREZ 2025-02-16 14:57:51 UTC
(In reply to Zac Medico from comment #4)
> You should try FEATURES="-network-sandbox" with emphasis on the minus (-)
> sign.

Oh, sorry, I didn't see the "-".

Now, I only have :
distcc[54] ERROR: nonblocking connect to 192.168.5.102:3632 failed: No route to host

which is more "normal".

Thanks !
Comment 6 Christophe PEREZ 2025-02-16 15:17:09 UTC
What surprises me in fact is that I have a script that exports DISTCC_HOSTS according to the state of the hosts, but it seems to me that distcc no longer takes this into account since it tries to use 192.168.5.102 while I have exported DISTCC_HOSTS=localhost/6 in the logs.