Bug 1172381

Summary: bash: error importing function definition for `BASH_FUNC_module'
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: konsoleAssignee: Than Ngo <than>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: fweimer, hgkamath, john.haxby, jreznik, jsynacek, kde-sig, kevin, ltinkl, mmaslano, orion, rdieter, rnovacek, than, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1306804 (view as bug list) Environment:
Last Closed: 2015-06-29 23:46:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
requested log.txt
none
diff_ansi_gnometerminal.txt
none
diff_ansi_gnometerminal_exports.txt none

Description Rex Dieter 2014-12-10 00:11:19 UTC
I *think* this started recently with bash security fixes...  opening a konsole now gives initial output:

bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `BASH_FUNC_module'



$ rpm -q bash environment-modules
bash-4.2.53-1.fc20.x86_64
environment-modules-3.2.10-6.fc20.x86_64

Comment 1 Jan Synacek 2014-12-10 07:21:13 UTC
Probably not environment-modules problem. See bug 1147043. However, I'm not sure if this particular problem is related to "at", so I'm leaving the bug open for now.

Comment 2 Tomas Mraz 2014-12-10 07:24:32 UTC
huh - what has at to do with opening konsole?

Comment 3 Jan Synacek 2014-12-10 08:35:06 UTC
Oops, sorry, didn't mean to change the component to at...

Comment 4 Florian Weimer 2014-12-10 09:18:40 UTC
(In reply to Rex Dieter from comment #0)
> I *think* this started recently with bash security fixes...  opening a
> konsole now gives initial output:
> 
> bash: module: line 1: syntax error: unexpected end of file
> bash: error importing function definition for `BASH_FUNC_module'

Does this go away with a system reboot?  This will happen if you update bash across versions with different function name mangling, without restarting all processes which have function definitions in their environment.

Comment 5 Rex Dieter 2014-12-10 13:15:46 UTC
I've rebooted at least several times since this started.

Comment 6 Florian Weimer 2014-12-10 15:52:13 UTC
(In reply to Rex Dieter from comment #5)
> I've rebooted at least several times since this started.

Thanks.  I cannot reproduce this with the package versions you provided.  It is likely that this is an interaction with a local system settings or another package.

Does “bash -l” show the same error message?  If yes, could you attach the output of “bash -x -l </dev/null 2>log.txt” to this bug (or send it to me privately in case you are worried about the data found in it)?

Comment 7 KDE SIG 2014-12-15 17:43:24 UTC
OK, I'll dig deeper when I have access to this laptop again.  (marking needinfo on myself). :)

I can confirm this does not happen on other f20 boxes I have at work, so you're likely right this is coming from somewhere besides what we've looked at yet.

Comment 8 Rex Dieter 2015-01-23 20:42:47 UTC
Created attachment 983547 [details]
requested log.txt

Comment 9 Rex Dieter 2015-01-23 20:43:12 UTC
Seeing it on my f21 laptop now too. :(

Comment 10 Orion Poplawski 2015-01-28 20:55:37 UTC
Rex - I think the output of "env" from your login shell would be useful, perhaps from a kde autostart script?

Comment 11 Ganapathi Kamath 2015-02-08 05:15:43 UTC
install eclipse TCF 1.2 plugin from marketplace
http://marketplace.eclipse.org/content/tcf-terminals

1) start eclipse
2) ctrl-alt-T, start a new terminal

any time bash is executed inside this different kind of TTY, the error throws up

bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `BASH_FUNC_module'
[user1@localhost ~]$ 
[user1@localhost ~]$ bash -c "pwd"
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `BASH_FUNC_module'
/home/user1
[user1@localhost ~]$ echo $TERM
ansi

did not happen in
xterm
linux-console
gnome-terminal

speculation
may have something to do with 
a) TTY
b) being the sub-process of another process

does not have to do with being a login shell

Comment 12 Ganapathi Kamath 2015-02-08 05:35:42 UTC
Created attachment 989320 [details]
diff_ansi_gnometerminal.txt

attached is a diff between the exported environment of the eclipse-term and gnome-terminal 
set > ~/tmp/a1 # eclipse
set > ~/tmp/a2 # gnome-terminal
diff ~/tmp/a1 ~/tmp/a2

there is an environment declaration 
declare -x BASH_FUNC_module
in the eclipse term

$ bash --version
GNU bash, version 4.3.33(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Comment 13 Ganapathi Kamath 2015-02-08 05:40:06 UTC
Created attachment 989321 [details]
diff_ansi_gnometerminal_exports.txt

this contains the BASH_FUNC_module

export > ~/tmp/a1 # eclipse
export > ~/tmp/a2 # gnome-terminal
diff ~/tmp/a1 ~/tmp/a2

Comment 14 Fedora End Of Life 2015-05-29 13:29:15 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2015-06-29 23:46:43 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.