Bug 218581

Summary: www/firefox: fails at "configure" stage when sem(4) is loaded
Product: Ports & Packages Reporter: Jochen Neumeister <joneum>
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Closed FIXED    
Severity: Affects Many People CC: drhowarddrfine, joneum, ohartmann, portmgr, w.schwarzenfeld
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Jochen Neumeister freebsd_committer freebsd_triage 2017-04-12 06:17:39 UTC
I will updated firefox from 52 to 53. 

The ports are up-to-date with portsnap fetch update 30 minutes ago.

I reset the config via make rmconfig

uname -a
FreeBSD phantomias 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


The Updating stops:
js/src> updating cache /usr/ports/www/firefox/work/firefox-53.0/obj-x86_64-unknown-freebsd11.0/config.cache
js/src> creating ./config.data
js/src> Creating config.status

Creating config.status
Traceback (most recent call last):
  File "/usr/ports/www/firefox/work/firefox-53.0/configure.py", line 124, in <module>
    sys.exit(main(sys.argv))
  File "/usr/ports/www/firefox/work/firefox-53.0/configure.py", line 34, in main
    return config_status(config)
  File "/usr/ports/www/firefox/work/firefox-53.0/configure.py", line 119, in config_status
    return config_status(args=[], **encode(sanitized_config, encoding))
  File "/usr/ports/www/firefox/work/firefox-53.0/python/mozbuild/mozbuild/config_status.py", line 136, in config_status
    reader = BuildReader(env)
  File "/usr/ports/www/firefox/work/firefox-53.0/python/mozbuild/mozbuild/frontend/reader.py", line 886, in __init__
    self._gyp_worker_pool = ProcessPoolExecutor(max_workers=max_workers)
  File "/usr/ports/www/firefox/work/firefox-53.0/python/futures/concurrent/futures/process.py", line 274, in __init__
    _check_system_limits()
  File "/usr/ports/www/firefox/work/firefox-53.0/python/futures/concurrent/futures/process.py", line 263, in _check_system_limits
    raise NotImplementedError(_system_limited)
NotImplementedError: system provides too few semaphores (30 available, 256 necessary)
*** Fix above errors and then restart with\
               "gmake -f client.mk build"
gmake[3]: *** [/usr/ports/www/firefox/work/firefox-53.0/client.mk:383: configure] Error 1
gmake[3]: Leaving directory '/usr/ports/www/firefox'
===>  Script "configure" failed unexpectedly.
Please report the problem to gecko@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/firefox/work/firefox-53.0/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/www/firefox
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/firefox
*** Error code 1

Stop.
make: stopped in /usr/ports/www/firefox

There is no /usr/ports/www/firefox/work/firefox-53.0/config.log to attach
Comment 1 Walter Schwarzenfeld 2017-04-12 06:23:35 UTC
I guess you had gtk2 on. Gtk2 is not supported anymore. 
The gtk2 option is removed with this version (few hours ago).
https://svnweb.freebsd.org/ports?view=revision&revision=438318

