Bug #4199

Mac OS package build hangs on test

Added by Knödlseder Jürgen over 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:01/13/2023
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:2.1.0
Duration:

Description

The newly configured ctools continuous Mac OS release hangs on testing


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Here is an excerpt of the log file that shows that building the package worked:

pkgbuild: Inferring bundle components from contents of /usr/local/gamma
pkgbuild: Writing new component property list to /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/pkg/ctools-2.1.0.dev-components.plist
pkgbuild: Reading components from /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/pkg/ctools-2.1.0.dev-components.plist
pkgbuild: Wrote package to /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/pkg/ctools-2.1.0.dev.pkg
productbuild: Wrote synthesized distribution to /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/prod/ctools-2.1.0.dev.dist
productbuild: Wrote product to /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/prod/ctools-2.1.0.dev.pkg
created: /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_build/ctools-2.1.0.dev-macosx10.9.dmg

Installing the package seems also to work:

+ make pkgcheck
Check Mac OS X installation image
Checksumming Protective Master Boot Record (MBR : 0)…
Protective Master Boot Record (MBR :: verified   CRC32 $5043A77D
Checksumming GPT Header (Primary GPT Header : 1)…
 GPT Header (Primary GPT Header : 1): verified   CRC32 $6C6D96BA
Checksumming GPT Partition Data (Primary GPT Table : 2)…
GPT Partition Data (Primary GPT Tabl: verified   CRC32 $F4DE6301
Checksumming  (Apple_Free : 3)…
                    (Apple_Free : 3): verified   CRC32 $00000000
Checksumming disk image (Apple_HFS : 4)…
          disk image (Apple_HFS : 4): verified   CRC32 $F450E044
Checksumming  (Apple_Free : 5)…
                    (Apple_Free : 5): verified   CRC32 $00000000
Checksumming GPT Partition Data (Backup GPT Table : 6)…
GPT Partition Data (Backup GPT Table: verified   CRC32 $F4DE6301
Checksumming GPT Header (Backup GPT Header : 7)…
  GPT Header (Backup GPT Header : 7): verified   CRC32 $B3230D2E
verified   CRC32 $48EB4F09
/dev/disk1              GUID_partition_scheme              
/dev/disk1s1            Apple_HFS                          /Volumes/ctools-2.1.0.dev
installer: Package name is ctools-2.1.0.dev
installer: Installing at base path /
installer: The install was successful.
"disk1" unmounted.
"disk1" ejected.

In the subsequent set I see:

****************************
* Python interface testing *
****************************
Test GLog: ....................................... ok
Test GApplication: .......................................... ok
Test GApplicationPars: .. ok
...
Test INTEGRAL/SPI class pickeling: ......................... ok
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path

***********************
* ctools unit testing *
***********************
Test ctobssim on command line: ...... ok
Test ctobssim from Python: ................................................... ok
Test ctselect on command line: ........ ok
...
Test ctprob from Python: ................ ok
Test unbinned pipeline with FITS file saving: . ok
Test unbinned in-memory pipeline: . ok

After that step the test should move towards the cscripts unit testing which apparently does not start. Doing top on Mac OS 10.11 shows a sleeping Python job. Here the corresponding line in the package test file:

python -c 'import cscripts; cscripts.test()' | tee -a $LOGFILE

Running the package test sequence from the command line in Mac OS 10.11 I got the following:

$ INSTALLDIR=/usr/local/gamma
$ export GAMMALIB=$INSTALLDIR
$ source $GAMMALIB/bin/gammalib-init.sh
$ export CTOOLS=$INSTALLDIR
$ source $CTOOLS/bin/ctools-init.sh
$ python -c 'import cscripts; cscripts.test()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jenkins/jenkins/workspace/ctools-cr-osx/cscripts/__init__.py", line 70, in <module>
    from cscripts.csadd2caldb   import csadd2caldb
  File "/Users/jenkins/jenkins/workspace/ctools-cr-osx/cscripts/csadd2caldb.py", line 25, in <module>
    import gammalib
  File "/usr/local/gamma/lib/python2.7/site-packages/gammalib/__init__.py", line 28, in <module>
    from gammalib.app import *
  File "/usr/local/gamma/lib/python2.7/site-packages/gammalib/app.py", line 10, in <module>
    from . import _app
ImportError: dlopen(/usr/local/gamma/lib/python2.7/site-packages/gammalib/_app.so, 10): Symbol not found: _PyClass_Type
  Referenced from: /usr/local/gamma/lib/python2.7/site-packages/gammalib/_app.so
  Expected in: flat namespace
 in /usr/local/gamma/lib/python2.7/site-packages/gammalib/_app.so
$ 

Wait a minute, this comes from being actually in the Miniconda environment:

$ which python
/Users/jenkins/miniconda3/bin/python

Reconnecting to Mac OS 10.11 and repeating the same sequence I got:

$ which python
/usr/bin/python
$ INSTALLDIR=/usr/local/gamma
$ export GAMMALIB=$INSTALLDIR
$ source $GAMMALIB/bin/gammalib-init.sh
$ export CTOOLS=$INSTALLDIR
$ source $CTOOLS/bin/ctools-init.sh
$ python -c 'import cscripts; cscripts.test()'
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "cscripts/__init__.py", line 120, in test
    from cscripts.tests import test_python_cscripts
ImportError: cannot import name test_python_cscripts

Trying

$ python
>>> import gammalib
>>> import ctools
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path
>>> import cscripts
>>> 
works.

This also:

$ python
>>> import cscripts
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path
>>> 

Following up:

>>> dir(cscripts)
['__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', 'calutils', 'csadd2caldb', 'csbkgmodel', 'cscaldb', 'csebins', 'csfindobs', 'csfootprint', 'csiactcopy', 'csiactdata', 'csiactobs', 'csinfo', 'cslightcrv', 'csmodelinfo', 'csmodelmerge', 'csmodelselect', 'csmodelsois', 'csobs2caldb', 'csobsdef', 'csobsinfo', 'csobsselect', 'csphagen', 'csphasecrv', 'cspull', 'csresmap', 'csresspec', 'csroot2caldb', 'csscs', 'cssens', 'csspec', 'cssrcdetect', 'cstsdist', 'cstsmapmerge', 'cstsmapsplit', 'csviscube', 'csworkflow', 'ioutils', 'modutils', 'mputils', 'obsutils', 'test']
>>> cscripts.test()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cscripts/__init__.py", line 120, in test
    from cscripts.tests import test_python_cscripts
ImportError: cannot import name test_python_cscripts

The issue is that in the current working directory there is a cscripts directory which is actually empty, yet the test wants to run in that directory. Renaming the directory solves the issue:

$ mv cscripts cscripts.moved
$ python
>>> import cscripts
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path
>>> cscripts.test()

*************************
* cscripts unit testing *
*************************
Test cscript base class: ............................................................................................................................... ok
Test ctobservation base class: ............................................. ok
Test ctlikelihood base class: ... ok
...
Yet this cannot be the problem when running the package check script from Jenkins since it is run in a separate directory.

#2 Updated by Knödlseder Jürgen over 1 year ago

  • % Done changed from 10 to 50

I noticed that the tee program was actually running

$ ps -lA | grep tee
  502 88473 88403     4004   0  31  0  2435848    660 -      S                   0 ??         0:00.01 tee -a /Users/jenkins/jenkins/workspace/ctools-cr-osx/pkg_check.log
$ ps -lA | grep 88403
  502 88403 88400     4004   0  31  0  2436456   1072 -      S                   0 ??         0:00.01 /bin/bash dev/pkgcheck-macosx.sh 2.1.0.dev

Killing tee moved forward:
Test unbinned in-memory pipeline: . ok
dev/pkgcheck-macosx.sh: line 95: 88472 Done                    python -c 'import ctools; ctools.test()'
     88473 Killed: 9               | tee -a $LOGFILE
dyld: warning, LC_RPATH gammalib-2.1.0.dev/lib in /usr/local/gamma/lib/python2.7/site-packages/ctools/_tools.so being ignored in restricted program because it is a relative path
*************************
* cscripts unit testing *
*************************
Test cscript base class: ............................................................................................................................... ok
Test ctobservation base class: ............................................. ok
Test ctlikelihood base class: ... ok
Test csadd2caldb on command line: ..... ok
Test csadd2caldb from Python: .. ok
Test csadd2caldb pickeling: ...... ok
...
Test csiactobs from Python: ............................................... ok
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
No JDK named ‘null’ found
SSH: Connecting from host [CTAs-Mac-OS-1011.local]
SSH: Connecting with configuration [CTA IRAP web server] ...
SSH: Disconnecting configuration [CTA IRAP web server] ...
SSH: Transferred 1 file(s)
No emails were triggered.
Finished: SUCCESS

#3 Updated by Knödlseder Jürgen over 1 year ago

  • Project changed from Infrastructure to ctools
  • Target version set to 2.1.0

#4 Updated by Knödlseder Jürgen about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

The problem seems to be fixed, I close the issue now.

Also available in: Atom PDF