Running procinfo at systems with latest amd64-kernels results in a segfault. Reproducible: Always Steps to Reproduce: 1. 'emerge procinfo' at amd64-system with kernel >=2.6.29 2. 'strace' 3. Actual Results: xen3 etc # procinfo Segmentation fault dmesg: procinfo[8599]: segfault at 7fffa2ff1976 ip 0000000000404562 sp 00007fffa2fe53c0 error 4 in procinfo[400000+a000] Expected Results: Linux 2.6.31-xen-r10-dom0 (root@xen3) (gcc 4.3.4 ) #2 SMP Sat Jan 9 14:18:58 CET 2010 8CPU [xen3.(none)] Memory: Total Used Free Shared Buffers Mem: 14452736 14368328 84408 0 13405516 Swap: 8388600 0 8388600 Bootup: Sun Jan 10 15:36:54 2010 Load average: 0.67 0.71 0.71 2/146 22531 user : 0:18:10.98 0.1% page in :801073800 disk 1: 89422r 204210w nice : 0:00:00.05 0.0% page out:907288209 disk 2: 79892938r 0w system: 3:06:07.88 1.4% page act:347689997 disk 3: 436r 0w IOwait: 0:51:05.99 0.3% page dea: 3847625 disk 4: 364670r 8823640w hw irq: 0:00:00.00 0.0% page flt: 9632037 sw irq: 0:11:21.14 0.0% swap in : 0 idle : 8d 19:46:03.79 97.0% swap out: 0 disk 4: 364670r 8823640w uptime: 1d 3:17:23.88 context :14963529330 irq 0: 0 0 0 irq 15: 0 0 0 irq 1: 2 0 0 irq 16: 88952309 0 0 irq 8: 2 0 0 irq 17: 22 0 0 irq 9: 0 0 0 irq 18: 0 0 0 irq 12: 3 0 0 irq 19: 0 0 0 irq 14: 0 0 0 Seems tp be related to large numbers in /proc/interrupts (see https://bugs.launchpad.net/ubuntu/+source/procinfo/+bug/217624). The sscanf line in procinfo-18/routines.c, 273 seems to be broken too. I'll attach working patches here.
Created attachment 216091 [details, diff] segmentation-fault buffer fix
Created attachment 216092 [details, diff] fix for whitespaces in gcc specs
Created attachment 216094 [details, diff] optional lsdev fix1 see http://fuzzle.org/procinfo/
Created attachment 216096 [details, diff] optional lsdev fix2 see http://fuzzle.org/procinfo/
Created attachment 216097 [details, diff] optinal MSI recognition see http://fuzzle.org/procinfo/
This seems to be caused by /proc/stat exceeding 1024 characters Where did you find the reference to http://fuzzle.org/procinfo ?
found the link at https://bugs.launchpad.net/ubuntu/+source/procinfo/+bug/217624 BTW raising the size from 1024 to 2048 should still result in the seg fault at 2.6.31. 4096 is working just fine at 4 servers and 2 workstations with 2.6.31
Should be fixed now.