Skip to content

Protect Tcl sub-interpreters with quarantine mechanism #623

@xdelaruelle

Description

@xdelaruelle

As described in a mailing-list discussion, if an enabled Tcl installation is broken (in addition to the system Tcl installation), it may prevent proper evaluation of modulercs and modulefiles.

$ module load  tool-enabling-a-broken-tcl-installation
$ module load  another-tool
ERROR: Can't find a usable init.tcl in the following directories:
      /vols/mmsimP4_t1b_008/ws/mmsimcm/mmsimcm_dep_0401/nsd_ext_lib/tcltk/tools.lnx86/tcltk-8.6.8/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.8/library /tcl8.6.8/library
  This probably means that Tcl wasn't installed properly.
      while executing
  "error $msg"
      (procedure "tclInit" line 61)
      invoked from within
  "tclInit"
      invoked from within
  "interp create $itrp"
      (procedure "execute-modulerc" line 60)
      invoked from within
  "execute-modulerc $dir/$elt $elt $elt"
      (procedure "getModules" line 101)
      invoked from within
  "getModules $dir $mod 0 [list rc_defs_included resolve]"
      (procedure "getPathToModule" line 49)
      invoked from within
  "getPathToModule $mod $modulepath_list $notfounderr"
      (procedure "cmdModuleLoad" line 30)
      invoked from within
  "cmdModuleLoad load 1 $tryload $loadany $tag_list {} {*}$args"
      (procedure "cmdModuleIntLoad" line 17)
      invoked from within
  "$cmdprocname {*}$cmdopts {*}$parsed_args"
      (procedure "module" line 186)
      invoked from within
  "{*}$execcmdlist"

It happens even if:

  • module quarantine mechanism is enabled with LD_LIBRARY_PATH part of the environment variables put in quarantine
  • tclsh bin used to run the modulecmd.tcl is the one from the Tcl system installation

Issue comes from Tcl sub-interpreters that are spawned to evaluate modulercs and modulefiles. These sub-interpreters are not protected by the quarantine mechanism, thus they run over the broken Tcl installation and crashes.

Such issue should be primarily fixed by correcting the broken Tcl installation. But it is also desired that the Tcl sub-interpreters of modulecmd.tcl get the protection of the existing quarantine mechanism.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions