Bug 79887 - kdbus: overly aggressive clients cause kernel panic
Summary: kdbus: overly aggressive clients cause kernel panic
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-10 14:20 UTC by Hristo Venev
Modified: 2014-08-19 09:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Hristo Venev 2014-06-10 14:20:49 UTC
Consider the following client:
- Connect to the user and the system bus
- Queue up '/' of all peers
- For every element of the queue, introspect it and push its children on the queue.

I developed this program as a test for my sd-bus and sd-event python wrapper.
https://github.com/pybus/pybus

$ python3 ./setup.py build
$ a=build/lib.*
$ PYTHONPATH=${a}:. python3 test/introspect.py 'I am sure'
Comment 1 Kay Sievers 2014-06-20 13:14:12 UTC
$ a=build/lib.*
$ PYTHONPATH=${a}:. strace -f -o x python3 test/introspect.py 'I am sure'
Traceback (most recent call last):
  File "test/introspect.py", line 1, in <module>
    from test import *
  File "/home/kay/data/src/pybus/test/__init__.py", line 1, in <module>
    import pybus
  File "/home/kay/data/src/pybus/pybus/__init__.py", line 506, in <module>
    from pybus.systemd import Bus
  File "/home/kay/data/src/pybus/pybus/systemd.py", line 194, in <module>
    class Bus(event.Event):
AttributeError: 'module' object has no attribute 'Event'

$ a=build/lib.linux-x86_64-3.4/
$ PYTHONPATH=${a}:. strace -f -o x python3 test/introspect.py 'I am sure'
Traceback (most recent call last):
  File "test/introspect.py", line 28, in _
    with e_loop.new(pybus.Bus, pybus.Bus.System).adopt() as sysBus, \
AttributeError: type object 'Bus' has no attribute 'System'
Comment 2 Hristo Venev 2014-06-20 20:33:58 UTC
Sorry about that. Commit 82f699a676f59001dafe0eb808fe46c0955fde79 should work.

test/stress.py causes systemd --user to stop responding to dbus (at least for me)
Comment 3 Daniel Mack 2014-08-19 07:22:09 UTC
Sorry for the late response on this. Your test program needs gcc 4.9 to build, and I had to switch over for rawhide for this first.

However, I cannot reproduce the bug. I've ran your test suite excessively, in a loop, with other stress tests in parallel, but I don't see any issue.

Possibly, some recent changes to domain accounting fixed the crashes you saw. Could you test this again with the current kdbus git head please?
Comment 4 Hristo Venev 2014-08-19 09:09:00 UTC
It works for me too. Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.