Bug 845287

Summary: [MAINT] launching new applications lasts extremely long (beta1)
Product: [openSUSE] openSUSE 13.1 Reporter: Elmar Stellnberger <estellnb>
Component: BasesystemAssignee: Dominique Leuenberger <dimstar>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: dimstar, forgotten_DV81ZEWZkN, forgotten_ETh-frTLtx, forgotten_sM9JzehKpy, novell
Version: RC 1   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 13.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/messages
console messages when manually launching plasma-desktop
Xorg.0.log

Description Elmar Stellnberger 2013-10-10 12:37:44 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0

If I start KDE4 it lasts extremely long until the plasma desktop panel appears (5 minutes?); likewise it also lasts extremely long to start dolphin; even starting kde3-konqueror from an xchroot-environment lasts longer than expected.
Possibly a dbus or even more likely a kernel issue (see also: bug 845284).

Reproducible: Always
Comment 1 Elmar Stellnberger 2013-10-10 12:38:22 UTC
Created attachment 562856 [details]
/var/log/messages
Comment 2 Elmar Stellnberger 2013-10-10 12:39:02 UTC
Created attachment 562857 [details]
console messages when manually launching plasma-desktop
Comment 3 Elmar Stellnberger 2013-10-10 12:39:27 UTC
Created attachment 562858 [details]
Xorg.0.log
Comment 4 Forgotten User DV81ZEWZkN 2013-10-10 12:46:07 UTC
Dup of 843166.

Issue should be resolved for you, if you upgrade

*** This bug has been marked as a duplicate of bug 843166 ***
Comment 5 Elmar Stellnberger 2013-11-14 10:39:35 UTC
There was just a bunch of issues with one simple reason (Bug 848863, Bug 843166): All these daemons did not know where the DBUS socket /run/dbus/system_bus_socket was because the DBUS_SYSTEM_BUS_ADDRESS environment variable was not set. Consequently the whole desktop environment was unusable.
Comment 6 Elmar Stellnberger 2013-11-14 10:40:54 UTC
*** Bug 848863 has been marked as a duplicate of this bug. ***
Comment 7 Elmar Stellnberger 2013-11-14 10:41:47 UTC
*** Bug 843166 has been marked as a duplicate of this bug. ***
Comment 8 Elmar Stellnberger 2013-11-14 10:45:54 UTC
The problem can be resolved like the following:
* update to the next stable version of dbus-1.7.8 (maybe not required but definitely recommended by upstream maintainers)
* Add the following line to /usr/lib/systemd/system/{polkit.service,udisks2.service,upower.service}
 "Environment=DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket"
