2016-12-11 13:58 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004813CentOS-5kudzupublic2011-05-04 21:21
Reporterpapadopoulos 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Product Version5.6 
Target VersionFixed in Version 
Summary0004813: Probe using libkudzu fails in pci_scan_bus
DescriptionThe following code segfaults on Centos 5.6 but works on Centos 5.5.
compiled with
gcc -o usbtest usbtest.c /usr/lib64/libkudzu.a /usr/lib64/libpci.a -l z -l resolv

#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <kudzu/kudzu.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>


int main(char **argv, int argc)
{
    struct device ** devices;

    fprintf(stderr, "looking for usb controllers ... ");

    devices = probeDevices(CLASS_USB, BUS_PCI, 0);

    if (!devices) {
        fprintf(stderr, "no usb controller found \n");
        return 0;
    }

    fprintf(stderr, "controller found \n");

    return 0;
}

Additional InformationOn failing system (x86_64, CentOS 5.6)
rpm -qa | grep kudzu
kudzu-devel-1.2.57.1.26-1.el5.centos
kudzu-devel-1.2.57.1.26-1.el5.centos
kudzu-1.2.57.1.26-1.el5.centos
# rpm -qa | grep pciutils
pciutils-devel-3.1.7-3.el5
pciutils-3.1.7-3.el5
pciutils-devel-3.1.7-3.el5

On good system (CentOS 5.5)
rpm -qa | grep kudzu
kudzu-1.2.57.1.24-1.el5.centos
kudzu-devel-1.2.57.1.24-1.el5.centos
kudzu-devel-1.2.57.1.24-1.el5.centos
[root@devel-server-0-0 ~]# rpm -qa | grep pciutils
pciutils-2.2.3-8.el5_4
pciutils-devel-2.2.3-8.el5_4
pciutils-devel-2.2.3-8.el5_4

Good output:
./usbtest
looking for usb controllers ... controller found
Bad Output:
./usbtest
looking for usb controllers ... Segmentation fault



TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0012625

papadopoulos (reporter)

It seems that a local rebuild of the kudzu-devel RPM solves this problem. e.g
I downloaded the kudzu.src.rpm from ftp.redhat.com and rebuilt with rpmbuild --rebuild. Perhaps one could look at the build history of kudzu RPM?

--> Rebuilt RPM
# md5sum $LOCALDIR/kudzu-devel-1.2.57.1.26-1.x86_64.rpm 10bc1e89e5fb05f269b27b364e1afab0 /usr/src/redhat/RPMS/x86_64//kudzu-devel-1.2.57.1.26-1.x86_64.rpm

--> 5.6 Distro RPM
# md5sum $DISTDIR/kudzu-devel-1.2.57.1.26-1.el5.centos.x86_64.rpm
7a956c285f308225c37dc6286a9dc6ee /export/rocks/install/rolls/CentOS/5.6/x86_64/RedHat/RPMS//kudzu-devel-1.2.57.1.26-1.el5.centos.x86_64.rpm

-- Install rpm from distro
# rpm -Uvh --force $DISTDIR/kudzu-devel-1.2.57.1.26-1.el5.centos.x86_64.rpm
Preparing... ########################################### [100%]
   1:kudzu-devel ########################################### [100%]
-- Compile, run. FAIL
# gcc -o usbtest usb1.c /usr/lib64/libkudzu.a /usr/lib64/libpci.a -l resolv -l z
# ./usbtest
looking for usb controllers ... Segmentation fault

-- Install locally rebuilt rpm from srpm.
# rpm -Uvh --force $LOCALDIR/kudzu-devel-1.2.57.1.26-1.x86_64.rpm
Preparing... ########################################### [100%]
   1:kudzu-devel ########################################### [100%]

-- Compile, run. SUCCEED
# gcc -o usbtest usb1.c /usr/lib64/libkudzu.a /usr/lib64/libpci.a -l resolv -l z
# ./usbtest
looking for usb controllers ... controller found
#

~0012659

Charlie Brady (reporter)

I can confirm the same issue with 32bit build.

Perhaps CentOS's kudzu is linked with older pcilib:

http://www.rhn.redhat.com/errata/RHBA-2011-0133.html

An updated kudzu package is available that fixes an incompatibility with the
current version of pciutils.

pciutils has been upgraded to version 3.1.7 in Red Hat Enterprise Linux 5.6.
This update changed the ABI of the static libpci library. Any application that
links against the new libpci and the older libkudzu would crash.

