Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 821505 - www-client/firefox: PGO: Error: Channel closing: too late to send/recv, messages will be lost
Summary: www-client/firefox: PGO: Error: Channel closing: too late to send/recv, messa...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 826954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-03 17:16 UTC by Adel KARA SLIMANE
Modified: 2021-12-13 11:50 UTC (History)
24 users (show)

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


Attachments
Firefox 94 PGO build log (firefox-pgo-build.tar.xz,370.57 KB, application/x-xz)
2021-11-03 17:22 UTC, Adel KARA SLIMANE
Details
emerge info (emerge-info,6.71 KB, text/plain)
2021-11-03 17:23 UTC, Adel KARA SLIMANE
Details
ebuild patch to build with older llvm (firefox-94-llvm.patch,798 bytes, patch)
2021-11-03 22:00 UTC, Patrick McLean
Details | Diff
Firefox 94 with PGO build fail log (FF94-pgo-fail.log,6.52 KB, text/x-log)
2021-11-04 08:39 UTC, Ivan
Details
Firefox 94.0.1 PGO build with fresh LLVM bootstrapped toolchain (firefox-pgo-build-fresh-llvm.tar.xz,371.88 KB, application/x-xz)
2021-11-04 15:39 UTC, Adel KARA SLIMANE
Details
build.log.xz (build.log.xz,478.00 KB, application/x-xz)
2021-11-10 16:36 UTC, John Helmert III
Details
firefox-94.0.1-r1 pgo+lto successfull merge but with error message (firefox-94.0.1-r1-success-error-message.tar.xz,714.61 KB, application/x-xz)
2021-11-14 18:07 UTC, Adel KARA SLIMANE
Details
Self built directly from source firefox lto+pgo (firefox-94.0.1-r1-pgo-lto-self-built,937.62 KB, application/octet-stream)
2021-11-14 22:51 UTC, Adel KARA SLIMANE
Details
emerge --info for successful firefox 95 PGO+LTO build (emerge-info-new,6.72 KB, text/plain)
2021-12-12 13:10 UTC, Adel KARA SLIMANE
Details
Build log for successful firefox 95 build (still with error messages and a finite hang) (firefox-95-pgo-lto-emerge-successful.tar.xz,735.89 KB, application/x-xz)
2021-12-12 13:11 UTC, Adel KARA SLIMANE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adel KARA SLIMANE 2021-11-03 17:16:40 UTC
Hello,

Every time I build firefox, now with 94, with PGO I get this type of error messages

```
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/tmp/portage/www-client/firefox-94.0/temp/tmp4bt0ilyf/search.json.mozlz4", (void 0)))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

jarlog: /var/tmp/portage/www-client/firefox-94.0/work/firefox_build/jarlog/en-US.log
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"MediaTrackGraph 7f81618cf000 shutdown","state":"(none)","filename":"/var/tmp/portage/www-client/firefox-94.0/work/firefox-94.0/dom/media/MediaTrackGraph.cpp","lineNumber":1809,"stack":"MediaTrackGraph shutdown"}] Barrier: xpcom-will-shutdown
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 5098: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWindowMediator.getEnumerator]

```

