Description of problem: when /proc/stat grows to more the 8192 bytes in length, vmstat segfaults while parsing out contents Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1.create a system where /proc/stat has more than 8192 characters 2.run vmstat 3. Actual results: segfault Expected results: normal operation Additional info:
Created attachment 96071 [details] patch to increase buffer size to avoid segfault in large /proc/stat files This patch just increases the buffer size which would otherwise overflow on large /proc/stat files. I know this is really just running away from the problem, but it seemed that making the allocation for this buffer dynamic or iterating over the buffer in multiple reads would be overly complex given that its a proc file which is (IIRC) going away in the 2.6 kernel.
Total rewrite in 3.1.15. Please check this version. Dan