~0012660

Charlie Brady (reporter)

Could this explain this message from Karanbir:

http://osdir.com/ml/centos-devel/2011-04/msg00118.html

 We had quite a lot of issues getting anaconda to
 build and the final builds were actually done by hand.

~0012661

Charlie Brady (reporter)

Can we have:

kudzu-1.2.57.1.26-1.el5.centos.src.rpm

please? I'd like to know whether this is a build problem or a patch problem.

~0012662

Charlie Brady (reporter)

> I'd like to know whether this is a build problem or a patch problem.

There's also a validation problem here - how was kudzu-devel validated against upstread?

~0012700

cheath (reporter)

We now have kudzu-1.2.57.1.26-1.el5.centos.src.rpm, and I found that a local rebuild fixes it. Please can you rebuild, test, and release?

I can see how the problem was not caught by validation: because all files in kudzu and kudzu-devel are linked statically with libpci, no mismatched symbols were found.

~0012701

toracat (manager)

It looks like the same issue exists in RHEL 5.6. Therefore, this needs to be reported upstream as, being a bug-for-bug clone, CentOS cannot fix it.

~0012702

Charlie Brady (reporter)

> It looks like the same issue exists in RHEL 5.6.

Really? I don't have RHEL 5.6 binary, so I have no evidence that it exists upstream. If you do have evidence, then you should report the problem upstream.

Why do you say "It looks like the same issue exists in RHEL 5.6"? What have you seen?

~0012703

toracat (manager)

Maybe I spoke too soon :-( [thus the term "looks like"]

This is what I saw:

- compiled usbtest on CentOS 5.6. It yielded segfault on both CentOS 5.6 and RHEL 5.6.

- compiled usbtest on RHEL 5.6. It did not cause segfault.

~0012704

toracat (manager)

Last edited: 2011-05-04 21:03

To summarize the situation ...

As has already been pointed out in this bug report, the root cause of the issue is that CentOS kudzu[-devel] was not built with the current / latest version of libpci-devel in place.

According to http://www.rhn.redhat.com/errata/RHBA-2011-0133.html
( kudzu bug fix update )

"This update rebuilds kudzu to match the current libpci. (BZ#663395)"

CentOS pciutils-devel ( 3.1.7-3.el5 ) has: Build Date: Sun 20 Feb 2011 02:06:16 PM PST

CentOS kudzu-devel ( 1.2.57.1.26-1.el5.centos ) has: Build Date: Mon 31 Jan 2011 03:25:43 PM PST

It is likely that kudzu-devel was built with an earlier version of pciutils-devel, thus the mismatch issue.

~0012715

JohnnyHughes (administrator)

Please check these RPMs and make sure they work and I will sign and release them:

http://people.centos.org/hughesjr/kudzu/

~0012716

toracat (manager)

I confirm that the revised version fixes the issue.

~0012717

JohnnyHughes (administrator)

The new packages created from kudzu-1.2.57.1.26-1.el5.centos.1.src.rpm have been released, this issue has been resolved.
+Notes

-Issue History
Date Modified Username Field Change
2011-04-14 05:23 papadopoulos New Issue
2011-04-14 18:08 papadopoulos Note Added: 0012625
2011-04-20 23:19 Charlie Brady Note Added: 0012659
2011-04-20 23:30 Charlie Brady Note Added: 0012660
2011-04-20 23:33 Charlie Brady Note Added: 0012661
2011-04-20 23:43 Charlie Brady Note Added: 0012662
2011-05-03 02:45 cheath Note Added: 0012700
2011-05-03 16:27 toracat Note Added: 0012701
2011-05-03 16:44 Charlie Brady Note Added: 0012702
2011-05-03 16:59 toracat Note Added: 0012703
2011-05-04 01:02 toracat Note Added: 0012704
2011-05-04 01:10 toracat Status new => acknowledged
2011-05-04 20:47 JohnnyHughes Note Added: 0012715
2011-05-04 20:55 toracat Status acknowledged => assigned
2011-05-04 21:02 toracat Note Added: 0012716
2011-05-04 21:03 toracat Note Edited: 0012704
2011-05-04 21:21 JohnnyHughes Note Added: 0012717
2011-05-04 21:21 JohnnyHughes Status assigned => closed
2011-05-04 21:21 JohnnyHughes Resolution open => fixed
+Issue History