Bug 630931 - kpackagekit: malformed D-Bus introspection data
kpackagekit: malformed D-Bus introspection data
Product: Fedora
Classification: Fedora
Component: kpackagekit (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Steven M. Parrish
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-09-07 08:19 EDT by Alexander Kurtakov
Modified: 2011-09-01 03:15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-09-01 03:15:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: backtrace (18.84 KB, text/plain)
2010-09-07 08:19 EDT, Alexander Kurtakov
no flags Details
Introspection file from gnome-packagekit (3.38 KB, application/octet-stream)
2010-09-13 08:03 EDT, Jirka Klimes
no flags Details
Introspection file from kpackagekit (17.24 KB, text/plain)
2010-09-13 08:04 EDT, Jirka Klimes
no flags Details

  None (edit)
Description Alexander Kurtakov 2010-09-07 08:19:04 EDT
abrt version: 1.1.13
architecture: i686
Attached file: backtrace
cmdline: /usr/bin/python /usr/bin/d-feet
component: d-feet
executable: /usr/bin/d-feet
package: d-feet-0.1.12-1.fc13
reason: _introspect_parser.py:150:process_introspection_data:IntrospectionParserException: Error parsing introspect data: <class 'xml.parsers.expat.ExpatError'>: unbound prefix: line 5, column 4
release: Fedora release 13 (Goddard)
time: 1283861679
uid: 500

How to reproduce
1. Start d-feet
2. Filter org.freedesktop.PackageKit in the session bus
3. Notice that /org/freedesktop/PackageKit object is missing because it is failing to parse
Comment 1 Alexander Kurtakov 2010-09-07 08:19:09 EDT
Created an attachment (id=443495)
File: backtrace
Comment 2 John (J5) Palmieri 2010-09-07 15:10:44 EDT
Sounds like a PackageKit error.  I don't have any PackageKit service, only PackageKit.Application and PackageKit.UpdateIcon in my session.  On my system bus I do get a PackageKit service.  No error occur in parsing the introspect data.
Comment 3 Jirka Klimes 2010-09-10 05:57:12 EDT
Package: d-feet-0.1.12-1.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)

Doesn't have exact steps. Just clicking on bus names on Session Bus.
Comment 4 Alexander Kurtakov 2010-09-10 06:01:30 EDT
This seems to happen to me only under kde with kpackagekit.
Comment 5 Jirka Klimes 2010-09-13 08:01:47 EDT
I can confirm that it has something to do with kpackagekit.
It seems to be a bug in kpackagekitsmarticon that provides 'org.freedesktop.PackageKit' service.
However, it returns bad introspection file that expat fails to parse (doc namespace) - probably missing namespace definition:
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">

gnome-packagekit provides clean introspection, though.

See introspection files generated by:
qdbus --session org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect

both for gnome-packagekit (gpk-dbus-service) and kpackagekit (kpackagekitsmarticon).
Comment 6 Jirka Klimes 2010-09-13 08:03:16 EDT
Created attachment 446902 [details]
Introspection file from gnome-packagekit
Comment 7 Jirka Klimes 2010-09-13 08:04:28 EDT
Created attachment 446903 [details]
Introspection file from kpackagekit
Comment 8 John (J5) Palmieri 2010-09-13 14:31:53 EDT
Seems like a namespace issue.  This should be filed upstream with kpackagekit unless it crashes D-Feet.  Does it it cause D-Feet to stop working or does D-Feet just continue without showing introspection data for kpackagekit?
Comment 9 Jirka Klimes 2010-09-20 04:35:23 EDT
D-Feet continues to work normally. The only issue is that abrt catches the error (from comment #1) and indicates a crash and kpackagekit data are not available, of course.

I checked kpackagekit upstream and the namespace definition is there:
I hope it will get to Fedora soon.
Comment 10 John (J5) Palmieri 2010-09-20 10:48:20 EDT
Reassigning to kpackagekit.  Fix is upstream.  Please patch or upgrade kpackagekit in Fedora 13
Comment 11 Kevin Kofler 2010-09-20 11:08:29 EDT
That commit is 9 months old and already in the 0.6.0 release we're shipping in F13, so it cannot be the fix. (And by the way, 0.6.1 is already queued for testing.)
Comment 12 Kevin Kofler 2010-09-20 11:09:22 EDT
(It's already in testing and sitting there for a week, actually. But there's nothing that changed with respect to that XML file between 0.6.0 and 0.6.1.)
Comment 13 Jirka Klimes 2010-09-21 09:08:46 EDT
I've tested kpackagekit-0.6.1-1.fc13.x86_64. There is no change against kpackagekit-0.6.0-2.fc13.x86_64 in respect to the introspection.

qdbus org.freedesktop.PackageKit /org/freedesktop/PackageKit Introspect
produces the same output as in comment #7.
Note there is <node> tag without arguments (name and xmlns:doc namespace)

It is probably a bug in qdbusxml2cpp (or some other component), because qdbusxml2cpp generates adaptor class that *doesn't* have any <node> tag in introspection data. Then an empty <node> is included when introspection is required.
Comment 14 Alexander Kurtakov 2010-12-08 09:40:34 EST
Problem is still here on F-14.
Comment 15 Håkon Løvdal 2011-05-22 00:49:16 EDT
This is still the case with kpackagekit- The following was what I had drafted and intended to put up as a  new bug,  but then I found that it already were reported here:

Trying to add an network ipp printer with system-config-printer fails.

Server -> New -> Printer, fill inn hostname and path. Pressing the Verify button results in "This print share is accessible."

So far everything is working ok. But when pressing Forward, KPackageKit starts searching for a driver but fails shortly after with "Could not find printer driver in any configured software source" and on standard output the following is printed:

ERROR:dbus.proxies:Introspect error on :1.31:/org/freedesktop/PackageKit: dbus.exceptions.IntrospectionParserException: Error parsing introspect data: <class 'xml.parsers.expat.ExpatError'>: unbound prefix: line 5, column 4

Debugging with strace and capturing all strings I can assemble the whole XML content (attached as dbus-communication.xml.orig), the first 10 lines are

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
  <interface name="org.freedesktop.PackageKit.Modify">
          The interface used for modifying the package database.

Running xmllint on this file, it complains about all the "doc:" prefixes.

dbus-communication.xml.orig:5: namespace error : Namespace prefix doc on doc is not defined

And while searching around I find that it seems that the name space should have been present, like

+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">

and with this change xmllint is happy.

I tried to find out where and how to add but I am now giving up trying to fix it myself and instead report it.
Comment 16 Alexander Kurtakov 2011-09-01 03:15:24 EDT
Works fine with kpackagekit-

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