Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
After updating to new bash-4.1.2-15.el6_5.2.x86_64 and having environment-modules-3.2.10-1.el6_5.x86_64 installed "at jobs" stopped working
Version-Release number of selected component (if applicable):
bash-4.1.2-15.el6_5.2.x86_64
environment-modules-3.2.10-1.el6_5.x86_64
How reproducible:
install bash-4.1.2-15.el6_5.2.x86_64 and environment-modules-3.2.10-1.el6_5.x86_64
log on/off
[user@testburk ~]$ at now
at> echo hej
at> <EOT>
job 9 at 2014-09-26 14:26
[user@testburk ~]$
output from at job (sent as email via .forward file):
sh: line 31: syntax error near unexpected token `=\(\)\ {\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`"
"}'
sh: line 31: `"}; export BASH_FUNC_module()'
Steps to Reproduce:
1. install bash-4.1.2-15.el6_5.2.x86_64 & environment-modules-3.2.10-1.el6_5.x86_64
2. log on / off
3. run at job
4. yum remove environment-modules-3.2.10-1.el6_5.x86_64 and logon/off and at jobs can be run again
Actual results:
Expected results:
Additional info:
We need to have environment-modules-3.2.10-1.el6_5.x86_64 installed because of dependency's to mpich2 mpich2-devel openmpi openmpi-devel
Easily reproducible with just running "at" and then checking email. I'm not sure where the piece of code you're seeing is coming from. I'll investigate further.
Currently, this is a problem with "at" generating output from the environment and passing everything as is. Until bash was fixed, this worked well, because functions were simply output as functions. With the bash fix, though, functions are output with a special "BASH_FUNC_" prefix and that breaks when one attempts to source the output back to the shell.
Before shellshock fix, "at" generated (taken from /var/spool/at/):
...
module=\(\)\ {\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`"
"}; export module
...
After the fix:
...
BASH_FUNC_module()=\(\)\ {\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`"
"}; export BASH_FUNC_module()
...
The module() function gets sourced from /etc/profile.d/modules.sh, which in turn sources /usr/share/Modules/init/$shell, where shell == "bash" in this case. The corresponding definition and export looks like this:
module() { eval `/usr/bin/modulecmd bash $*`; }
export -f module
I suggest a workaround in "at" that will check for the "BASH_FUNC_" prefix and strip it if present. It would be better if bash didn't prefix the function exports with anything, though.
Hi again
Just trying to help I saw bugzilla created after this one about the same issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1147043#c8
There Florian Weimer suggests a "limited workaround" by editing "/etc/profile.d/modules.sh" but he is not sure about functionality impact on environment-modules, so it needs more testing.
Description of problem: After updating to new bash-4.1.2-15.el6_5.2.x86_64 and having environment-modules-3.2.10-1.el6_5.x86_64 installed "at jobs" stopped working Version-Release number of selected component (if applicable): bash-4.1.2-15.el6_5.2.x86_64 environment-modules-3.2.10-1.el6_5.x86_64 How reproducible: install bash-4.1.2-15.el6_5.2.x86_64 and environment-modules-3.2.10-1.el6_5.x86_64 log on/off [user@testburk ~]$ at now at> echo hej at> <EOT> job 9 at 2014-09-26 14:26 [user@testburk ~]$ output from at job (sent as email via .forward file): sh: line 31: syntax error near unexpected token `=\(\)\ {\ \ eval\ \`/usr/bin/modulecmd\ bash\ \$\*\`" "}' sh: line 31: `"}; export BASH_FUNC_module()' Steps to Reproduce: 1. install bash-4.1.2-15.el6_5.2.x86_64 & environment-modules-3.2.10-1.el6_5.x86_64 2. log on / off 3. run at job 4. yum remove environment-modules-3.2.10-1.el6_5.x86_64 and logon/off and at jobs can be run again Actual results: Expected results: Additional info: We need to have environment-modules-3.2.10-1.el6_5.x86_64 installed because of dependency's to mpich2 mpich2-devel openmpi openmpi-devel