Bug 181809

Summary: Infinite chain of unicode_start processes crashes system
Product: [Fedora] Fedora Reporter: Robert Nichols <rnichols42>
Component: kbdAssignee: Miloslav Trmač <mitr>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-16 22:15:57 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 Flags
Files from "strace -ff -o log less /etc/profile" (tar archive) none

Description Robert Nichols 2006-02-16 19:10:15 UTC
Description of problem:
Running 'less' on an ordinary file from a VC, no output is shown until ctrl-C is
pressed.  During this time, a continually growing chain of unicode_start
processes is built.  If not interrupted, this eventually causes the system to
become totally unresponsive, requiring a RESET to recover.


Version-Release number of selected component (if applicable):
kbd-1.12-13.2
less-394-2.2

How reproducible:
Always

Steps to Reproduce:
1. Log in on any VC.
2. Run "less /etc/profile"
3. Wait for system to die. (Press Ctrl-C if you don't want that to happen.)
  
Actual results:
The system eventually starts thrashing and becomes totally unresponsive.

Expected results:
The text from /etc/profile should have been displayed.

Additional info:
This misbehavior does not occur if the environment variable LESSOPEN is unset
(defaults to "|/usr/bin/lesspipe.sh %s" in /etc/profile.d/less.sh).  The problem
does not appear to be affected by LANG settings.

Comment 1 Miloslav Trmač 2006-02-16 19:24:00 UTC
What version of initscripts are you using? And what is the value of $BASH_ENV?
Can you provide the first few files generated by 
(strace -ff -o log less /etc/profile)?

Thanks.

Comment 2 Robert Nichols 2006-02-16 20:57:51 UTC
Created attachment 124783 [details]
Files from "strace -ff -o log less /etc/profile" (tar archive)

Comment 3 Robert Nichols 2006-02-16 21:00:03 UTC
initscripts-8.28-1
BASH_ENV=/root/.bashrc  which contains:
    # .bashrc

    # User specific aliases and functions

    #alias rm='rm -i'
    #alias cp='cp -i'
    #alias mv='mv -i'

    # Source global definitions
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    fi

I've found that eliminating the sourcing of /etc/bashrc makes the problem go
away.  File /etc/bashrc from initscripts-8.28-1 is unchanged.

Comment 4 Robert Nichols 2006-02-16 22:02:37 UTC
OK, this looks like a problem in initscripts, not kbd.  File /etc/bashrc sources
all the "*.sh" file in /etc/profile.d, and /etc/profile.d/lang.sh causes
/etc/bashrc to be sourced again.  That's an infinite loop.


Comment 5 Miloslav Trmač 2006-02-16 22:15:57 UTC
Yes, and you are not the first one to hit this: #179949, #172059.  The correct fix
is to remove setting BASH_ENV from all startup files, which unfortunately cannot
be done automatically.

Thanks for your report.

*** This bug has been marked as a duplicate of 172059 ***