Bug 2302036 - Lmod fails to run when installed in mockbuild / container
Summary: Lmod fails to run when installed in mockbuild / container
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lua-json
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-31 12:12 UTC by Jan André Reuter
Modified: 2024-08-02 02:23 UTC (History)
2 users (show)

Fixed In Version: lua-json-1.3.4-8.fc41
Clone Of:
Environment:
Last Closed: 2024-08-02 02:23:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github harningt luajson pull 48 0 None Merged feat: support lpeg 1.1 2024-08-01 03:25:10 UTC

Description Jan André Reuter 2024-07-31 12:12:14 UTC
While trying to figure out what is broken in https://bugzilla.redhat.com/show_bug.cgi?id=2301980, I tried to rebuild Scalasca for Fedora Rawhide.

After figuring out another issue preventing GCC from being detected correctly, I consistently was not able to load any MPI. The fedpkg mockbuild output showed this:

+ cd -
+ for mpi in mpich openmpi
+ mkdir mpich
+ cd mpich
+ module load mpi/mpich-x86_64
+ '[' -z '' ']'
+ case "$-" in
+ __lmod_sh_dbg=x
+ '[' -n x ']'
+ set +x
Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for Lmod's output
/usr/bin/lua: /usr/share/lua/5.4/json/decode/util.lua:97: attempt to call a string value (field 'version')
stack traceback:
	/usr/share/lua/5.4/json/decode/util.lua:97: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.4/json/decode.lua:12: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.4/json.lua:5: in main chunk
	[C]: in function 'require'
	/usr/share/lmod/lmod/libexec/../shells/JsonShell.lua:46: in main chunk
	[C]: in function 'require'
	/usr/share/lmod/lmod/libexec/../shells/BaseShell.lua:295: in upvalue 'l_createShellTbl'
	/usr/share/lmod/lmod/libexec/../shells/BaseShell.lua:327: in function 'BaseShell.isValid'
	/usr/share/lmod/lmod/libexec/utils.lua:1211: in function 'dynamic_shell'
	/usr/share/lmod/lmod/libexec/lmod:342: in function 'main'
	/usr/share/lmod/lmod/libexec/lmod:588: in main chunk
	[C]: in ?
Shell debugging restarted
+ unset __lmod_sh_dbg
+ return 0

I then tried to investigate this a bit further. Trying to install Lmod in a podman instance of Fedora Rawhide, I was able to trigger the same error easily by just installing Lmod without any additional packages.

Unfortunately, this prevents me from trying to rebuild Scalasca. Building for Fedora 40 works fine. Therefore, I expect that a recent update broke something. 

Reproducible: Always

Steps to Reproduce:
1. On a machine, start a Fedora container, e.g. via `podman run -it fedora:rawhide bash`
2. Run `dnf update && dnf install Lmod -y`
3. Run `source /etc/profile`
4. Run `module`
Actual Results:  
One should see the typical long output of Lmod for help

Expected Results:  
Lmod crashes with:

/usr/bin/lua: /usr/share/lua/5.4/json/decode/util.lua:97: attempt to call a string value (field 'version')
stack traceback:
	/usr/share/lua/5.4/json/decode/util.lua:97: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.4/json/decode.lua:12: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.4/json.lua:5: in main chunk
	[C]: in function 'require'
	/usr/share/lmod/lmod/libexec/../shells/JsonShell.lua:46: in main chunk
	[C]: in function 'require'
	/usr/share/lmod/lmod/libexec/../shells/BaseShell.lua:295: in upvalue 'l_createShellTbl'
	/usr/share/lmod/lmod/libexec/../shells/BaseShell.lua:327: in function 'BaseShell.isValid'
	/usr/share/lmod/lmod/libexec/utils.lua:1211: in function 'dynamic_shell'
	/usr/share/lmod/lmod/libexec/lmod:342: in function 'main'
	/usr/share/lmod/lmod/libexec/lmod:588: in main chunk
	[C]: in ?

Comment 1 Orion Poplawski 2024-08-01 03:25:10 UTC
The issue is that lua-lpeg went from defining lpeg.version as a function in 1.0.2 to a string in 1.1.0.  This is apparently intentional as indicated in https://www.inf.puc-rio.br/~roberto/lpeg/#func.  There is apparently a fix for handling this upstream in lua-json here: https://github.com/harningt/luajson/pull/48 but it hasn't been released yet.


Note You need to log in before you can comment on or make changes to this bug.