Solved Firefox, Synth or not and LTO

OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

Zirias It is a powerful machine. Xeon W3245, 96Gb ecc. I am lucky.
It does not go into swap.

SirDice Synth timed out after 25 minutes. I could not see any setting for timeout.
In portmaster and portupgrade, it has left the machine hanging for longer than the whole port would normally take to build.
 

Argentum

Aspiring Daemon

Reaction score: 288
Messages: 606

Building firefox takes a long time, Rust alone typically takes around 3-4 hours to complete on my "build" server (old Core i5, 4 threads, 16GB memory).
Built it just yesterday on laptop with just 4 cores and 8GB RAM. Takes time, but works. I think this is something else here. Bad hardware? RAM overload and swapping heavily?
 

Zirias

Son of Beastie

Reaction score: 1,531
Messages: 2,654

[FONT=monospace]Zirias[/FONT] It is a powerful machine. Xeon W3245, 96Gb ecc. I am lucky.
It does not go into swap.
Yes, that's a lot more than enough. Maybe you can get some info what the "hanging" process is doing, e.g. with procstat(1)?

It's strange, cause I don't have any problems building these ports on 13.0. Sure, with poudriere, but that really shouldn't matter here. 🤔
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

Just built on its own. Made sure to make clean and pkg autoremove before so that it build all dependencies.
time make
make 68497.78s user 2858.52s system 1306% cpu 1:31:01.67 total

Next is to try again with one of the port managers and try @Ziras' suggestion of procstat.
 

Argentum

Aspiring Daemon

Reaction score: 288
Messages: 606

Just built on its own. Made sure to make clean and pkg autoremove before so that it build all dependencies.
time make
make 68497.78s user 2858.52s system 1306% cpu 1:31:01.67 total

Next is to try again with one of the port managers and try @Ziras' suggestion of procstat.
After installing, you can try portversion -vR firefox? In my case:
Code:
[Reading data from pkg(8) ... - 1643 packages found - done]
aom-3.1.2                   =  up-to-date with port
atk-2.36.0                  =  up-to-date with port
cairo-1.17.4,3              =  up-to-date with port
dav1d-0.9.2                 =  up-to-date with port
dbus-1.12.20_5              =  up-to-date with port
dbus-glib-0.112             =  up-to-date with port
desktop-file-utils-0.26     =  up-to-date with port
ffmpeg-4.4_3,1              =  up-to-date with port
firefox-92.0_2,2            =  up-to-date with port
fontconfig-2.13.94_1,1      =  up-to-date with port
freetype2-2.10.4            =  up-to-date with port
gdk-pixbuf2-2.40.0          =  up-to-date with port
gettext-runtime-0.21        =  up-to-date with port
glib-2.68.4,2               =  up-to-date with port
graphite2-1.3.14            =  up-to-date with port
gtk3-3.24.30                =  up-to-date with port
harfbuzz-2.9.0              =  up-to-date with port
icu-69.1,1                  =  up-to-date with port
jpeg-turbo-2.0.6            =  up-to-date with port
libX11-1.7.2,1              =  up-to-date with port
libXcomposite-0.4.5,1       =  up-to-date with port
libXdamage-1.1.5            =  up-to-date with port
libXext-1.3.4,1             =  up-to-date with port
libXfixes-5.0.3_2           =  up-to-date with port
libXrender-0.9.10_2         =  up-to-date with port
libXt-1.2.1,1               =  up-to-date with port
libdrm-2.4.107,1            =  up-to-date with port
libepoll-shim-0.0.20210418  =  up-to-date with port
libevent-2.1.12             =  up-to-date with port
libffi-3.3_1                =  up-to-date with port
libglvnd-1.3.3              =  up-to-date with port
libpci-3.7.0_1              =  up-to-date with port
libvpx-1.10.0               =  up-to-date with port
libxcb-1.14_1               =  up-to-date with port
nspr-4.32                   =  up-to-date with port
nss-3.69                    =  up-to-date with port
pango-1.48.7                =  up-to-date with port
pixman-0.40.0_1             =  up-to-date with port
png-1.6.37_1                =  up-to-date with port
webp-1.2.0                  =  up-to-date with port

Also, did you update your ports tree recently?
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

Note : Poudriere is very easy to configure. And I never had one problem.
Yes, I may well end up using it. But I should try and find out what is happening first.

After installing, you can try portversion -vR firefox? In my case:

Also, did you update your ports tree recently?

Yes, I will do that.

Ports tree is up to date.
 

monwarez

Active Member

Reaction score: 59
Messages: 147

Zirias It is a powerful machine. Xeon W3245, 96Gb ecc. I am lucky.
It does not go into swap.

SirDice Synth timed out after 25 minutes. I could not see any setting for timeout.
In portmaster and portupgrade, it has left the machine hanging for longer than the whole port would normally take to build.
The timeout is in the synth code, if you want a no timeout rebuild ports-mgmt/synth with the option WATCHDOG off
Last time I check, the watchdog of synth will kill the build if there is no output during a certain time. What may happen is that the build is still in progress, but there is no output.
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

What may happen is that the build is still in progress, but there is no output.

I doubt it.

From the log files for the build in synth and from where it hangs in portmaster and portupgrade, it hangs in different places. When I watch the build (as I have) using make, there is no period of more than a second or so where there is no output.
 

astyle

Daemon

Reaction score: 473
Messages: 1,085

When I build lang/rust (Takes about an hour with a Ryzen 5 1400, a quad-core CPU from 2017), I noticed that the make process seemed to hang. Running top(1) showed me that the culprit was lld, the linker from devel/llvm. After awhile, there was still no output. Sending a Ctrl-C helped without stopping the process - text started to flow on the terminal screen again, turns out the linker was done, make process continued - even though there was no way for me to know. And the install was successful in the end.
 