Comment 9 Elmar Stellnberger 2013-11-14 10:51:52 UTC
Dear maintainers of openSUSE,
Should I check in the changes into obs as proposed or would you prefer to set the DBUS_SYSTEM_BUS_ADDRESS environment variable in another place?
Please consider that openSUSE 13.1 will not be usable/operable without these changes and note that the final release is already pending!
Comment 10 Elmar Stellnberger 2013-11-14 11:26:05 UTC
Perhaps the better way to fix this would be to add DefaultEnvironment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket" in /etc/systemd/system.conf. As far as I have tested it, that works. What do you believe?
Comment 11 Forgotten User DV81ZEWZkN 2013-11-14 12:07:44 UTC
Please paste
rpm -q --changelog dbus-1 | head
rpm -q --changelog systemd | head
Comment 12 Elmar Stellnberger 2013-11-14 13:07:44 UTC
Note that updating libdbus-1 was part of the resolution of the issue (didn`t add to the changelog though, yet).  If you wish I can search for the version it did not work with in /var/log/zypp/history:

> rpm -q --changelog dbus-1 | head
* Mo Okt 07 2013 fridrich.strba@suse.com
- Create /var/lib/dbus/machine-id only if there is no /etc/machine-id
  present on the system. Dbus knows how to use the system-wide
  machine-id file and this solves problems where the two files have
  different values (bnc#831626)

* Fr Okt 04 2013 hrvoje.senjan@gmail.com
- Check for existence of /var/lib/old_run_path: if found, only then
  is dbus ListenStream swapped for old run path. This is done for
  supporting 12.3 to 13.1 upgrade (bnc#802525)
 
> rpm -q --changelog systemd | head
* Mo Okt 21 2013 werner@suse.de
- Add patch
  1009-make-xsltproc-use-correct-ROFF-links.patch
  to have valid ROFF links in manual pages working again (bnc#842844)

* Di Okt 15 2013 fcrozat@suse.com
- Add
  0001-gpt-auto-generator-exit-immediately-if-in-container.patch:
  don't start gpt auto-generator in container (git).
- Add

> rpm -q libdbus-1-3
libdbus-1-3-1.7.8-1.i586

Well, to get a clean system I should update dbus-1 as well.
Comment 13 Elmar Stellnberger 2013-11-15 09:32:14 UTC
Thanks a lot to Chengwei Yang who has helped me to analyse the problem - https://bugs.freedesktop.org/show_bug.cgi?id=71567: He proposes us to compile the path right into dbus:

$ ./autogen.sh --with-systemdsystemunit=/usr/lib/systemd/system --with-system-socket=/var/run/dbus/system_bus_socket
$ make
$ sudo make install
Comment 14 Forgotten User sM9JzehKpy 2013-11-15 09:57:44 UTC
Elmar, 

Can you tell me more about your installation and if this is a fresh installation or that you upgraded an older system ? 

The openSUSE DBUS package has those variables defined to the right paths as that they should be on an openSUSE 13.1 installation. 

The correct directory to use is /run/dbus and if you look correctly then /var/run is a symbolic link to the /run directory.
Comment 15 Elmar Stellnberger 2013-11-15 10:00:47 UTC
No, /var/run is not a symbolic link to /run at me. Yes, it is a fresh new installation of openSUSE 13.1. However I guess it should not search for the socket in two different directories.
Comment 16 Elmar Stellnberger 2013-11-15 10:04:40 UTC
Rebuilding the original openSUSE package with newer sources I have discovered the following settings (no patches skipped):
> strings ./BUILD/dbus-1.7.8/dbus/.libs/libdbus-1.so.3 | grep system_bus_socket
unix:path=/run/dbus/system_bus_socket
unix:path=/var/run/dbus/system_bus_socket

So in some place there appears a wrong path with /var to be in-compiled.
Comment 17 Forgotten User sM9JzehKpy 2013-11-15 10:19:49 UTC
Elmar,

but do /var/run and /run provide the same files ?  I checked with some other
people and it seems that both paths are mounting the same "filesystem". So
there shouldn't be any differences for these two locations. 

Also /var/run is being depreciated and /run is the right path, however I
understood that the migration from one to the other is not that easy, therefore
the indicate solution to have the same filesystem for both paths. 

Reassigning this bug report to the proper area, as that this is no longer KDE4
Applications related, but DBus/Basesystem related.
Comment 18 Elmar Stellnberger 2013-11-15 10:22:34 UTC
No they have a completely different content:
> ls /run
dbus  initramfs  lock  log  lvm  mount  plymouth  systemd  tmpfiles.d  udev  udisks2  user  avahi-autoipd.enp1s0.pid  utmp
> ls /var/run/
avahi-daemon  nscd     pcscd     rsyslog  smpppd         svnserve  vpnc    displaymanager.pid  kdm.pid  pm-suspend
cups          openvpn  pm-utils  screens  SuSEfirewall2  uscreens  xdmctl  gpm.pid             ntp      rsyslogd.pid

Perhaps because I am using btrfs and /var/run has its own subroot.
Comment 19 Elmar Stellnberger 2013-11-15 10:23:18 UTC
Nonetheless I would argue that looking for the same socket in two different directories should be considered an error.
Comment 20 Forgotten User DV81ZEWZkN 2013-11-15 10:43:14 UTC
Elmar, as you found already, the configure part is executed correctly, however, you are seeing "two places", due to dbus-fall-back-to-old-run-directory.patch for easing migration from /var/run to /run (so, from e.g. oS 12.3 to newer ones), as reported in bug 802525. 
You could try building dbus-1 package without it, to see the effect. Please also note that so far we saw no other reporter with this specific issue.
Comment 21 Elmar Stellnberger 2013-11-15 15:26:02 UTC
In deed without that patch /var/run does not show up by strings. However removing the patch does not help us with all the daemons not finding the socket in /run/dbus/.
Comment 22 Elmar Stellnberger 2013-11-15 16:38:58 UTC
*** Bug 845628 has been marked as a duplicate of this bug. ***
Comment 23 Elmar Stellnberger 2013-11-15 20:18:47 UTC
Now I should have trapped the final issue:

> ldd /usr/lib/polkit-1/polkitd | awk '{ if($2=="=>") print $3;}' | while read file; do if grep -q system_bus_socket <$file; then echo $file; strings $file| grep system_bus_socket; fi; done

/usr/lib/libgio-2.0.so.0
unix:path=/var/run/dbus/system_bus_socket

 The offensive library with the wrong default value is libgio. It is used by udisks, upower, polkit and udisksctl. No other shared library in /usr/lib has such a string (except libdbus itself which has already the correct default value).

 Anyone up to get a fix ready for the release of 13.1 or should I try to fix on my own later?
Comment 24 Forgotten User DV81ZEWZkN 2013-11-15 20:22:15 UTC
@Dominique, can you take a look at comment 23?
Comment 25 Forgotten User DV81ZEWZkN 2013-11-15 21:01:14 UTC
From gdbusaddress.c

    {
    case G_BUS_TYPE_SYSTEM:
      ret = g_strdup (g_getenv ("DBUS_SYSTEM_BUS_ADDRESS"));
      if (ret == NULL)
        {
          ret = g_strdup ("unix:path=/var/run/dbus/system_bus_socket");
        }
      break;

So indeed without enviroment var, gio thinks the address is at /var/run.
Comment 26 Forgotten User DV81ZEWZkN 2013-11-15 21:05:18 UTC
@Elmar,
please test with packages from
http://download.opensuse.org/repositories/home:/sumski:/bnc845287/openSUSE_13.1/
Tnx.
Comment 27 Elmar Stellnberger 2013-11-16 09:25:59 UTC
Nice! that works perfectly; even for command line tools like udisksctl not being launched by systemd. Thx a lot for the quick response! Now just let us try to get the fix into the final release.
Comment 28 Elmar Stellnberger 2013-11-16 09:27:44 UTC
I would consider it an important fix; other users could be affected.
Comment 29 Bernhard Wiedemann 2013-11-16 12:00:12 UTC
This is an autogenerated message for OBS integration:
This bug (845287) was mentioned in
https://build.opensuse.org/request/show/207115 13.1 / glib2
Comment 30 Bernhard Wiedemann 2013-11-16 12:00:46 UTC
This is an autogenerated message for OBS integration:
This bug (845287) was mentioned in
https://build.opensuse.org/request/show/207113 Maintenance /
Comment 31 Dominique Leuenberger 2013-11-17 18:38:07 UTC
FYI: I have a full GNOME Stack update pending next to that one as well.. we have to make sure to not lose the fix there.
Comment 32 Elmar Stellnberger 2013-11-18 10:58:48 UTC
latest updates from today including libgio-2_0-0-2.38.1-9.1.i586 seem good.
Comment 33 Dominique Leuenberger 2013-11-18 11:50:42 UTC
(In reply to comment #32)
> latest updates from today including libgio-2_0-0-2.38.1-9.1.i586 seem good.

Where did you get this from? there is no update prepared for this package yet.
Comment 34 Dominique Leuenberger 2013-11-18 11:53:35 UTC
(In reply to comment #33)
> (In reply to comment #32)
> > latest updates from today including libgio-2_0-0-2.38.1-9.1.i586 seem good.
> 
> Where did you get this from? there is no update prepared for this package yet.

Very likely this still comes from
http://download.opensuse.org/repositories/home:/sumski:/bnc845287/openSUSE_13.1/
, so the test repo provided.

Can you confirm this?
  rpm -qi liubgio-2_0-0
should be able to tell
Comment 35 Elmar Stellnberger 2013-11-18 13:32:44 UTC
Yes; in deed it came from home:/sumski (I should have looked more precise):
> rpm -qi libgio-2_0-0
Vendor      : obs://build.opensuse.org/home:sumski
Comment 36 Jan RĂ¼diger 2013-12-07 03:24:45 UTC
Bug happens to me also while updating from 12.3 13.1 using zypper dub. How come that a bug, with severity major(!) is know so long but still in final release?
Anyway, the libgio from above solves the problem!
Comment 37 Swamp Workflow Management 2013-12-11 16:04:33 UTC
openSUSE-RU-2013:1856-1: An update that has 10 recommended fixes can now be installed.

Category: recommended (low)
Bug References: 845287,845579,849913,849914,850083,850137,851160,851652,852490,852527
CVE References: 
Sources used:
openSUSE 13.1 (src):    NetworkManager-gnome-0.9.8.4-20.3, accountsservice-0.6.34-2.4.1, aisleriot-3.10.1-17.9, anjuta-3.10.2-14.9, at-spi2-atk-2.10.2-12.1, at-spi2-core-2.10.2-12.1, bijiben-3.10.2-12.4, cheese-3.10.2-12.17, clutter-1.16.0-3.2, clutter-gst-2.0.8-3.1, dconf-0.18.0-12.2, devhelp-3.10.2-12.2, dirac-1.0.2-27.4.1, empathy-3.10.2-12.4, eog-3.10.2-12.2, epiphany-3.10.1-11.3, evince-3.10.0-18.3, evolution-3.10.2-9.1, evolution-data-server-3.10.2-10.14, evolution-ews-3.10.2-10.1, file-roller-3.10.2-8.4, five-or-more-3.10.2-8.3, folks-0.9.6-2.8.1, gdk-pixbuf-2.30.1-8.1, gdm-3.10.0.1-5.1, gedit-3.10.2-9.4, glib-networking-2.38.2-8.1, glib2-2.38.2-8.2, glib2-branding-openSUSE-13.1-2.13.1, glibmm2-2.38.0-6.1, gnome-boxes-3.10.2-4.1, gnome-calculator-3.10.2-4.2, gnome-chess-3.10.2-4.2, gnome-control-center-3.10.2-4.4, gnome-desktop-3.10.2-5.1, gnome-devel-docs-3.10.2-4.1, gnome-documents-3.10.1-5.1, gnome-mahjongg-3.10.2-4.2, gnome-maps-3.10.2-4.1, gnome-online-accounts-3.10.2-4.8, gnome-photos-3.10.2-4.1, gnome-settings-daemon-3.10.2-5.3, gnome-shell-3.10.2.1-7.3, gnome-sudoku-3.10.2-4.1, gnome-system-monitor-3.10.2-4.2, gnome-terminal-3.10.2-6.1, gnome-tweak-tool-3.10.1-5.1, gnome-user-docs-3.10.2-4.1, gnome-user-share-3.10.1-4.2, gssdp-0.14.6-2.4.4, gstreamer-plugins-bad-1.0.10-2.5.4, gtk3-3.10.4-4.2, gtk3-branding-SLED-13.1-2.4.2, gtk3-branding-openSUSE-13.1-2.4.2, gucharmap-3.10.1-4.1, gupnp-0.20.8-4.1, gupnp-tools-0.8.8-2.4.1, gvfs-1.18.3-5.1, libsoup-2.44.2-4.1, mutter-3.10.2-8.1, orca-3.10.2-4.5, pango-1.36.1-4.2, python-gobject-3.10.2-4.1, python3-gobject-3.10.2-4.1, quadrapassel-3.10.2-4.1, rygel-0.20.2-4.1, tali-3.10.2-4.1, tracker-0.16.3-2.5.3, tracker-extras-0.16.3-2.5.1, vala-0.22.1-4.1, vinagre-3.10.2-4.1, webkitgtk-2.2.2-4.3, webkitgtk3-2.2.2-4.3
Comment 38 Dominique Leuenberger 2013-12-23 10:49:30 UTC
Update releases - closing