Bug#946986: python3-h5py: h5py does not play nicely with subprocess and mpirun

Rafael Laboissière rafael at debian.org
Wed Dec 18 22:39:38 GMT 2019


Package: python3-h5py
Version: 2.10.0-2+b1
Severity: important
Control: block 938925 by -1

In the version of python3-h5py currently in testing/unstable, the 
importation of module h5py causes malfunction of Python scripts which 
use subprocess to run a command through mpirun. The ZIP file attached 
to the current message contains a demonstration of the bug. In this 
ZIP archive, there is a C++ file (mpi_hello_world.cc) that uses 
OpenMPI and can be run through mpirun from the command line without 
problems (mpirun -n 2 ./mpi_hello_world).

The ZIP file contains also a Python script (bugtest.py) that uses the 
subprocess module to run 'mpirun -n 2 ./mpi_hello_world'. That works 
fine, provided that the h5py module is not imported, in which case the 
script fails. Notice that the whole code has nothing to do whatsoever 
with h5py.

Here is the recipe for reproducing this bug:

    $ unzip h5py-mpirun-subprocess-bug.zip
    $ cd h5py-mpirun-subprocess-bug
    $ make
    mpic++ mpi_hello_world.cc -o mpi_hello_world
    mpirun -n 2 ./mpi_hello_world
    Hello world, rank 0 out of 2 processors
    Hello world, rank 1 out of 2 processors
    python3 bugtest.py
    stdout =  b'Hello world, rank 0 out of 2 processors\nHello world, rank 1 out of 2 processors\n'
    stderr =  b''
    return code =  0
    python3 bugtest.py import-h5py
    stdout =  b''
    stderr =  b''
    return code =  1

The problem disappears when python3-h5py is downgraded to the version 
in stable (2.8.0-3).

This bug is the cause of the RC Bug#938925, which is preventing xmds2 
to enter testing.

Please, consider creating a separate package with OpenMPI support 
(e.g. python3-h5py-mpi).


-- System Information: 
Debian Release: bullseye/sid 
  APT prefers testing 
  APT policy: (650, 'testing'), (600, 'unstable'), (550, 'experimental'), (550, 'stable') 
Architecture: amd64 (x86_64) 
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN 
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8) 
Shell: /bin/sh linked to /usr/bin/dash 
Init: systemd (via /run/systemd/system) 
LSM: AppArmor: enabled

Versions of packages python3-h5py depends on: 
ii  libc6                               2.29-3 
ii  libhdf5-openmpi-103                 1.10.4+repack-10 
ii  python3                             3.7.5-1 
ii  python3-mpi4py                      3.0.3-1 
ii  python3-numpy [python3-numpy-abi9]  1:1.16.5-1 
ii  python3-six                         1.13.0-1

python3-h5py recommends no packages.

Versions of packages python3-h5py suggests: 
pn  python-h5py-doc  <none>

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h5py-mpirun-subprocess-bug.zip
Type: application/zip
Size: 1524 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20191218/82c93bc8/attachment.zip>


More information about the debian-science-maintainers mailing list