Argentum

Aspiring Daemon

Reaction score: 288
Messages: 606

When I build lang/rust (Takes about an hour with a Ryzen 5 1400, a quad-core CPU from 2017), I noticed that the make process seemed to hang. Running top(1) showed me that the culprit was lld, the linker from devel/llvm. After awhile, there was still no output. Sending a Ctrl-C helped without stopping the process - text started to flow on the terminal screen again, turns out the linker was done, make process continued - even though there was no way for me to know. And the install was successful in the end.
Rebuilt the latest Rust (rust-1.54.0_2) on my desktop yesterday with portupgrade -R. Took time, but it was all good...
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

I am trying again. This time with portupgrade. So far, building away, doing rust at the moment.

No use of swap at all, plenty of memory.

Will wait and see where it hangs, this time.
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

-rw------- 1 root wheel 56M Sep 8 13:46 portupgrade20210908-28886-1c7f77u
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

Hung.
Code:
gmake[4]: Leaving directory '/usr/ports/www/firefox/work/.build/media/ffvpx/libavcodec'
Code:
top
last pid: 37673;  load averages:  1.27,  4.13,  9.88                                 up 12+23:32:34  14:07:18
149 processes: 1 running, 148 sleeping
CPU:  3.2% user,  0.0% nice,  0.0% system,  0.0% interrupt, 96.7% idle
Mem: 3671M Active, 35G Inact, 410M Laundry, 35G Wired, 104K Buf, 19G Free
ARC: 27G Total, 14G MFU, 10G MRU, 753K Anon, 414M Header, 2584M Other
     22G Compressed, 53G Uncompressed, 2.40:1 Ratio
Swap: 64G Total, 64G Free

ls -l /tmp
Code:
-rw-------  1 root     wheel   2392064 Sep  8 13:47 conftest.core
-rw-------  1 root     wheel  72015515 Sep  8 13:57 portupgrade20210908-28886-1c7f77u

ps
Code:
28886  1  I+    0:01.36 ruby27: portupgrade: [1/1] firefox-92.0_1,2 (ruby27)
39651  1  S+    0:02.15 /usr/bin/script -qa /tmp/portupgrade20210908-28886-1c7f77u env UPGRADE_TOOL=portupgra
31374  3  I+    0:00.00 /bin/sh -e -c (cd /usr/ports/www/firefox/work/.build; if ! /usr/bin/env PERL_USE_UNSA
31375  3  I+    0:00.01 gmake -f Makefile -j32 all
32416  3  I+    0:00.04 gmake compile
32417  3  I+    0:00.21 gmake recurse_compile
37247  3  I+    0:00.01 gmake -C toolkit/library/build target
37249  3  I+    0:00.03 /usr/local/llvm12/bin/clang++ -std=gnu++17 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fst
37250  3  I+   13:37.12 /usr/local/llvm12/bin/ld --eh-frame-hdr -Bshareable --hash-style=both --enable-new-dt
39652  3  Is+   0:00.04 make

Code:
# procstat 39652
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
39652 39651 39652 39652 39652   1 root     wait      FreeBSD ELF64 make        
# procstat 37250
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
37250 37249 39652 39652 39652   2 root     uwait     FreeBSD ELF64 lld
# procstat 37249
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
37249 37247 39652 39652 39652   1 root     wait      FreeBSD ELF64 clang-12   
# procstat 37247
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
37247 32417 39652 39652 39652   1 root     wait      FreeBSD ELF64 gmake   
# procstat 32417
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
32417 32416 39652 39652 39652   1 root     wait      FreeBSD ELF64 gmake
# procstat 32416
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
32416 31375 39652 39652 39652   1 root     wait      FreeBSD ELF64 gmake      
# procstat 31375
  PID  PPID  PGID   SID  TSID THR LOGIN    WCHAN     EMUL          COMM        
31375 31374 39652 39652 39652   1 root     wait      FreeBSD ELF64 gmake
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

df -h /tmp
zoroot/tmp 293G 300K 293G 0% /tmp
Try not changing anything and just go with portmaster www/firefox-esr from the login terminal.
Yes, I am beginning to wonder about the terminal. So far I have been running everything in a terminal within the DE. I might well next try from the console without even X running.
 

Trihexagonal

Son of Beastie

Reaction score: 2,411
Messages: 2,939

That'd how I do it all my ports work. Then you can sit back in your recliner and glance over once in a while to see it hasn't stopped.
 

Tieks

Well-Known Member

Reaction score: 116
Messages: 282

37250 3 I+ 13:37.12 /usr/local/llvm12/bin/ld --eh-frame-hdr -Bshareable --hash-style=both --enable-new-dt
Looks like this one doesn't finish, all other processes are idle or sleeping. Did you see this one before when it stopped?
 
OP
Geezer

Geezer

Aspiring Daemon

Reaction score: 377
Messages: 663

That'd how I do it all my ports work. Then you can sit back in your recliner and glance over once in a while to see it hasn't stopped.

Started it running in the console, happy that I am regaining control over my machine.

Went out of the office to see what the family is up to. Complete mess of anarchy and inactivity.
 

Argentum

Aspiring Daemon

Reaction score: 288
Messages: 606

Started it running in the console, happy that I am regaining control over my machine.

Went out of the office to see what the family is up to. Complete mess of anarchy and inactivity.
For terminal session, I am always (many years) using sysutils/screen. Very convenient. Screen lets you to disconnect from one terminal session and reconnect from another. You can try building your ports under screen. After starting build, you can disconnect terminal.
See - screen(1)

For me screen is a must-have on any FreeBSD installation from VM-s, servers to desktop. Wonder why it is not included in base...

Screenshot from 2021-09-09 08-50-47.png
 
Top