Bug 834304

Summary: bash is stuck in infinte loop during conversion from/to wide char
Product: [Fedora] Fedora Reporter: Branislav Náter <bnater>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 17CC: maxamillion, rrakus, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-14 21:49:00 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:

Description Branislav Náter 2012-06-21 13:40:33 UTC
Description of problem:
bash is stuck in infinte loop during conversion from/to wide char, eating 99% of cpu.

Version-Release number of selected component (if applicable):
bash-4.2.29-1.fc17

How reproducible:
always

Steps to Reproduce:
1. run command: $(cat $(echo /bin/bash))
  
Actual results:
bash process is stuck

Expected results:
something like: bash: ELF>��A@�J@8: command not found

Additional info:
command works as shown in "Expected results" on bash-4.1.2-9.el6_2

Comment 1 Roman Rakus 2012-06-21 14:07:44 UTC
I will try to find simpler and cleaner reproducer.
bash is stuck in globbing fucntions.
From the backtrace:
#5  0x000000000047f50b in glob_filename (
    pathname=pathname@entry=0x21a0c10 "\022\016]G\302\\\001?S\021\031\200\270m(*q\022\016XC\247\024}\022\016\260\360A\342\\\001\032X\022\016\200\\\177E2R~\021\031\300)n\b\\\023\022\016\300\070I\024\\.\022\016p\343H\207\346`\022\016",

Comment 3 Roman Rakus 2012-07-11 10:46:12 UTC
As I expected, Patch 30 is fixing the infinite loop.

$ $(cat /bin/bash)
bash: ELF>8�A@�+@8: command not found...

(process:23813): GLib-CRITICAL **: g_variant_new_string: assertion `g_utf8_validate (string, -1, NULL)' failed

(process:23813): GLib-CRITICAL **: g_variant_ref_sink: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_new_string: assertion `g_utf8_validate (string, -1, NULL)' failed

(process:23813): GLib-CRITICAL **: g_variant_ref_sink: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_new_string: assertion `g_utf8_validate (string, -1, NULL)' failed

(process:23813): GLib-CRITICAL **: g_variant_ref_sink: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_new_string: assertion `g_utf8_validate (string, -1, NULL)' failed

(process:23813): GLib-CRITICAL **: g_variant_ref_sink: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_ref: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_unref: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_unref: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_unref: assertion `value != NULL' failed

(process:23813): GLib-CRITICAL **: g_variant_unref: assertion `value != NULL' failed

Comment 4 Fedora Update System 2012-07-11 10:47:43 UTC
bash-4.2.36-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bash-4.2.36-1.fc17

Comment 5 Fedora Update System 2012-07-11 23:57:46 UTC
Package bash-4.2.36-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bash-4.2.36-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10545/bash-4.2.36-1.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-07-14 21:49:00 UTC
bash-4.2.36-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.