1 |
On Tue, Aug 23, 2011 at 3:47 PM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
2 |
> On Tue, Aug 23, 2011 at 3:08 PM, Michael Mol <mikemol@×××××.com> wrote: |
3 |
>> Because I generally update my desktop system while running X, and on |
4 |
>> at least two occasions, an update killed my X session by restarting |
5 |
>> DBUS on me |
6 |
> |
7 |
> The update don't restart D-Bus: from the dbus-1.4.14 ebuild: |
8 |
> |
9 |
> elog "To start the D-Bus system-wide messagebus by default" |
10 |
> elog "you should add it to the default runlevel :" |
11 |
> elog "\`rc-update add dbus default\`" |
12 |
> elog |
13 |
> elog "Some applications require a session bus in addition to the system" |
14 |
> elog "bus. Please see \`man dbus-launch\` for more information." |
15 |
> elog |
16 |
> ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run" |
17 |
> ewarn "the new version of the daemon." |
18 |
> ewarn "Don't do this while X is running because it will restart your X as well." |
19 |
> |
20 |
> Emphasising: "Don't do this while X is running because it will restart |
21 |
> your X as well." So I will assume something went terribly wrong when |
22 |
> updating, and again, if that's the case then it's a bug and should be |
23 |
> reported. |
24 |
|
25 |
I see. Apologies for the snark, but this feels like it leads to a |
26 |
"Setup requires that you restart your computer to continue" situation. |
27 |
|
28 |
(This becomes less and less of an exaggeration as more and more system |
29 |
components choose to route their traffic through D-Bus) |
30 |
|
31 |
> |
32 |
>> On the other hand, sshd handles restarts without killing active sessions. |
33 |
> |
34 |
> Because the daemon state for sshd is tiny compared with the one from |
35 |
> D-Bus. Apples and oranges. |
36 |
|
37 |
That doesn't really enter into it. To me, that means you would want to |
38 |
use something like shared memory (is there any multi-tasking operating |
39 |
system with protected memory which can't mmap?) and rigorous checks |
40 |
and controls for managing that state. Even sqlite can manage that. |
41 |
(Not that I'm suggesting you would use sqlite for tracking D-Bus |
42 |
state, just that you'd look at what they do with locks and integrity |
43 |
checks for guaranteeing integrity on shared memory with multiple |
44 |
consuming processes.) |
45 |
|
46 |
And, yes, upgrades on live data can be a royal PITA. Designing a |
47 |
system which can handle it requires careful attention and testing. The |
48 |
more anal you want to be about it, the more you start talking about |
49 |
writing provable and verifiable code and other stringent debugging, |
50 |
development and testing practices. |
51 |
|
52 |
Yet it's done. Last Friday, I sat at a table with someone who |
53 |
witnessed an IBM tech replace a CPU in a mainframe. Flip a switch, |
54 |
pull out the old part, insert the new part, flip the switch back on, |
55 |
everything's fine. Saturday, I listened to a guy present on how he |
56 |
dynamically reroutes live calls through a VOIP network based on |
57 |
hardware faults. |
58 |
|
59 |
> |
60 |
>> These are solvable problems which DBUS hasn't solved yet for itself. |
61 |
>> High-availability is one of the best-researched fields in computer |
62 |
>> science, but DBUS doesn't handle that case, yet. |
63 |
> |
64 |
> Because it's not as easy as with systemd (which can also reexecute |
65 |
> preserving state) or ssh. |
66 |
|
67 |
D-Bus wants to be a core system service, and *that's* what should be |
68 |
setting its design goals, not how difficult it would be for the system |
69 |
to be worthy of the core. |
70 |
|
71 |
Again, I really don't believe D-Bus is badly-written. I just think its |
72 |
community isn't fully aware of the trends of its position in the |
73 |
system, and what responsibilities it carries. |
74 |
|
75 |
-- |
76 |
:wq |