Bug 670289

Summary: top command crashes with -H and invalid pid
Product: [Fedora] Fedora Reporter: sasikanth <sasikanth.v19>
Component: procpsAssignee: Jan Görig <jgorig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dcantrell, jgorig, sasikanth.v19
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: procps-3.2.8-8.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-21 22:56:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description sasikanth 2011-01-17 19:37:38 UTC
Description of problem:

Top command crashes with the options -H -p with invalid pid

top -H -p <invalid_pid>

but  top -p <invalid_pid> works fine.

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


How reproducible:


Steps to Reproduce:
1. top -H -p <invalid-pi>
2.
3.
  
Actual results:

top -H -p <invalid-pid>   crashes

Expected results:

top -H -p <invalid-pid>  must work as top -p <invalid-pid>

Additional info:

[root@Shash Sasi]# top -p 19999

top - 00:38:08 up  1:47,  5 users,  load average: 0.21, 0.54, 0.66
Tasks:   0 total,   0 running,   0 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.6%us,  1.6%sy,  0.0%ni, 84.0%id,  2.7%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2052500k total,  1901108k used,   151392k free,   219396k buffers
Swap:  4128764k total,        0k used,  4128764k free,  1184288k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                         





[root@Shash Sasi]# top -H -p 19999
*** glibc detected *** top: free(): invalid pointer: 0xbf81c4c8 ***
======= Backtrace: =========
/lib/libc.so.6[0x4ce0db41]
top[0x804b643]
top[0x805190a]
/lib/libc.so.6(__libc_start_main+0xe6)[0x4cdb5cc6]
top[0x8049731]
======= Memory map: ========
08047000-08056000 r-xp 00000000 fd:00 686300     /usr/bin/top
08056000-08057000 rw-p 0000e000 fd:00 686300     /usr/bin/top
08057000-0805a000 rw-p 00000000 00:00 0 
09c03000-09c24000 rw-p 00000000 00:00 0          [heap]
4cd7d000-4cd9b000 r-xp 00000000 fd:00 131181     /lib/ld-2.12.2.so
4cd9b000-4cd9c000 r--p 0001d000 fd:00 131181     /lib/ld-2.12.2.so
4cd9c000-4cd9d000 rw-p 0001e000 fd:00 131181     /lib/ld-2.12.2.so
4cd9f000-4cf23000 r-xp 00000000 fd:00 131210     /lib/libc-2.12.2.so
4cf23000-4cf24000 ---p 00184000 fd:00 131210     /lib/libc-2.12.2.so
4cf24000-4cf26000 r--p 00184000 fd:00 131210     /lib/libc-2.12.2.so
4cf26000-4cf27000 rw-p 00186000 fd:00 131210     /lib/libc-2.12.2.so
4cf27000-4cf2a000 rw-p 00000000 00:00 0 
4cf2c000-4cf2f000 r-xp 00000000 fd:00 131577     /lib/libdl-2.12.2.so
4cf2f000-4cf30000 r--p 00002000 fd:00 131577     /lib/libdl-2.12.2.so
4cf30000-4cf31000 rw-p 00003000 fd:00 131577     /lib/libdl-2.12.2.so
4cf33000-4cf40000 r-xp 00000000 fd:00 132311     /lib/libproc-3.2.8.so
4cf40000-4cf41000 rw-p 0000d000 fd:00 132311     /lib/libproc-3.2.8.so
4cf41000-4cf54000 rw-p 00000000 00:00 0 
4d416000-4d433000 r-xp 00000000 fd:00 138148     /lib/libgcc_s-4.4.5-20101113.so.1
4d433000-4d434000 rw-p 0001d000 fd:00 138148     /lib/libgcc_s-4.4.5-20101113.so.1
4d95b000-4d98c000 r-xp 00000000 fd:00 142853     /lib/libncursesw.so.5.7
4d98c000-4d98d000 rw-p 00030000 fd:00 142853     /lib/libncursesw.so.5.7
4e1ca000-4e1e8000 r-xp 00000000 fd:00 142852     /lib/libtinfo.so.5.7
4e1e8000-4e1eb000 rw-p 0001d000 fd:00 142852     /lib/libtinfo.so.5.7
b77a4000-b77a6000 rw-p 00000000 00:00 0 
b77ca000-b77cb000 rw-p 00000000 00:00 0 
b77cb000-b77cc000 r-xp 00000000 00:00 0          [vdso]
bf7fd000-bf81e000 rw-p 00000000 00:00 0          [stack]
Aborted (core dumped)
[root@Shash Sasi]#

Comment 1 Jan Görig 2011-01-18 14:51:32 UTC
Thank you for your bug report.

Comment 2 Fedora Update System 2011-01-18 14:51:59 UTC
procps-3.2.8-8.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/procps-3.2.8-8.fc13

Comment 3 Fedora Update System 2011-01-18 14:53:03 UTC
procps-3.2.8-15.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/procps-3.2.8-15.fc14

Comment 4 Fedora Update System 2011-01-18 21:29:59 UTC
procps-3.2.8-15.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update procps'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/procps-3.2.8-15.fc14

Comment 5 Fedora Update System 2011-01-21 22:56:05 UTC
procps-3.2.8-15.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-01-26 20:55:54 UTC
procps-3.2.8-8.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.