Bug 198660 - lang/python27: sem_wait: Invalid argument on recent HEAD
Summary: lang/python27: sem_wait: Invalid argument on recent HEAD
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 15:56 UTC by cipher_nl
Modified: 2015-11-12 14:42 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cipher_nl 2015-03-17 15:56:40 UTC
Possibly due to Clang 3.6 import, Python seems to have some issues when compiling ports on a recent HEAD (r280133).

lang/python27 itself compiles fine, but various ports that require it fail with:

py27-cairo when compiling Gnome and others

--
===>  Configuring for py27-cairo-1.10.0_2
===>   FreeBSD 10 autotools fix applied to /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/configure
===>   FreeBSD 10 autotools fix applied to /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/aclocal.m4
Setting top to                           : /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0 
Setting out to                           : /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/build_directory 
Checking for 'gcc' (c compiler)          : ok 
Checking for program python              : /usr/local/bin/python2.7 
Checking for python version              : (2, 7, 9, 'final', 0) 
Checking for library python2.7           : sem_wait: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
*** Signal 11
--

or devel/jsoncpp when compiling Chromium:

--
===>  Building for jsoncpp-0.6.0.r2
scons: Reading SConscript files ...
Using platform 'linux-gcc-FreeBSD'
LD_LIBRARY_PATH = :libs/linux-gcc-FreeBSD
Building using PLATFORM = linux-gcc-FreeBSD

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/usr/ports/devel/jsoncpp/work/jsoncpp-src-0.6.0-rc2/SConstruct", line 207, in buildProjectInDirectory

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/usr/ports/devel/jsoncpp/work/jsoncpp-src-0.6.0-rc2/SConstruct", line 207, in buildProjectInDirectory

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/usr/ports/devel/jsoncpp/work/jsoncpp-src-0.6.0-rc2/SConstruct", line 207, in buildProjectInDirectory
scons: done reading SConscript files.
sem_wait: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
scons: Building targets ...
sem_wait: Invalid argument
Fatal Python error: ceval: orphan tstate
sem_wait: Invalid argument
sem_wait: Invalid argument
Abort trap
===> Compilation failed unexpectedly.
--

or www/firefox:

--
updating cache ./config.cache
creating ./config.status
sem_wait: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
sem_wait: Invalid argument
Traceback (most recent call last):
  File "/usr/ports/www/firefox/work/mozilla-release/build/subconfigure.py", line 422, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/ports/www/firefox/work/mozilla-release/build/subconfigure.py", line 406, in main
    return subconfigure(args)
  File "/usr/ports/www/firefox/work/mozilla-release/build/subconfigure.py", line 393, in subconfigure
    pool.imap_unordered(run, subconfigures):
  File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 652, in next
sem_wait: Invalid argument
sem_wait: Invalid argument
Fatal Python error: PyEval_AcquireThread: non-NULL old thread state
Abort trap
--

There are other errors that pop up on various ports, but these seem to be related to Python and yield a specific 'sem_wait' message prior to failure.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2015-03-17 16:08:18 UTC
Did you upgrade your kernel ?  version of kernel must be newer than or equal to version of userland,  or the sem_wait from libc may not fit the sem_wait from kernel
Comment 2 Torsten Zühlsdorff 2015-11-10 10:27:05 UTC
I could reproduce this bug with poudriere jails:

# poudriere jail -l
test11i  11.0-CURRENT r290351 i386  svn
test11   11.0-CURRENT r290637 amd64 svn

Is there any progress in solving this issue?

Is there anything i can do to help?
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2015-11-10 12:01:09 UTC
(In reply to Torsten Zühlsdorff from comment #2)

What it the version of the kernel?
Comment 4 Torsten Zühlsdorff 2015-11-10 13:32:52 UTC
(In reply to Antoine Brodin from comment #3)

> What it the version of the kernel?

I am not sure what you mean. That is my uname output:

$ uname -a
FreeBSD hera 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

If this is not the information you wanted, please describe it in another way for me.
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2015-11-10 13:36:13 UTC
(In reply to Torsten Zühlsdorff from comment #4)

11-0-CURRENT jail on 10.2-RELEASE host is not supported.
Comment 6 Torsten Zühlsdorff 2015-11-10 15:07:34 UTC
(In reply to Antoine Brodin from comment #5)

> 11-0-CURRENT jail on 10.2-RELEASE host is not supported.

Yes. But this is the first time i really get problems with this combination :D
Comment 7 cipher_nl 2015-11-10 17:58:54 UTC
I can confirm that upgrading the host system to 11-CURRENT resolves the issue. However, some time ago i tried 10-STABLE and it also did not work. Somewhat disappointed that 10.x and 11.x are so incompatible. I do not recall that building 10.x stuff on 9.x host had similar issues.

But i guess this bug is solved: you cannot expect building ports on a 11-CURRENT jail running on 10.x host/kernel works. You need the host/kernel to run 11-CURRENT as well.
Comment 8 Torsten Zühlsdorff 2015-11-12 14:10:48 UTC
I can also confirm that the error does not occour on 11-current.

Getting such an misleading error message is not so good, but i can image a better way. Especially as poudriere already warns that the combination is not supported.

Therefore i propose: lets close this ticket and move on.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-12 14:42:29 UTC
It's not really 'not a bug', so 'as intended' is a better fit for this. Having said that, if someone wants to diagnose the root cause and provide a fix (which wont be in lang/python* ports) please do so and create a new issue:

'Make sem_* work on jails newer than host version'

I imagine this is an issue for other syscalls too