Bug 160796 - vmstat crashes when accessing LVM partition.
vmstat crashes when accessing LVM partition.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
4
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Karel Zak
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-17 07:22 EDT by Konstantin Antselovich
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-11 07:28:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Konstantin Antselovich 2005-06-17 07:22:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
vmstat segfaults with '***Bufferoverflow detected***' when trying to check block IO on LVM-based partition

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

How reproducible:
Always

Steps to Reproduce:
1. sudo vmstat -p /dev/YourVolumeGroup/YourLogicalVolume
2.
3.
  

Actual Results:  *** buffer overflow detected ***: vmstat terminated
<see details below>

Expected Results:  <partition name>   reads   read sectors  writes    requested writes
                   2          4        0          0


Additional info:

[konstantin@lifebook Desktop]$ uname -a
Linux lifebook.myhome 2.6.12-rc6-ck2 #1 Wed Jun 15 20:55:41 PDT 2005 i686 i686 i386 GNU/Linux
[konstantin@lifebook Desktop]$ rpm -q procps
procps-3.2.5-6
[konstantin@lifebook Desktop]$ vmstat -V
procps version 3.2.5
[konstantin@lifebook Desktop]$ sudo vmstat -p /dev/fedora3/home
Password:
*** buffer overflow detected ***: vmstat terminated
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0x570565]
/lib/libc.so.6(__vsprintf_chk+0x0)[0x56fe30]
/lib/libc.so.6(_IO_default_xsputn+0x97)[0x4f2b58]
/lib/libc.so.6(_IO_vfprintf+0x363f)[0x4d03a1]
/lib/libc.so.6(__vsprintf_chk+0xa1)[0x56fed1]
/lib/libc.so.6(__sprintf_chk+0x30)[0x56fe24]
vmstat[0x804a1be]
/lib/libc.so.6(__libc_start_main+0xc6)[0x4a6de6]
vmstat[0x8048af1]
======= Memory map: ========
00470000-0048a000 r-xp 00000000 fd:00 45094      /lib/ld-2.3.5.so
0048a000-0048b000 r--p 00019000 fd:00 45094      /lib/ld-2.3.5.so
0048b000-0048c000 rw-p 0001a000 fd:00 45094      /lib/ld-2.3.5.so
00492000-005b6000 r-xp 00000000 fd:00 45103      /lib/libc-2.3.5.so
005b6000-005b8000 r--p 00124000 fd:00 45103      /lib/libc-2.3.5.so
005b8000-005ba000 rw-p 00126000 fd:00 45103      /lib/libc-2.3.5.so
005ba000-005bc000 rw-p 005ba000 00:00 0
005be000-005ca000 r-xp 00000000 fd:00 45189      /lib/libproc-3.2.5.so
005ca000-005cb000 rw-p 0000c000 fd:00 45189      /lib/libproc-3.2.5.so
005cb000-005d0000 rw-p 005cb000 00:00 0
007fc000-00805000 r-xp 00000000 fd:00 45218      /lib/libgcc_s-4.0.0-20050520.so.1
00805000-00806000 rw-p 00009000 fd:00 45218      /lib/libgcc_s-4.0.0-20050520.so.1
08048000-0804c000 r-xp 00000000 fd:00 549501     /usr/bin/vmstat
0804c000-0804e000 rw-p 00003000 fd:00 549501     /usr/bin/vmstat
0804e000-0806f000 rw-p 0804e000 00:00 0          [heap]
b7f26000-b7f28000 rw-p b7f26000 00:00 0
bf92f000-bf944000 rw-p bf92f000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
Aborted
Comment 1 Karel Zak 2005-06-21 07:41:34 EDT
It's pretty stupid bug in main():

   char partition[16];
   sprintf(partition, "%s", *argv);

It will be fixed in next procps update with some othes things (I don't want to
release update for this minor bug only).

Note, you have to use vmstat without full path to device. Please, see "cat
/proc/diskstats" (e.g. "hda1" and no "/dev/hda1"). And it works with physical
partitions -- logical LVM things are virtual and linux kernel doesn't provide
statistic information about that.
Comment 2 Karel Zak 2005-07-11 07:28:07 EDT
Fixed in procps-3.2.5-6.3 (FC4) and procps-3.2.3-5.3 (FC3).

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