And it seems that the emerge is idle at these moments (htop reports no core at full/any significant load), and it does not seem to complete with firefox 94 (it's been more than an hour). Emerging with PGO used to take around 25mins on my machine and 8mins without (firefox 94 completes without PGO).

I am not sure anymore that PGO is doing its mojo properly given the errors/timeouts that occur so I am opening this bug report to get feedback on the matter.

Thanks!

Adel
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-03 17:17:33 UTC
Yeah, I've reproduced this hang too. Can you attach the log up to the point of hang and emerge --info please?
Comment 2 Adel KARA SLIMANE 2021-11-03 17:22:58 UTC
Created attachment 748290 [details]
Firefox 94 PGO build log
Comment 3 Adel KARA SLIMANE 2021-11-03 17:23:12 UTC
Created attachment 748293 [details]
emerge info
Comment 4 crabbed halo ablution 2021-11-03 18:59:01 UTC
I get the same hang while building with [pgo]. Building with [-pgo] gets me a hangy firefox with messages likes this in journalctl:
Nov 03 15:19:04 saga.alfsgard.dk firefox.desktop[584836]: ###!!! [Parent][MessageChannel] Error: (msgtype=0x5B0013,name=PHttpChannel::Msg_DeleteSelf) Channel error: cannot send/recv
Nov 03 15:19:04 saga.alfsgard.dk firefox.desktop[584836]: ###!!! [Parent][MessageChannel] Error: (msgtype=0x390078,name=PContent::Msg_DestroyBrowsingContextGroup) Channel error: cannot send/recv
Nov 03 15:19:04 saga.alfsgard.dk firefox.desktop[584836]: ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Nov 03 15:19:04 saga.alfsgard.dk systemd[1329]: app-gnome-firefox-584836.scope: Consumed 10min 24.218s CPU time.

Downgrading the following packages fixes the build hang with [pgo] and the runtime hang with [-pgo]:
(entries from package.mask)
sys-devel/clang:13
sys-devel/llvm:13
sys-devel/clang-runtime:13.0.0
>=sys-devel/llvmgold-13
>=sys-devel/lld-13
=sys-devel/llvmgold-13*
>=dev-lang/rust-1.56
>=virtual/rust-1.56

I'm unsure if it's the llvm or the rust downgrade that fixes this. Probably llvm, since that was my main suspect but rust-1.56[system-bootstrap] requires llvm-13 so that got downgraded alongside it.
Comment 5 Adel KARA SLIMANE 2021-11-03 19:15:40 UTC
Yes I confirm that the non-pgo firefox 94 is buggy on my side too, when built with rust 1.56.1 and llvm 13.0.0.
Comment 6 Patrick McLean gentoo-dev 2021-11-03 21:53:07 UTC
The hangs were present in firefox-93* as well.
Comment 7 Patrick McLean gentoo-dev 2021-11-03 22:00:19 UTC
Created attachment 748347 [details, diff]
ebuild patch to build with older llvm

This patch forces firefox to use the llvm and rust versions.
Comment 8 Michael Cook 2021-11-04 00:09:51 UTC
(In reply to Patrick McLean from comment #6)
> The hangs were present in firefox-93* as well.

I can confirm I had issues with 93 as well. Still building without PGO with 94.
Comment 9 Andy Pettinger 2021-11-04 04:46:12 UTC
I too can confirm the pgo problem using llvm 13 and rust 1.56.1 with Firefox 93/94. 
My (-pgo) 94.0.1 build works fine and I don't see the hangy/buggy problems reported in comments 4 and 5
Comment 10 Ivan 2021-11-04 08:39:38 UTC
Created attachment 748557 [details]
Firefox 94 with PGO build fail log

Same thing happens with my build.

I also noticed that there's a line with: 

ACCESS DENIED:  open_wr:       /dev/nvidiactl

Not sure if it has to do anything with the actual fail or is a separate issue.
Comment 11 Adel KARA SLIMANE 2021-11-04 12:01:43 UTC
I downloaded the source code tar of Firefox 94, created the following `mozconfig` file

```
ac_add_options --with-libclang-path=/usr/lib/llvm/13/lib64
ac_add_options MOZ_PGO=1
mk_add_options MOZ_PARALLEL_BUILD=32
export RUSTC_OPT_LEVEL=2
```

then did this

```
export MACH_USE_SYSTEM_PYTHON=1
export RANLIB=llvm-ranlib
export NM=llvm-nm
export CXX=clang++
export CC=clang
export AR=llvm-ar

./mach build
```

At the end of the first build, a Firefox window opens and runs many tests by opening a tab, running a test, closing the tab. In the middle of it the same error messages show

```
15:29.10 gmake: Leaving directory '/media/personal/Downloads/firefox-94.0.source/firefox-94.0/obj-x86_64-pc-linux-gnu/instrumented'
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/tmphqqrgys3/search.json.mozlz4", (void 0)))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

jarlog: /media/personal/Downloads/firefox-94.0.source/firefox-94.0/obj-x86_64-pc-linux-gnu/jarlog/en-US.log
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"MediaTrackGraph 7f4f54c9c400 shutdown","state":"(none)","filename":"/media/personal/Downloads/firefox-94.0.source/firefox-94.0/dom/media/MediaTrackGraph.cpp","lineNumber":1809,"stack":"MediaTrackGraph shutdown"}] Barrier: xpcom-will-shutdown
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 5098: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWindowMediator.getEnumerator]
ExceptionHandler::GenerateDump cloned child 80708
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Firefox exited with code 11 during profiling
Error running mach:

    ['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file build| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/media/personal/Downloads/firefox-94.0.source/firefox-94.0/obj-x86_64-pc-linux-gnu/instrumented/_virtualenvs/build/bin/python', '/media/personal/Downloads/firefox-94.0.source/firefox-94.0/build/pgo/profileserver.py']' returned non-zero exit status 11.

  File "/media/personal/Downloads/firefox-94.0.source/firefox-94.0/python/mozbuild/mozbuild/build_commands.py", line 214, in build
    subprocess.check_call(pgo_cmd, cwd=instr.topobjdir, env=pgo_env)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
```

But the build does fail after timeout. So it seems to be something not related to the EBUILD itself but something upstream. And given the previous comments, LLVM and Rust seem to not be playing well. 

I tried PGO with GCC 11.2.0 and the same issue happened, though.
Comment 12 Jannik Glückert 2021-11-04 12:22:39 UTC
I could reproduce neither the pgo timeout nor hang / issues with the final application, with llvm 13 and rust 1.56.1

The pgo timeout during build seems to be an issue with sandbox (see also bug 821532 ), but I am still puzzled about the runtime hang in comment 4
Comment 13 Larry the Git Cow gentoo-dev 2021-11-04 12:45:13 UTC
The bug has been referenced in the following commit(s):

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

commit 17e0a35b87856e065b94c42bb96c8cfd4286c933
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-11-04 12:44:20 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-11-04 12:45:04 +0000

    www-client/firefox: allow access to GPU for USE=pgo
    
    Bug: https://bugs.gentoo.org/821505
    Closes: https://bugs.gentoo.org/821526
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-91.3.0.ebuild | 28 ++++++++++++++++++++++++++++
 www-client/firefox/firefox-94.0.1.ebuild | 28 ++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)
Comment 14 Ivan 2021-11-04 12:59:55 UTC
(In reply to Patrick McLean from comment #7)
> Created attachment 748347 [details, diff] [details, diff]
> ebuild patch to build with older llvm
> 
> This patch forces firefox to use the llvm and rust versions.

Thanks, tried your patch and tried building FF-94 with older rust 1.55.0 (binary version if that matters).
Here's the result.

55:01.12 We know it took a while, but your build finally finished successfully!
55:01.12 If you are building Firefox often, SCCache can save you a lot of time. You can learn more here: https://firefox-source-docs.mozilla.org/setup/configuring_build_options.html#sccache
To take your build for a test drive, run: |mach run|
For more information on what to do now, see https://firefox-source-docs.mozilla.org/setup/contributing_code.html
>>> Source compiled.
 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/tmp/portage/www-client/firefox-94.0/temp/sandbox.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /tmp/portage/www-client/firefox-94.0/work/firefox_build/instrumented/dist/firefox/firefox data:text/html,<script>Quitter.quit()</script> -profile /tmp/portage/www-client/firefox-94.0/temp/tmpxi7sq84w 

F: open_wr
S: deny
P: /dev/nvidiactl
A: /dev/nvidiactl
R: /dev/nvidiactl
C: /tmp/portage/www-client/firefox-94.0/work/firefox_build/instrumented/dist/firefox/firefox http://localhost:8888/index.html -profile /tmp/portage/www-client/firefox-94.0/temp/tmpxi7sq84w 
 * --------------------------------------------------------------------------------

emerge --info: https://pastebin.com/ZLZ7Fj8H
Comment 15 Thomas Deutschmann gentoo-dev 2021-11-04 13:59:12 UTC
Ivan, the sandbox violation you experienced was addressed 15min before you posted your answer. Please update repository and try again.

Regarding the issue PGO problem itself:

I am unable to reproduce. Building firefox with PGO/LTO using both CLANG or GCC worked. Tried on stable (12) and unstable (13). All testings were done in fresh images. Due to other bugs I suspect that LLVM/CLANG toolchain for some might be busted. I recommend rebuilding the entire toolchain to be safe.
Comment 16 Adel KARA SLIMANE 2021-11-04 15:38:37 UTC
I rebuilt LLVM/Clang/lld with GCC then rebuilt them with LLVM/Clang/lld, I encounter the same issue.

Should I also rebuild rust ?
Comment 17 Adel KARA SLIMANE 2021-11-04 15:39:22 UTC
Created attachment 748629 [details]
Firefox 94.0.1 PGO build with fresh LLVM bootstrapped toolchain
Comment 18 Ivan 2021-11-04 15:52:45 UTC
(In reply to Thomas Deutschmann from comment #15)
> Ivan, the sandbox violation you experienced was addressed 15min before you
> posted your answer. Please update repository and try again.
> 
> Regarding the issue PGO problem itself:
> 
> I am unable to reproduce. Building firefox with PGO/LTO using both CLANG or
> GCC worked. Tried on stable (12) and unstable (13). All testings were done
> in fresh images. Due to other bugs I suspect that LLVM/CLANG toolchain for
> some might be busted. I recommend rebuilding the entire toolchain to be safe.

Thanks.

So far I have same issue as mentioned in #17 (https://bugs.gentoo.org/821505#c17). 

I will try to rebuild toolchain and see if this will help. Could be glibc-2.34 that I have installed
Comment 19 Patrick McLean gentoo-dev 2021-11-04 16:45:52 UTC
(In reply to Ivan from comment #18)
> (In reply to Thomas Deutschmann from comment #15)
> > Ivan, the sandbox violation you experienced was addressed 15min before you
> > posted your answer. Please update repository and try again.
> > 
> > Regarding the issue PGO problem itself:
> > 
> > I am unable to reproduce. Building firefox with PGO/LTO using both CLANG or
> > GCC worked. Tried on stable (12) and unstable (13). All testings were done
> > in fresh images. Due to other bugs I suspect that LLVM/CLANG toolchain for
> > some might be busted. I recommend rebuilding the entire toolchain to be safe.
> 
> Thanks.
> 
> So far I have same issue as mentioned in #17
> (https://bugs.gentoo.org/821505#c17). 
> 
> I will try to rebuild toolchain and see if this will help. Could be
> glibc-2.34 that I have installed

I am experiencing the hangs with glibc-2.33-r7, downgrading rust and llvm fixed the issue for me.
Comment 20 Ivan 2021-11-05 10:48:02 UTC
Rebuilt toolchain, rebuilt all clang-related packages.
Still cannot build FF 94 with PGO, building just 'freezes' at some point and nothing happens. Usually FF builds in about an 1 hour with PGO, but now I see this:

> current merge time: 12 hours, 32 minutes and 37 seconds.
> ETA: any time now.

So I had to manually interrupt compilation. Here's the last lines of log: https://pastebin.com/eAnqDUr8

Guess I should try building rust, because I used -bin version so far.
Comment 21 Ivan 2021-11-05 20:16:11 UTC
Well, unsurprisingly, building rust from the sources didn't help in this particular issue.
Comment 22 Alexandra Parker 2021-11-06 00:18:57 UTC
Is this related? Seems like clang/llvm-13 will be supported in firefox-95:

https://bugzilla.mozilla.org/show_bug.cgi?id=1731582
Comment 23 Doppler 2021-11-07 07:08:28 UTC
I'm just here to say that I have this issue as well and rebuilding the LLVM toolchain doesn't help.
Comment 24 Alexandra Parker 2021-11-07 07:23:38 UTC
I had to

- uninstall rust-1.56, llvm 13
- install llvm 12, rust-1.55
- switch to rust-1.55
  - check by saying "rustc -v --version" that it's using LLVM 12
  - may have to "ldconfig" if it can't find .so files
- restrict the firefox ebuild to llvm 12 using the patched ebuild in my "local" portage repo
  - I also changed its dependency on virtual/rust to 
    || (
      ( >=dev-lang/rust-1.51 <dev-lang/rust-1.56 )
      ( >=dev-lang/rust-bin-1.51 <dev-lang/rust-bin-1.56 )
    )
    since I couldn't figure out a better way to do it.
    virtual/rust doesn't seem to be slotted. are virtuals implicitly slotted?

That was enough to get Firefox 94 to build and install, but now I'm struggling with portage wanting to only have one version of dev-lang/rust installed. Isn't it slotted? Why is installing rust-1.55 considered a downgrade ("UD") instead of a new slot ("NS")?
Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-07 07:27:46 UTC
(In reply to Alexandra Parker from comment #24)
> That was enough to get Firefox 94 to build and install, but now I'm
> struggling with portage wanting to only have one version of dev-lang/rust
> installed. Isn't it slotted? Why is installing rust-1.55 considered a
> downgrade ("UD") instead of a new slot ("NS")?

Rust isn't slotted (even though I thought it was until 2 days ago!).
Comment 26 Alexandra Parker 2021-11-07 07:31:59 UTC
I'm re-reading this until it makes sense:

https://wiki.gentoo.org/wiki/Sub-slots_and_Slot-Operators

Unless some compatibility fix is backported I think it makes sense to mask rust-1.56 to prevent the version flapping.
Comment 27 Alexandra Parker 2021-11-07 07:46:18 UTC
(In reply to Alexandra Parker from comment #26)
> I'm re-reading this until it makes sense:
> 
> https://wiki.gentoo.org/wiki/Sub-slots_and_Slot-Operators
> 
> Unless some compatibility fix is backported I think it makes sense to mask
> rust-1.56 to prevent the version flapping.

(and by that I mean it makes sense for people trying to work around this problem)
Comment 28 Larry the Git Cow gentoo-dev 2021-11-09 20:53:42 UTC
The bug has been referenced in the following commit(s):

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

commit ef9940a9394e7a0311bb9d5987e0d442d7188c52
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-11-09 20:51:51 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-11-09 20:53:32 +0000

    www-client/firefox: fix runtime errors
    
    Closes: https://bugs.gentoo.org/822492
    Closes: https://bugs.gentoo.org/822138
    Bug: https://bugs.gentoo.org/821505
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/Manifest                        |  100 +-
 ...efox-94.0.1.ebuild => firefox-94.0.1-r1.ebuild} |    2 +-
 www-client/firefox/firefox-94.0.ebuild             | 1209 --------------------
 3 files changed, 2 insertions(+), 1309 deletions(-)
Comment 29 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-11-10 16:35:29 UTC
-r1 doesn't seem to help:

console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/tmp/portage/www-client/firefox-94.0.1-r1/temp/tmpef3jyhwi/search.json.mozlz4", (void 0)))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

jarlog: /var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/jarlog/en-US.log
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1636553855045   addons.xpi      ERROR   System addon update list error Error: Failed downloading XML, status: 0, reason: error
Comment 30 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-11-10 16:36:01 UTC
Created attachment 750198 [details]
build.log.xz
Comment 31 Michael Cook 2021-11-10 17:12:14 UTC
(In reply to John Helmert III from comment #29)
> -r1 doesn't seem to help:
> 
> console.warn: SearchSettings: "get: No settings file exists, new profile?"
> (new NotFoundError("Could not open the file at
> /var/tmp/portage/www-client/firefox-94.0.1-r1/temp/tmpef3jyhwi/search.json.
> mozlz4", (void 0)))
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> jarlog:
> /var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/jarlog/en-
> US.log
> JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't
> find profile directory.
> JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't
> find profile directory.
> 1636553855045   addons.xpi      ERROR   System addon update list error
> Error: Failed downloading XML, status: 0, reason: error

Worked for me last night. Unmasked clang/llvm/rust stuff, made sure that was all updated and then updated to 94.0.1-r1 and it compiled with PGO for me.
Comment 32 Thomas Deutschmann gentoo-dev 2021-11-11 16:28:23 UTC
Is anyone who is experiencing PGO build failures _not_ using USE=pulseaudio?

For me it looks like USE=pulseaudio is the trigger...
Comment 33 Ivan 2021-11-12 11:43:48 UTC
Looks like -r1 does the trick for me.

Here's list of USE-flags I used:

www-client/firefox-94.0.1-r1:0/94::gentoo
USE="clang dbus gmp-autoupdate hwaccel lto openh264 pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -geckodriver -hardened -jack -screencast (-selinux) -sndio -wifi"

I used rust-bin-1.56.1 and latest llvm. As far as I can say it used LLVM 13 to build FF. 
Builds fine, no hangs detected so far.

Huge thanks to Gentoo developers.
Comment 34 Adel KARA SLIMANE 2021-11-12 12:59:56 UTC
I tried again after Comment #33 but I still get the same issue

Useflags: clang dbus gmp-autoupdate lto openh264 pgo pulseaudio screencast system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland wifi -debug -eme-free -geckodriver -hardened -hwaccel -jack (-selinux) -sndio
Comment 35 eric 2021-11-13 03:15:59 UTC
I'm getting what looks like a similar issue.  Building firefox 91.3.0 times out:
19:10.24 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-91.3.0/work/firefox_build/instrumented/browser/installer'
19:10.24 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-91.3.0/work/firefox_build/instrumented'
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/tmp/portage/www-client/firefox-91.3.0/temp/tmpisyuhggx/search.json.mozlz4", (void 0)))
JavaScript error: resource:///modules/Interactions.jsm, line 209: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
jarlog: /var/tmp/portage/www-client/firefox-91.3.0/work/firefox_build/jarlog/en-US.log
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource:///modules/Interactions.jsm, line 209: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"MediaTrackGraph 7f22e12afc00 shutdown","state":"(none)","filename":"/var/tmp/portage/www-client/firefox-91.3.0/work/firefox-91.3.0/dom/media/MediaTrackGraph.cpp","lineNumber":1784,"stack":"MediaTrackGraph shutdown"}] Barrier: xpcom-will-shutdown
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 4995: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWindowMediator.getEnumerator]

emerge --info:
Portage 3.0.28 (python 3.9.7-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.2.0, glibc-2.33-r7, 5.15.1-gentoo-cirno x86_64)
=================================================================
System uname: Linux-5.15.1-gentoo-cirno-x86_64-11th_Gen_Intel-R-_Core-TM-_i7-11850H_@_2.50GHz-with-glibc2.33
KiB Mem:    32582408 total,   5118432 free
KiB Swap:   16383996 total,  15869456 free
Timestamp of repository gentoo: Sat, 13 Nov 2021 00:21:52 +0000
Head commit of repository gentoo: 9f16e61545b3eb770da7cefac83b9a23da92412f

Timestamp of repository gentoo-zh: Sat, 13 Nov 2021 00:21:37 +0000
Head commit of repository gentoo-zh: c511984399adc425cbb2364a910ffeb7fc1fad73

Timestamp of repository menelkir: Thu, 11 Nov 2021 19:13:35 +0000
Head commit of repository menelkir: 69acb3d75dac7ee9de9db847822b054d0858bb53

Timestamp of repository steam-overlay: Tue, 09 Nov 2021 10:53:07 +0000
Head commit of repository steam-overlay: b21d724e69a176a398cae2db70172cb9dfede48a

sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          2.7.18_p13::gentoo, 3.9.7_p1::gentoo
dev-lang/rust:            1.56.1::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    priority: -1000


ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=tigerlake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=tigerlake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=tigerlake -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=tigerlake -O2 -pipe"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j15"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups dbus declarative dri dts dvd dvdr emboss encode exif flac fortran gdbm gif gles2 gpm gstreamer gtk gui iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl offensive ogg opencl opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg systemd theora tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vulkan wayland widgets wxwidgets x264 x265 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2019" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965 iris nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

Flags I used:
USE="clang dbus gmp-autoupdate lto openh264 pgo pulseaudio screencast system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -geckodriver -hardened -hwaccel -jack (-selinux) -sndio -wifi" ABI_X86="(64)" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW"
Comment 36 Andy Pettinger 2021-11-14 09:08:55 UTC
Builds with pgo again using rust 1.56.1 llvm 13 and re-keyworded glibc 2.34-r1

www-client/firefox-94.0.1-r1:0/94::gentoo  USE="clang dbus hardened lto openh264 pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -geckodriver (-gmp-autoupdate) -hwaccel -jack -screencast (-selinux) -sndio -wifi"

Many thanks to all involved.
Comment 37 Adel KARA SLIMANE 2021-11-14 18:06:10 UTC
Following Comment #36 I tried emerging firefox 94.0.1-r1 again and it successfully built. But the error messages still show, as I reported in my first description message:

```
11:42.59 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/instrumented'
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /var/tmp/portage/www-client/firefox-94.0.1-r1/temp/tmpbhtdum7x/search.json.mozlz4", (void 0)))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

jarlog: /var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/jarlog/en-US.log
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
```

I am afraid PGO actually isn't (entirely) working, even when enabled.
Comment 38 Adel KARA SLIMANE 2021-11-14 18:07:49 UTC
Created attachment 751158 [details]
firefox-94.0.1-r1 pgo+lto successfull merge but with error message
Comment 39 Andrew Udvare 2021-11-14 18:11:07 UTC
(In reply to Adel KARA SLIMANE from comment #37)
> Following Comment #36 I tried emerging firefox 94.0.1-r1 again and it
> successfully built. But the error messages still show, as I reported in my
> first description message:
> 
> ```
> 11:42.59 gmake: Leaving directory
> '/var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/
> instrumented'
> console.warn: SearchSettings: "get: No settings file exists, new profile?"
> (new NotFoundError("Could not open the file at
> /var/tmp/portage/www-client/firefox-94.0.1-r1/temp/tmpbhtdum7x/search.json.
> mozlz4", (void 0)))
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> jarlog:
> /var/tmp/portage/www-client/firefox-94.0.1-r1/work/firefox_build/jarlog/en-
> US.log
> JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't
> find profile directory.
> JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't
> find profile directory.
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> 
> 
> ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv,
> messages will be lost
> ```
> 
> I am afraid PGO actually isn't (entirely) working, even when enabled.

Unless someone knows otherwise, I think these messages can be ignored because PGO is run in a temporary environment. You would have to run a PGO build outside of Portage to determine otherwise.
Comment 40 Adel KARA SLIMANE 2021-11-14 18:13:46 UTC
In my Comment #11 I attempted a build from source outside of Portage and encountered the same error messages. I will retry with 94.0.1 and report back.
Comment 41 Adel KARA SLIMANE 2021-11-14 22:50:47 UTC
Okay I tried building from source on Firefox 94.0.1 tar source code, this time with LTO enabled in `mozconfig`

```                                          
ac_add_options --enable-lto=cross
ac_add_options --with-libclang-path=/usr/lib/llvm/13/lib64
ac_add_options MOZ_PGO=1
mk_add_options MOZ_PARALLEL_BUILD=32
export RUSTC_OPT_LEVEL=2
```

and the it looks like the message still shows, so maybe somthing upstream ?


```
 9:42.64 gmake: Leaving directory '/media/personal/Downloads/firefox-94.0.1.source/firefox-94.0.1/obj-x86_64-pc-linux-gnu/instrumented'
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/tmpamnknw5p/search.json.mozlz4", (void 0)))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Comment 42 Adel KARA SLIMANE 2021-11-14 22:51:45 UTC
Created attachment 751182 [details]
Self built directly from source firefox lto+pgo
Comment 43 cyberhoffman 2021-11-17 13:26:41 UTC
Same here. USE-flag "pgo" is enabled. Last strokes of emerge output:

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"MediaTrackGraph 7f1e0c044000 shutdown","state":"(none)","filename":"/var/tmp/portage/www-client/firefox-91.3.0/work/firefox-91.3.0/dom/media/MediaTrackGraph.cpp","lineNumber":1784,"stack":"MediaTrackGraph shutdown"}] Barrier: xpcom-will-shutdown
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 4995: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWindowMediator.getEnumerator]
Comment 44 Thomas Deutschmann gentoo-dev 2021-11-17 14:37:39 UTC
A general comment: The bug summary itself ("Error: Channel closing: too late to send/recv, messages will be lost") is totally misleading and doesn't indicate a PGO problem/unsuccessful build. For example, see this Fedora build.log (https://kojipkgs.fedoraproject.org//packages/firefox/94.0/1.fc33/data/logs/x86_64/build.log) for their PGO build which was successful and still contain "Error: Channel closing: too late to send/recv, messages will be lost".

The problem is that during instrumented build, firefox will hang or crash. To make progress, we need to catch these crashes. However, this is not easy and at the moment I don't know how to get to these information.
Comment 45 Adel KARA SLIMANE 2021-11-17 18:38:50 UTC
Shouldn't it be reported upstream then ?
Comment 46 Marek Szuba archtester gentoo-dev 2021-11-26 09:03:11 UTC
For the record, I have observed the same problems - i.e. with USE=pgo emerge hangs, with USE=-pgo firefox can be built but crashes on a regular basis - with =www-client/firefox-91.3.0, our current ESR ebuild. Downgrading to llvm-12 and rust-1.53 appears to solve both.

Interestingly enough this only happens on only some of my Gentoo boxes, even though they have got almost identical software configuration.
Comment 47 Thomas Deutschmann gentoo-dev 2021-11-26 19:33:50 UTC
@Marek: Yes, ESR needs the patch for latest rust, see https://bugs.gentoo.org/822138#c13

Leaving this bug for the unknown problems.
Comment 48 Thomas Deutschmann gentoo-dev 2021-12-06 16:02:22 UTC
*** Bug 826954 has been marked as a duplicate of this bug. ***
Comment 49 cyberhoffman 2021-12-10 09:19:01 UTC
I tried to unmask firefox-95.0 and it has been compiled successfully. The other thing to achieve it was unmasking dev-libs/nss-3.72. 

$ tail -n2 /etc/portage/package.accept_keywords/i_want_to_get_new_firefox
=www-client/firefox-95.0::gentoo ~amd64
=dev-libs/nss-3.72::gentoo ~amd64

USE-flags enabled for firefox:
clang dbus gmp-autoupdate lto openh264 pgo pulseaudio system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp KERNEL="linux" L10N="ru
Comment 50 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-12-11 17:17:41 UTC
I seem to be able to reproduce on Firefox 95.
Comment 51 Adel KARA SLIMANE 2021-12-12 12:27:19 UTC
I went ahead and opened a bug report at Mozilla's bugzilla [1], hopefully it will help them and help us figure out what's at play and how to deal with this annoying issue. 


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1745641
Comment 52 Adel KARA SLIMANE 2021-12-12 13:09:23 UTC
I just attempted to build firefox 95 with PGO + LTO, it hung for quite a while on those "send/recv" error messages then, to my surprise, went on and successfully got built.
Comment 53 Adel KARA SLIMANE 2021-12-12 13:10:36 UTC
Created attachment 758697 [details]
emerge --info for successful firefox 95 PGO+LTO build
Comment 54 Adel KARA SLIMANE 2021-12-12 13:11:19 UTC
Created attachment 758698 [details]
Build log for successful firefox 95 build (still with error messages and a finite hang)
Comment 55 cyberhoffman 2021-12-13 11:50:28 UTC
(In reply to Adel KARA SLIMANE from comment #52)
> I just attempted to build firefox 95 with PGO + LTO, it hung for quite a
> while on those "send/recv" error messages then, to my surprise, went on and
> successfully got built.

I had seen the same behaviour of building process. It had been stopped compiling in "send/recv error" stage and I even decided to press 'Ctrl+C' but somebody had draw me away. When I got back firefox-95 was ready to use. Unfortunately I forgot to save build.log so I have nothing to show in here.