Skip to content

rich not handling brackets properly, and crashes EasyBuild #4968

@sassy-crick

Description

@sassy-crick

Whilst test-build for PR # 23252 I encountered the following issue, and as discussed in the conference call then, that is the problem I see:

$ eb --show-config
#
# Current EasyBuild configuration
# (C: command line argument, D: default value, E: environment variable, F: configuration file)
#
accept-eula-for       (F) = Intel-oneAPI, NVHPC, CUDA
buildpath             (F) = /dev/shm/easybuild
containerpath         (F) = /home/sassy/apps/containers
detect-loaded-modules (F) = error
filter-deps           (F) = binutils
git-working-dirs-path (F) = /home/sassy/git
github-user           (F) = sassy-crick
installpath           (F) = /home/sassy/apps
packagepath           (F) = /home/sassy/apps/packages
parallel              (F) = 4
prefix                (F) = /home/sassy/apps
repositorypath        (F) = /home/sassy/apps/ebfiles_repo
robot-paths           (D) = /home/sassy/apps/software/EasyBuild/5.1.0/local/easybuild/easyconfigs
rpath                 (D) = True
sourcepath            (F) = /opt/sources
sourcepath-data       (F) = /home/sassy/apps/sources
tmp-logdir            (F) = /dev/shm/easybuild-log
tmpdir                (F) = /dev/shm/easybuild

And when I run the installation it crashes:

  >> running shell command:
        ./configure --prefix=/home/sassy/apps/software/PETSc/3.23.4-foss-2024a --LIBS="$LIBS -lrt" --with-mpi4py=0  --with-cc="mpicc"  --with-cxx="mpicxx" --with-c++-support  
--with-fc="mpifort"  --CFLAGS="-O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -fPIC"  --CXXFLAGS="-O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -fPIC 
-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX"  --FFLAGS="-O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -fPIC"  --with-mpi=1  --with-build-step-np=1  --with-shared-libraries=1  
--with-debugging=0  --with-pic=1  --with-x=0 --with-windows-graphics=0  --with-numpy=1  --with-fftw=1  
--with-fftw-lib=[/home/sassy/apps/software/FFTW.MPI/3.3.10-gompi-2024a/lib/libfftw3_mpi.a,libfftw3.a]  --with-fftw-include=/home/sassy/apps/software/FFTW.MPI/3.3.10-gompi-2024a/include  
--with-scalapack=1  --with-scalapack-lib=[/home/sassy/apps/software/ScaLAPACK/2.2.0-gompi-2024a-fb/lib/libscalapack.a,libflexiblas.a,libgfortran.a]  
--with-blas-lapack-lib=[/home/sassy/apps/software/FlexiBLAS/3.4.4-GCC-13.3.0/lib/libflexiblas.a,libgfortran.a]  --with-ptscotch=1 
--with-ptscotch-include=[/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/include] 
--with-ptscotch-lib=[/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libptesmumps.a,/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libptscotchparmetisv3.a,/home/sassy/apps/so
ftware/SCOTCH/7.0.6-gompi-2024a/lib/libptscotch.a,/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libptscotcherr.a,/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libesmumps.a
,/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libscotch.a,/home/sassy/apps/software/SCOTCH/7.0.6-gompi-2024a/lib/libscotcherr.a]  --with-suitesparse=1 
--with-suitesparse-include=[/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/include,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/include/suitesparse] 
--with-suitesparse-lib=[/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libumfpack.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libklu.so,/home/sassy/apps/soft
ware/SuiteSparse/7.10.1-foss-2024a/lib/libspqr.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libcholmod.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libbt
f.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libccolamd.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libcolamd.so,/home/sassy/apps/software/SuiteSparse
/7.10.1-foss-2024a/lib/libcxsparse.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libldl.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/librbio.so,/home/sass
y/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libspex.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/lib/libcamd.so,/home/sassy/apps/software/SuiteSparse/7.10.1-foss-2024a/l
ib/libamd.so]
        [started at: 2025-07-02 16:50:08]
        [working dir: /dev/shm/easybuild/PETSc/3.23.4/foss-2024a/petsc-3.23.4]
        [output and state saved to /dev/shm/easybuild/eb-yhi38q8h/run-shell-cmd-output/configure-togem0bj]
== ... (took < 1 sec)
== Summary:
   * [FAILED]  PETSc/3.23.4-foss-2024a

EasyBuild crashed! Please consider reporting a bug, this should not happen...

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 829, in <module>
    main_with_hooks()
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 815, in main_with_hooks
    main(args=args, prepared_cfg_data=(init_session_state, eb_go, cfg_settings))
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 770, in main
    do_cleanup = process_eb_args(orig_paths, eb_go, cfg_settings, modtool, testing, init_session_state,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 592, in process_eb_args
    ecs_with_res = build_and_install_software(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 206, in build_and_install_software
    raise error
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/main.py", line 160, in build_and_install_software
    (ec_res['success'], app_log, err_msg, err_code) = build_and_install_one(ec, init_env)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/framework/easyblock.py", line 5025, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/framework/easyblock.py", line 4847, in run_all_steps
    err.print()
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/tools/run.py", line 157, in print
    print_error('\n'.join(error_info), rich_highlight=False)
  File "/home/sassy/apps/software/EasyBuild/5.1.0/lib/python3.11/site-packages/easybuild/tools/output.py", line 398, in print_error
    console.print('\n\n' + error_msg + '\n', highlight=rich_highlight)
  File "/usr/lib/python3/dist-packages/rich/console.py", line 1668, in print
    renderables = self._collect_renderables(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/rich/console.py", line 1532, in _collect_renderables
    self.render_str(
  File "/usr/lib/python3/dist-packages/rich/console.py", line 1424, in render_str
    rich_text = render_markup(
                ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/rich/markup.py", line 161, in render
    raise MarkupError(
rich.errors.MarkupError: closing tag '[/home/sassy/apps/software/FFTW.MPI/3.3.10-gompi-2024a/lib/libfftw3_mpi.a,libfftw3.a]' at position 733 doesn't match any open tag

It appears to be a problem with rich but that is the first time I see it.

Some more information:

$ python3 --version
Python 3.11.2
Debian GNU/Linux 12 (bookworm)

Note: accidentally opened here 23578

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions