Bug 1080733
| Summary: | [abrt] bash: xmalloc(): bash killed by SIGSEGV | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dan Mossor [danofsatx] <danofsatx> | ||||||||||||||||||||||||||
| Component: | bash | Assignee: | Ondrej Oprala <ooprala> | ||||||||||||||||||||||||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||||||
| Version: | 20 | CC: | admiller, danofsatx, ooprala, ovasik | ||||||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/b226529e7491d93aad860a65dd6b6395375cf4af | ||||||||||||||||||||||||||||
| Whiteboard: | abrt_hash:16250389ce5ffc262812396264cab0c9f8708d5f | ||||||||||||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||||||
| Last Closed: | 2014-04-27 03:55:11 UTC | Type: | --- | ||||||||||||||||||||||||||
| 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
Dan Mossor [danofsatx]
2014-03-26 03:58:06 UTC
Created attachment 878832 [details]
File: backtrace
Created attachment 878833 [details]
File: cgroup
Created attachment 878834 [details]
File: core_backtrace
Created attachment 878835 [details]
File: dso_list
Created attachment 878836 [details]
File: environ
Created attachment 878837 [details]
File: exploitable
Created attachment 878838 [details]
File: limits
Created attachment 878839 [details]
File: maps
Created attachment 878840 [details]
File: open_fds
Created attachment 878841 [details]
File: proc_pid_status
Created attachment 878842 [details]
File: var_log_messages
Created attachment 878843 [details]
The script I was trying to move
This is the simple script I was attempting to move from /home/dan/ to /home/dan/aws/ - I tried two more times after this crash, and it happened every time.
I can repeat this ad infinitum with my user account. I can't move any files at all. As root, there are no issues. selinux is turned off. I switched to /bin/sh as the shell, and it has no issues moving files. It is just bash with my user account. I will reboot and see if that clears it up (I need to reboot anyhow - a lot of updates to apply). Three reboots later and a new kernel, it is still happening. But it appears to be something in my profile - when I switch to /bin/sh, which is a symlink to /bin/bash, it bypasses my .bashrc .bash_profile files and works just fine. Hi and thanks for the report. Could you please attach the contents of your .bashrc and .bash_profile? From the backtrace it seems xmalloc() is passed a legal value. Also, are you able to reproduce this with bash-4.3 in rawhide? Thanks. Sorry this took so long to get back to. I want to confirm that this is still happening in bash-4.2.47-2.fc20.x86_64. I have not tried in rawhide, as rawhide will not run on my laptop due to bugs in the Nouveau driver.
Since both files you requested to see are terrbly short, I'll just paste them instead of attaching.
[dan@g55 ~]$ cat .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
alias shop='ssh -X dan.1.51'
alias shopr='ssh -X root.1.51'
function mv ()
{
for last; do true; done
if [[ ! -e $last ]]; then
mkdir -p $last
fi
mv $@
}
[dan@g55 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
[dan@g55 ~]$
And now that I've pasted those, I see the problem - I was trying to create a function to move recursively. The function didn't work, and I forgot all about it. I removed that function from .bashrc, and solved the problem. There isn't a bug in bash - the bug was all mine. Sorry about that.
No problem, this still leads to a bug in bash - one that I'm already aware of from another ABRT report, but still, I think I should explain it.
You see, bash is able to detect recursive functions, but only
if you specififed the function as
function mv { #code } OR mv () { #code }.
Now this -> "function mv () {#code}" is not POSIX-ly correct (although a very common way to write a shell function), and for some reason bash fails to catch the inf. recursion and lets it smash its stack. This also happens in the very newest version of bash :( .
|