script `lmod.sh` in `/etc/profile.d` errors out and dumps stack trace

Bug #1802269 reported by Riccardo Murri on 2018-11-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lmod (Ubuntu)
Undecided
Unassigned

Bug Description

I have just run `apt install lmod` on my Ubuntu 18.04 system.

Now, starting a login shell results in the following Lua stack trace
being dumped:

    $ exec bash -l [10:21:53]
    /usr/bin/lua: /usr/share/lua/5.2/posix/init.lua:29: module 'posix.ctype' not found:
            no field package.preload['posix.ctype']
            no file '/usr/local/share/lua/5.2/posix/ctype.lua'
            no file '/usr/local/share/lua/5.2/posix/ctype/init.lua'
            no file '/usr/local/lib/lua/5.2/posix/ctype.lua'
            no file '/usr/local/lib/lua/5.2/posix/ctype/init.lua'
            no file '/usr/share/lua/5.2/posix/ctype.lua'
            no file '/usr/share/lua/5.2/posix/ctype/init.lua'
            no file './posix/ctype.lua'
            no file '/usr/local/lib/lua/5.2/posix/ctype.so'
            no file '/usr/lib/x86_64-linux-gnu/lua/5.2/posix/ctype.so'
            no file '/usr/lib/lua/5.2/posix/ctype.so'
            no file '/usr/local/lib/lua/5.2/loadall.so'
            no file './posix/ctype.so'
            no file '/usr/local/lib/lua/5.2/posix.so'
            no file '/usr/lib/x86_64-linux-gnu/lua/5.2/posix.so'
            no file '/usr/lib/lua/5.2/posix.so'
            no file '/usr/local/lib/lua/5.2/loadall.so'
            no file './posix.so'
    stack traceback:
            [C]: in function 'require'
            /usr/share/lua/5.2/posix/init.lua:29: in main chunk
            [C]: in function 'require'
            /usr/share/lmod/lmod/libexec/addto:64: in main chunk
            [C]: in ?

There are no custom "profile.d" scripts::

    $ ls -l /etc/profile.d/
    totale 40
    -rw-r--r-- 1 root root 96 ago 20 01:44 01-locale-fix.sh
    -rw-r--r-- 1 root root 825 lug 19 12:05 apps-bin-path.sh
    -rw-r--r-- 1 root root 664 apr 2 2018 bash_completion.sh
    -rw-r--r-- 1 root root 1003 dic 29 2015 cedilla-portuguese.sh
    -rw-r--r-- 1 root root 652 ott 4 2017 input-method-config.sh
    -rwxr-xr-x 1 root root 2284 dic 22 2016 lmod.sh
    -rw-r--r-- 1 root root 108 set 12 2017 sysstat.sh
    -rw-r--r-- 1 root root 1941 ott 3 2017 vte-2.91.sh
    -rw-r--r-- 1 root root 954 apr 19 2018 xdg_dirs_desktop_session.sh
    -rw-r--r-- 1 root root 1557 ago 18 2017 Z97-byobu.sh

This is the state of Lua packages on my system:

    $ dpkg-query -l 'lua*'
    Voluto=U (non noto)/I (installato)/R (rimosso)/P (rimosso totale)/H (in attesa)
    | Stato=Non/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(nessuno)/R (reinstallazione richiesta) (Stato,Err: maiuscolo=grave)
    ||/ Nome Versione Architettura Descrizione
    +++-=====================================-=======================-=======================-===============================================================================
    un lua <nessuna> <nessuna> (nessuna descrizione disponibile)
    ii lua-bit32:amd64 5.3.0-3 amd64 Backport of the Lua 5.2 bit32 library to Lua 5.1
    ii lua-filesystem:amd64 1.6.3-1 amd64 luafilesystem library for the Lua language
    ii lua-json 1.3.3-2 all JSON decoder/encoder for Lua
    ii lua-lpeg:amd64 1.0.0-2 amd64 LPeg library for the Lua language
    ii lua-posix:amd64 33.4.0-2 amd64 posix library for the Lua language
    ii lua-term 0.07-0.1 amd64 Lua module for manipulating a terminal
    un lua5.1-bit32 <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.1-filesystem <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.1-json <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.1-lpeg <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.1-posix <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.1-term <nessuna> <nessuna> (nessuna descrizione disponibile)
    ii lua5.2 5.2.4-1.1build1 amd64 Simple, extensible, embeddable programming language
    un lua5.2-filesystem <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.2-json <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.2-lpeg <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.2-posix <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.2-term <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.3-filesystem <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.3-json <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.3-lpeg <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.3-posix <nessuna> <nessuna> (nessuna descrizione disponibile)
    un lua5.3-term <nessuna> <nessuna> (nessuna descrizione disponibile)
    un luasseq <nessuna> <nessuna> (nessuna descrizione disponibile)
    un luatex <nessuna> <nessuna> (nessuna descrizione disponibile)

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: lmod 6.6-0.2
ProcVersionSignature: Ubuntu 4.15.0-38.41-generic 4.15.18
Uname: Linux 4.15.0-38-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
CurrentDesktop: LXDE
Date: Thu Nov 8 10:23:42 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-10-12 (391 days ago)
InstallationMedia: Ubuntu-Server 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
PackageArchitecture: all
SourcePackage: lmod
UpgradeStatus: Upgraded to bionic on 2018-05-05 (187 days ago)

Riccardo Murri (rmurri) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers