News for hackers. Stuff that matters.
Re:“DBus is seriously screwed up” by joelthelion on Tuesday April 28, 2015 @03:37AM (#9450900)
He's not saying DBus as a concept is bad, just that the implementation sucks. If he's right, that's something that can be fixed relatively easily (compared to a major architectural change).
Re:“DBus is seriously screwed up” by A_COMPUTER on Tuesday April 28, 2015 @04:08AM (#9450975)
He does seem to be saying that kdbus is pointless since those fixes would be in userspace where it's spending most of its time. Or am I misunderstanding?
Re:“DBus is seriously screwed up” by masklinn on Tuesday April 28, 2015 @04:14AM (#9450992)
The point of kdbus is to do dbus in kernel space. The one spending lots of time in userspace overhead (not doing actually useful work) is regular dbus.

Linus is saying that kdbus is pointless because its performance gains don't come from being in-kernel, they come from the code not being a complete shit-show, and he believes the same performance should be achievable by fixing regular userspace dbus.

Re:“DBus is seriously screwed up” by thaumaturgy on Tuesday April 28, 2015 @04:45AM (#9451062)
Well, the code review of kdbus in the rest of that thread would argue that its code is a shit-show, it just happens to be a faster shit-show than userspace dbus.
Re:“DBus is seriously screwed up” by TD-Linux on Tuesday April 28, 2015 @03:41AM (#9450913)
I agree, the OP title is a bit misleading.

I use dbus every day on my laptop and it works totally fine - I don't notice its existence. I'm all for improvements, but I'm quite patient and quite happy to wait this one out.

Re:“DBus is seriously screwed up” by dingaling on Tuesday April 28, 2015 @04:22AM (#9451007)
> I use dbus every day on my laptop and it works totally fine

My laptop appears to run fine despite dbus, if the hundreds of daily 'Failed to connect to socket' messages are any indication.

Re:“DBus is seriously screwed up” by reidrac on Tuesday April 28, 2015 @04:07AM (#9450973)
I made a silly desktop app some time ago and it used DBUS to get notifications from NetworkMonitor when the system went online/offline. Nothing too fancy, very few lines of code.

When I was implementing that, I managed to get several segfaults from my Python code. All together seemed a little bit fragile to me :(

That was 5 years ago, things are probably better now (to be fair, I don't know what was causing the crashes; NM was 0.8 back then), but when I read Linus comments I can help to think he's probably right.

This is an anecdote and all, but my point is that until I had to use it... DBUS was pretty good and was working fine :)

Re:“DBus is seriously screwed up” by morlockhq on Tuesday April 28, 2015 @10:05AM (#9452399)
I'm not a software engineer or gifted hacker.

Given that, I was able to use dbus to come up with a quick solution for a department feature in an afternoon using Pidgin's libpurple dbus bindings through purple-remote to create a presence tracker and simple announcement bot with bash.

A little digging into Pidgin's DBUS Howto gave me all the documentation that I needed. It just took a lunch hour to have something functional up and running without any real in depth programming knowledge required or needed. In an afternoon, I'd hacked up an RSS feed that showed everyone in the department's current presence as reported by their IM status and that feed could then be consumed by the required apps.

I don't know about dbus' other merits or flaws, but it did help me solve a specific problem quickly. This was a dead simple use case though.

At the time, I assumed that people more knowledgeable than me could do a hell of a lot more with it.

Re:“DBus is seriously screwed up” by CHY872 on Tuesday April 28, 2015 @05:30AM (#9451166)
Two years ago I had to use DBus to connect to a Bluetooth device from Java.

In the end, after a few minutes of good work the connection between the adapter and the peripheral would timeout (or someone would go out of range), the whole thing would stall and we'd never get another message from BlueZ, be able to connect to any device ever again. It was without doubt the worst development experience I ever had.

Worse, you couldn't reload the dbus library and start over because then Java would scream and crash. So we had to restart the JVM, and BlueZ, etc.

I'm sure I was doing something wrong, but if I can't get it to work properly in a matter of weeks then it's not just my fault.

Re:“DBus is seriously screwed up” by belorn on Tuesday April 28, 2015 @05:09AM (#9451123)
Were you using threads? Python really should not crash, but combine it with library imports implemented in c and threads, and you get really subtle race conditions which result in segfaults. I have myself been force to debug why Python segfaulted, and it was a standard library call which internally used threading, and that caused a conflict with a c library that was not threading safe.
Re:“DBus is seriously screwed up” by reidrac on Tuesday April 28, 2015 @09:50AM (#9452296)
Sorry, it wasn't Python. It was a system component that crashed as consequence of my Python code using DBUS.
Re:“DBus is seriously screwed up” by outworlder on Tuesday April 28, 2015 @09:18AM (#9452041)
> When I was implementing that, I managed to get several segfaults from my Python code

Well, it wasn't really DBus' fault then, was it?

Re:“DBus is seriously screwed up” by reidrac on Tuesday April 28, 2015 @09:38AM (#9452214)
I didn't mean to say my Python code was the one crashing with a segfault. Apologies if my comment wasn't clear enough.

I just did a search in my bugzilla account at Red Hat (Fedora distro) but I couldn't find a report for that specific crash. The closest I can find is a report on a crash of notification-daemon (could be related though, as it uses DBUS to advertise a service).

I'm surprised I didn't file a bug report, but there you are.

Re:“DBus is seriously screwed up” by anc84 on Tuesday April 28, 2015 @04:32AM (#9451037)
Maybe your laptop would be much faster if dbus was faster.
Re:“DBus is seriously screwed up” by rasz_pl on Tuesday April 28, 2015 @04:03AM (#9450961)
no, both concept and implementation is bad. This thing shovels and computes a LOT of data per call, you cant optimize that out because its what authors of kdbus intended. Its typical 'look at all that CPU we have now, lets use it' mentality that keeps Wirth's law true.