environment-modules (3.2.10-8) breaks with bash 4.3.11(1)-release

Bug #1422755 reported by Predrag Micakovic
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
modules (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

environment-modules (3.2.10-8) fails to execute batch (atd) jobs under bash 4.3.11(1)-release. This is likely caused by changes in bash functions in follow-up to shellshock fixes to bash.

Test with environment-modules (3.2.10-8) uninstalled and this sample script:

cat /tmp/ls.sh

#!/bin/bash
ls > out.ls

Schedule with 'batch < /tmp/ls.sh' and you will receive the correct output.

Now install environment-modules and try the same. You will receive an error along these lines:

sh: 46: BASH_FUNC_module%%=() { eval `/usr/bin/modulecmd bash $*`
}: not found
sh: 46: export: BASH_FUNC_module%%: bad variable name

Admittedly, this has to be fixed upstream, but we do have a broken package as it stands.

Tested on Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic x86_64).

description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in modules (Ubuntu):
status: New → Confirmed
Revision history for this message
Jan Groenewald (jan-aims) wrote :

0 root@sudan:~#lsb_release -d
Description: Ubuntu 14.04.5 LTS
0 root@sudan:~#bash --version|grep bash
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
0 root@sudan:~#dpkg -l bash|grep ii
ii bash 4.3-7ubuntu1.5 amd64 GNU Bourne Again SHell
0 root@sudan:~#at now
warning: commands will be executed using /bin/sh
at> reboot # or any command
at> <EOT>
job 13 at Fri Nov 11 10:19:00 2016
0 root@sudan:~#

actual output:

sh: 57: BASH_FUNC_module%%=() { eval `/usr/bin/modulecmd bash $*`
}: not found
sh: 57: export: BASH_FUNC_module%%: bad variable name

Revision history for this message
Jan Groenewald (jan-aims) wrote :
Revision history for this message
Xavier Delaruelle (xdelaruelle) wrote :

This issue does not affect newest Ubuntu release (18.04).

# lsb_release -d
Description: Ubuntu 18.04 LTS
# bash --version | head -n1
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)

# at now
warning: commands will be executed using /bin/sh
at> ls
at> <EOT>
job 3 at Mon May 21 09:20:00 2018
#

No error raised anymore

Changed in modules (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.