Closed himanshisyadav closed 1 year ago
Thanks for your report.
The module installation you use is configured to log each command call with the logger
tool. This is done with a siteconfig.tcl
configuration file similar to the one described in the log module command.
The logger
command seems relying on the libuuid.so.1
library on your system. I assume that the python-anaconda
you enable in your environment adds its library directory into LD_LIBRARY_PATH
environment variable. As this directory contains a version of libuuid.so.1
, logger
tries to use this library version but it is not compatible, thus it leads to the error you obtain.
I can reproduce a similar issue on my side:
$ ldd /usr/bin/logger
linux-vdso.so.1 (0x00007ffe207f9000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007f61c0065000)
libc.so.6 => /lib64/libc.so.6 (0x00007f61bfe00000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f61c003a000)
libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f61bfd4d000)
liblz4.so.1 => /lib64/liblz4.so.1 (0x00007f61c0016000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f61c000c000)
libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007f61bfc10000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f61bfbf0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f61c016f000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f61bfbca000)
$ mkdir tmp
$ touch tmp/libgpg-error.so.0
$ export LD_LIBRARY_PATH=$(pwd)/tmp
$ module avail
...
ERROR: logger: error while loading shared libraries: /path/to/dir/tmp/libgpg-error.so.0: file too short
while executing
"exec logger -t module "{ \"user\": \"[get-env USER]\", \"cmd\": \"$cmdname\", \"args\": \"$args\" }""
(procedure "logModuleCmd" line 14)
invoked from within
"logModuleCmd {module av} 0 {} leave"
(leave trace on "{*}$execcmdlist")
Please report this issue at https://github.com/cea-hpc/modules/issues
To solve such issue, logger
should be run without being affected by library directories defined in LD_LIBRARY_PATH
environment variable.
One way to do that is to unset this environment variable prior executing logger
:
set ORIG_LD_LIBRARY_PATH $::env(ORIG_LD_LIBRARY_PATH)
exec logger -t modulecmd "[get-env USER]: $command [join $args]"
set ::env(ORIG_LD_LIBRARY_PATH) $ORIG_LD_LIBRARY_PATH
I will update the log module command cookbook recipe to take this situation into account.
Thank you for your solution!
Unfortunately, that didn't work and I don't know how exactly I should proceed from here.
Could you please provide me the siteconfig.tcl
file used on your side.
Could you also provide the output of a module config --dump-state
command.
Sure!
Here are the contents of siteconfig.tcl
file:
# SITECONFIG.TCL, site-specific configuration script for Modules
#
# This Tcl script enables to supersede any global variable or procedure
# definition of modulecmd.tcl. See 'Modulecmd startup' section in module(1)
# manpage for detailed information.
##########################################################################
# uncomment the following line to forbid the definition of an extra
# site-specific configuration script
#lappendConf locked_configs extra_siteconfig
# uncomment the following line to forbid `implicit_default` config option
# superseding
#lappendConf locked_configs implicit_default
# SITECONFIG.TCL, site-specific configuration script for Modules
#
# This Tcl script enables to supersede any global variable or procedure
# definition of modulecmd.tcl. See 'Modulecmd startup' section in module(1)
# manpage for detailed information.
##########################################################################
# uncomment the following line to forbid the definition of an extra
# site-specific configuration script
#lappendConf locked_configs extra_siteconfig
# uncomment the following line to forbid `implicit_default` config option
# superseding
#lappendConf locked_configs implicit_default
rename ::module ::__module
proc module {command args} {
exec logger -t modulecmd "[get-env USER]: $command [join $args]"
return [eval __module "{$command}" $args]
}
rename ::module ::__module
proc module {command args} {
exec logger -t modulecmd "[get-env USER]: $command [join $args]"
return [eval __module "{$command}" $args]
}
Output of the module config --dump-state
is
Modules Release 4.6.1+XX-g8159ac3d (2020-12-15)
- Config. name ---------.- Value (set by if default overridden) ---------------
advanced_version_spec 0
auto_handling 0
avail_indepth 1
avail_report_dir_sym 1
avail_report_mfile_sym 1
collection_pin_version 0
collection_target <undef>
color never
colors hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:sy=95:de=4:cm=92
contact root@localhost
csh_limit 4000
extended_default 0
extra_siteconfig <undef>
home /software/modules (env-var)
icase never
ignored_dirs CVS RCS SCCS .svn .git .SYNC .sos
implicit_default 1
implicit_requirement 1
locked_configs
ml 1
nearly_forbidden_days 14
pager /usr/bin/less -eFKRX
rcfile <undef>
run_quarantine <undef>
search_match starts_with
set_shell_startup 1
shells_with_ksh_fpath
silent_shell_debug <undef>
siteconfig /software/modules/etc/siteconfig.tcl
tcl_ext_lib /software/modules/lib/libtclenvmodules.so
term_background dark
unload_match_order returnlast
verbosity concise (env-var)
wa_277 0
- State name -----------.- Value ----------------------------------------------
autoinit 0
clock_seconds 1664909057
domainname (none)
error_count 0
extra_siteconfig_loaded 0
false_rendered 0
force 0
hiding_threshold 0
inhibit_errreport 0
inhibit_interp 0
init_error_report 1
is_stderr_tty 1
is_win 0
kernelversion #1 SMP Wed Sep 15 15:39:39 UTC 2021
lm_info_cached 0
:
Thank you!
Now that I read again the code I proposed, I see that it is totally wrong. Sorry for that. The correct fix code should be:
if {[info exists ::env(LD_LIBRARY_PATH)]} {
set ORIG_LD_LIBRARY_PATH $::env(LD_LIBRARY_PATH)
unset ::env(LD_LIBRARY_PATH)
}
exec logger -t modulecmd "[get-env USER]: $command [join $args]"
if {[info exists ORIG_LD_LIBRARY_PATH]} {
set ::env(LD_LIBRARY_PATH) $ORIG_LD_LIBRARY_PATH
}
So I suggest you update the siteconfig.tcl
file on your side to look like:
# SITECONFIG.TCL, site-specific configuration script for Modules
#
# This Tcl script enables to supersede any global variable or procedure
# definition of modulecmd.tcl. See 'Modulecmd startup' section in module(1)
# manpage for detailed information.
##########################################################################
# uncomment the following line to forbid the definition of an extra
# site-specific configuration script
#lappendConf locked_configs extra_siteconfig
# uncomment the following line to forbid `implicit_default` config option
# superseding
#lappendConf locked_configs implicit_default
rename ::module ::__module
proc module {command args} {
if {[info exists ::env(LD_LIBRARY_PATH)]} {
set ORIG_LD_LIBRARY_PATH $::env(LD_LIBRARY_PATH)
unset ::env(LD_LIBRARY_PATH)
}
exec logger -t modulecmd "[get-env USER]: $command [join $args]"
if {[info exists ORIG_LD_LIBRARY_PATH]} {
set ::env(LD_LIBRARY_PATH) $ORIG_LD_LIBRARY_PATH
}
return [eval __module "{$command}" $args]
}
When I run
module avail
I get the following error message:Output of:
conda package -w /software/python-anaconda-2022.05-el8-x86_64/lib/libuuid.so.1
is:
/software/python-anaconda-2022.05-el8-x86_64/lib/libuuid.so.1 defaults/linux-64::libuuid-1.0.3-h7f8727e_2