(I had the same error, and contacted the maintainer, compiles fine with gtk3).
I had problems with the gtk3 menues. I have it also take a look in FreeBSD forums.
Comment 2 Walter Schwarzenfeld 2017-04-12 06:26:02 UTC
Oh, sorry. This
=> was the error with gtk3.
The maintainer told not to use sem. It is deprecated. Remove it from /boot/loader.conf.
Comment 3 Jochen Neumeister freebsd_committer freebsd_triage 2017-04-12 06:35:44 UTC
(In reply to w.schwarzenfeld from comment #2)
I am bewildered. I have no registration about gtk* in my /boot/loader.conf.
Comment 4 Walter Schwarzenfeld 2017-04-12 07:14:37 UTC
I mean the entry (if exists)
sem_load="YES"
Comment 5 Walter Schwarzenfeld 2017-04-12 07:16:20 UTC
And the build of python with option SEM.
For me was enough to remove sem_load="YES" from loader.conf.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2017-04-12 13:54:19 UTC
(In reply to Jochen Neumeister from comment #0)
> NotImplementedError: system provides too few semaphores (30 available, 256 necessary)

Likely exposed by https://hg.mozilla.org/mozilla-central/rev/763fc7845e8c On Before that ProcessPoolExecutor was only used to generate symbols for CrashReporter.

Can you try the fix in https://lists.freebsd.org/pipermail/freebsd-gecko/2017-April/007124.html ? Otherwise, make sure sem(4) is neither loaded nor built it into the kernel.
Comment 7 Jochen Neumeister freebsd_committer freebsd_triage 2017-04-12 14:31:53 UTC
(In reply to Jan Beich from comment #6)

Hi Jan,

i see, i use sem_load="YES" from loader.conf. I will remove and test it.

When it doesnt work, i will test the patch. :-)
Comment 8 Jan Beich freebsd_committer freebsd_triage 2017-04-12 14:49:29 UTC
*** Bug 218591 has been marked as a duplicate of this bug. ***
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-04-12 15:03:43 UTC
A commit references this bug:

Author: jbeich
Date: Wed Apr 12 15:03:18 UTC 2017
New revision: 438359
URL: https://svnweb.freebsd.org/changeset/ports/438359

Log:
  www/firefox: document sem(4) issue in UPDATING

  Reported by:	many
  PR:		218581
  MFH:		2017Q2 (r438264 followup)

Changes:
  head/UPDATING
Comment 10 Jochen Neumeister freebsd_committer freebsd_triage 2017-04-12 16:21:58 UTC
okay, remove sem_load="YES" from loader.conf solved the updating problem:

Installing for firefox-53.0,1
===>   Registering installation for firefox-53.0,1
Installing firefox-53.0,1...

# firefox --version
Mozilla Firefox 53.0
Comment 12 Jan Beich freebsd_committer freebsd_triage 2017-04-13 18:19:36 UTC
Would it be possible to disable sem(4) on package builders? sem(4) was only required for sem_open() or sem_init(pshared=1) on FreeBSD 5.0-8.4, the last one was EOL'd by 2015-08-01. I'd prefer to not add workarounds in ports because cluster machines use non-GENERIC kernel.

http://beefy5.nyi.freebsd.org/data/103i386-default/438415/logs/errors/firefox-53.0,1.log
http://beefy6.nyi.freebsd.org/data/103amd64-default/438415/logs/errors/firefox-53.0,1.log
http://beefy10.nyi.freebsd.org/data/110i386-default/438415/logs/errors/firefox-53.0,1.log
http://beefy9.nyi.freebsd.org/data/110amd64-default/438415/logs/errors/firefox-53.0,1.log
Comment 13 Jan Beich freebsd_committer freebsd_triage 2017-04-15 08:16:06 UTC
*** Bug 218675 has been marked as a duplicate of this bug. ***
Comment 14 Antoine Brodin freebsd_committer freebsd_triage 2017-04-18 15:15:50 UTC
(In reply to Jan Beich from comment #12)
This won't happen before a few weeks so it's better to add a workaround for now.
Comment 15 commit-hook freebsd_committer freebsd_triage 2017-04-18 19:39:27 UTC
A commit references this bug:

Author: jbeich
Date: Tue Apr 18 19:38:18 UTC 2017
New revision: 438796
URL: https://svnweb.freebsd.org/changeset/ports/438796

Log:
  www/firefox: work around bogus semaphores limit

  NotImplementedError: system provides too few semaphores (30 available, 256 necessary)

  PR:		218581
  Reported by:	pkg-fallout (releases cannot be fixed retroactively)
  Requested by:	antoine
  MFH:		2017Q2

Changes:
  head/www/firefox/files/patch-python_futures_concurrent_futures_process.py
Comment 16 commit-hook freebsd_committer freebsd_triage 2018-05-10 21:55:27 UTC
A commit references this bug:

Author: jbeich
Date: Thu May 10 21:54:25 UTC 2018
New revision: 469583
URL: https://svnweb.freebsd.org/changeset/ports/469583

Log:
  www/firefox: drop SC_SEM_NSEMS_MAX workaround

  FreeBSD 10.3 and 11.0 have reached EOL.

  PR:		218581

Changes:
  head/www/firefox/files/patch-third__party_python_futures_concurrent_futures_process.py
Comment 17 commit-hook freebsd_committer freebsd_triage 2018-05-10 21:57:32 UTC
A commit references this bug:

Author: jbeich
Date: Thu May 10 21:57:27 UTC 2018
New revision: 469585
URL: https://svnweb.freebsd.org/changeset/ports/469585

Log:
  www/waterfox: drop SC_SEM_NSEMS_MAX workaround

  FreeBSD 10.3 and 11.0 have reached EOL.

  PR:		218581

Changes:
  head/www/waterfox/files/patch-third__party_python_futures_concurrent_futures_process.py