Top command crashes when the window size if reduced to very small
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Procps |
New
|
Undecided
|
Unassigned | ||
procps (Ubuntu) |
Confirmed
|
Undecided
|
Jamie Fox |
Bug Description
Binary package hint: procps
I was trying out dwm tiling window manager. I top in one of the xterm and started creating a large number of xterms. This had the effect of reducing the size of the original window to very small. at which point, top command crashed:
top - 22:44:07 up 40 min, 10 users, load average: 0.67, 0.31
Tasks: 127 total, 13 running, 113 sleeping, 0 stopped, 1
top - 22:44:08 up 40 min, 12 users, load average: 0.67, 0.31
Tasks: 133 total, 8 running, 124 sleeping, 0 stopped, 1
Cpu(s): 67.2%us, 7.6%sy, 0.0%ni, 25.2%id, 0.0%wa, 0.0%hi,
Mem: 1553672k total, 796244k used, 757428k free, 255
Swap: 1044216k total, 0k used, 1044216k free, 5964
8845 damaru 19 0 10484 3576 2592 R 31.1 0.2 0:00.13
*** glibc detected *** top: realloc(): invalid next size: 0x08058dd8 *** 16 0 165m 17m 9.9m R 18.5 1.2 1:01.05
======= Backtrace: ========= 1084 824 R 2.3 0.1 0:00.03
/lib/tls/
/lib/tls/
top[0x804b075] 10 -5 0 0 0 S 0.0 0.0 0:00.27
[0x0] root 10 -5 0 0 0 S 0.0 0.0 0:00.27
======= Memory map: ======== 0 0 S 0.0 0.0 0:00.00
08047000-08054000 r-xp 00000000 08:03 438223 /usr/bin/top
08054000-08055000 rw-p 0000c000 08:03 438223 /usr/bin/top
08055000-08079000 rw-p 08055000 00:00 0 [heap]00.03
4e823000-4e83c000 r-xp 00000000 08:03 616321 /lib/ld-2.4.so109 root 10 -5 0 0 0 S 0.0 0.0 0:00.16
4e83c000-4e83e000 rw-p 00018000 08:03 616321 /lib/ld-2.4.so176 root 15 0 0 0 0 S 0.0 0.0 0:00.01
4e840000-4e96d000 r-xp 00000000 08:03 616322 /lib/tls/
4e96d000-4e96f000 r--p 0012c000 08:03 616322 /lib/tls/
4e96f000-4e971000 rw-p 0012e000 08:03 616322 /lib/tls/
4e971000-4e974000 rw-p 4e971000 00:00 0 0.0 0.1 0:00.02
4e976000-4e978000 r-xp 00000000 08:03 616324 /lib/tls/
4e978000-4e97a000 rw-p 00001000 08:03 616324 /lib/tls/
4e97c000-4e988000 r-xp 00000000 08:03 617216 /lib/libproc-
4e988000-4e989000 rw-p 0000b000 08:03 617216 /lib/libproc-
4e989000-4e99c000 rw-p 4e989000 00:00 0 0.0 0.1 0:00.10
4f14d000-4f15f000 r-xp 00000000 08:03 616428 /lib/tls/
4f15f000-4f161000 rw-p 00011000 08:03 616428 /lib/tls/
4f161000-4f163000 rw-p 4f161000 00:00 0 0.0 0.0 0:00.02
4f6f2000-4f729000 r-xp 00000000 08:03 613173 /lib/libncurses
4f729000-4f731000 rw-p 00037000 08:03 613173 /lib/libncurses
4f731000-4f732000 rw-p 4f731000 00:00 0 0.0 0.0 0:00.00
4f9d3000-4f9dd000 r-xp 00000000 08:03 616327 /lib/libgcc_
4f9dd000-4f9de000 rw-p 00009000 08:03 616327 /lib/libgcc_
b7e00000-b7e21000 rw-p b7e00000 00:00 0 0.0 0.1 0:00.00
b7e21000-b7f00000 ---p b7e21000 00:00 0 0.0 0.1 0:00.00
b7f81000-b7f8a000 r-xp 00000000 08:03 612925 /lib/tls/
b7f8a000-b7f8c000 rw-p 00008000 08:03 612925 /lib/tls/
b7f8c000-b7f94000 r-xp 00000000 08:03 612939 /lib/tls/
b7f94000-b7f96000 rw-p 00007000 08:03 612939 /lib/tls/
b7f96000-b7f9d000 r-xp 00000000 08:03 612918 /lib/tls/
b7f9d000-b7f9f000 rw-p 00006000 08:03 612918 /lib/tls/
b7f9f000-b7fa1000 rw-p b7f9f000 00:00 0
b7fb6000-b7fb9000 rw-p b7fb6000 00:00 0
bfb20000-bfb36000 rw-p bfb20000 00:00 0 [stack]
ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
Aborted
Thank you for your bug report. I have confirmed that this also occurs when running top in gnome-terminal with metacity. The crash occurs when the number of text rows is reduced to 5 or fewer.