Bug 473528 - command hang in ksh and cpu workload is high
command hang in ksh and cpu workload is high
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pdksh (Show other bugs)
4.9
All Linux
medium Severity medium
: rc
: ---
Assigned To: Michal Hlavinka
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-28 22:58 EST by Freax
Modified: 2010-03-05 08:50 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-05 08:50:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backported from mksh (1.66 KB, patch)
2008-12-03 07:55 EST, Michal Hlavinka
no flags Details | Diff

  None (edit)
Description Freax 2008-11-28 22:58:57 EST
Description of problem:
command hang in ksh and cpu workload is high

Version-Release number of selected component (if applicable):
pdksh-5.2.14-30.2

How reproducible:


Steps to Reproduce:
1. create a script like belowing:
# cat hang.sh 
#!/bin/ksh
alias ls="ls"
i=`ls`
echo $i

2. issuce the script
  # ./hang.sh

Actual Results:
  script hangs while executing  i=`ls`, and the cpu workload is nearly 100%

Expected Results:
   The script runs smoothly.


Additional Information:

# ps -e | grep hang
21776 pts/3    00:00:27 hang.sh

# strace -p 21776 
brk(0xa057000)                          = 0xa057000
brk(0xa078000)                          = 0xa078000
brk(0xa099000)                          = 0xa099000
brk(0xa0ba000)                          = 0xa0ba000
brk(0xa0db000)                          = 0xa0db000
brk(0xa0fc000)                          = 0xa0fc000
brk(0xa11d000)                          = 0xa11d000
...

# ltrace -p 21776 
__rawmemchr(0x9480688, 0, 0xbff7e808, 0x8049a6a, 0x9fb71a8)          =
0x948068a 
memset(0x80758a2, '\000', 63)                                        =
0x80758a2 
strcmp("ls", "ls")                                                   = 0
__ctype_b_loc()                                                      =
0xb7fdda84
__rawmemchr(0x9480688, 0, 0xbff7e808, 0x8049a6a, 0x9fb7210)          =
0x948068a 
memset(0x80758a2, '\000', 63)                                        =
0x80758a2 
strcmp("ls", "ls")                                                   = 0
__ctype_b_loc()                                                      =
0xb7fdda84
__rawmemchr(0x9480688, 0, 0xbff7e808, 0x8049a6a, 0x9fb7278)          =
0x948068a 
memset(0x80758a2, '\000', 63)                                        =
0x80758a2 
strcmp("ls", "ls")                                                   = 0
__ctype_b_loc()                                                      =
0xb7fdda84
__rawmemchr(0x9480688, 0, 0xbff7e808, 0x8049a6a, 0x9fb72e0)          =
0x948068a 
memset(0x80758a2, '\000
Comment 1 Michal Hlavinka 2008-12-03 07:55:22 EST
Created attachment 325531 [details]
backported from mksh

patch backported from mksh, thanks to Thorsten Glaser
Comment 2 Michal Hlavinka 2010-03-05 08:50:35 EST
I'm sorry for not addressing the issue in RHEL-4. As pdksh
is not scheduled for update in RHEL-4.9, I'm closing that bugzilla WONTFIX. If
you are still experiencing the issue with RHEL-5, feel free to reopen it
against RHEL-5.

Note You need to log in before you can comment on or make changes to this bug.