Description of problem: The lspci utility ends with segmentation fault when pci.ids file cannot be found. Version-Release number of selected component (if applicable): pciutils-3.0.2-1.fc10 How reproducible: always Steps to Reproduce: # mv /usr/share/hwdata/pci.ids /usr/share/hwdata/pci.ids.orig # lspci Segmentation fault (core dumped) # echo $? 139 Actual results: segmentation fault Expected results: display an error message that pci.ids file was not found Additional info:
I can confirm this. Problem is located in patch-dir-d.patch
If /usr/share/hwdata/pci.ids is not readable for others and if lspci is executed by a common user then lspci segfaults too. Another reproducer: $ su - Password: # chmod o= /usr/share/hwdata/pci.ids # exit $ lspci Segmentation fault (core dumped) $ echo $? 139
pciutils-3.0.2-3.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/pciutils-3.0.2-3.fc10
pciutils-2.2.10-4.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/pciutils-2.2.10-4.fc9
pciutils-3.0.2-3.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
pciutils-2.2.10-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
With pciutils-3.0.2-3.fc10.i386 from koji, still something is wrong. Related lines from strace output: open("/usr/share/hwdata/pci.ids.d/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = 4 writev(4, [{"*** "..., 4}, {"stack smashing detected"..., 23}, {" ***: "..., 6}, {"/sbin/lspci"..., 11}, {" terminated\n"..., 12}], 5) = 56
I've tried executing strace lspci and found nothing interesting. Also I've trying to trace what's going on and again nothing interesting... Could you attach complete strace output? 32/64bit? Have you made any modifications to pciutils / pci.ids databaze? Do you have debuginfo installed? What command (exactly) produced that strace? Thanks
Created attachment 335371 [details] strace -o lspci.trace /sbin/lspci This is what I get: $ /sbin/lspci *** stack smashing detected ***: /sbin/lspci terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x48)[0x666c18] /lib/libc.so.6(__fortify_fail+0x0)[0x666bd0] /usr/lib/libpci.so.3[0x6e9dc4] /usr/lib/libpci.so.3[0x6e7265] /usr/lib/libpci.so.3(pci_load_name_list+0xa3)[0x6e7323] /usr/lib/libpci.so.3(pci_lookup_name+0x61e)[0x6e5eee] /sbin/lspci[0x804ca1a] /sbin/lspci[0x8051318] /sbin/lspci[0x8051b18] /lib/libc.so.6(__libc_start_main+0xe6)[0x5867d6] /sbin/lspci[0x8048ee1] ======= Memory map: ======== ... $ rpm -V hwdata pciutils{,-{libs,devel}} (no output) $ rpm -q hwdata pciutils{,-{libs,devel}} hwdata-0.222-1.fc10.noarch pciutils-3.0.2-3.fc10.i386 pciutils-libs-3.0.2-3.fc10.i386 pciutils-devel-3.0.2-3.fc10.i386 This is on an i386 (Intel Core Duo) laptop. I don't have debuginfo packages installed, but let me know if you need.
(In reply to comment #9) > ... > This is on an i386 (Intel Core Duo) laptop. I don't have debuginfo packages > installed, but let me know if you need. yes, please re-do with pciutils-debuginfo installed ( debuginfo-install pciutils ) then enable core dumps and run lspci (you need it to run this in writable directory) : ulimit -c 999999 lspci it should create file core.<number> in that directory. Please attach it. Also output of ls -lR /usr/share/hwdata/ will be useful. btw, have you made any modifications to pciutils / pci.ids databaze? thanks
Created attachment 335486 [details] core dump from lspci (In reply to comment #10) > yes, please re-do with pciutils-debuginfo installed > ( debuginfo-install pciutils ) That command did not work for latest pciutils packages. I manually installed just the pciutils-debuginfo rpm. I suppose that's the only one needed. > ls -lR /usr/share/hwdata/ /usr/share/hwdata/: total 3204 -rw-r--r-- 1 root root 346759 Oca 28 11:58 MonitorsDB -rw-r--r-- 1 root root 1948830 Oca 28 11:58 oui.txt -rw-r--r-- 1 root root 586319 Oca 28 11:58 pci.ids -rw-r--r-- 1 root root 1622 Oca 28 11:58 upgradelist -rw-r--r-- 1 root root 358992 Oca 28 11:58 usb.ids drwxr-xr-x 2 root root 4096 Oca 28 11:58 videoaliases -rw-r--r-- 1 root root 2145 Oca 28 11:58 videodrivers /usr/share/hwdata/videoaliases: total 28 -rw-r--r-- 1 root root 1747 Ara 2 07:46 i810.xinf -rw-r--r-- 1 root root 1234 Ağu 17 2006 sis.xinf -rw-r--r-- 1 root root 1277 Tem 13 2006 via.xinf -rw-r--r-- 1 root root 110 Mar 20 2008 vmware.xinf > btw, have you made any modifications to pciutils / pci.ids databaze? There were already some rpmsave files there, but I'd removed them before updating from koji. AFAIK 'rpm -V' output should display any modifications, so I assume the files are from hwdata rpm.
Actually the problem seems to be in libc. After reinstalling glibc rpms when installing glibc-debuginfo, lspci began to work fine. Sorry for taking your time.
(In reply to comment #12) > Actually the problem seems to be in libc. After reinstalling glibc rpms when > installing glibc-debuginfo, lspci began to work fine. > > Sorry for taking your time. No problem. Thanks for testing.