Bug 4523 - gnome-shell 3.3.5+ extension loading is broken
Summary: gnome-shell 3.3.5+ extension loading is broken
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: release_blocker critical
Target Milestone: Mageia 2
Assignee: Olav Vitters
QA Contact:
URL:
Whiteboard: NEEDHELP
Keywords: Triaged, UPSTREAM
: 4737 4878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-15 02:15 CET by Dimitri Jakov
Modified: 2012-04-04 22:48 CEST (History)
9 users (show)

See Also:
Source RPM: gnome-shell-3.3.5-1.mga2.src.rpm
CVE:
Status comment:


Attachments
Error when trying to load an extension. (60.84 KB, image/png)
2012-03-12 10:08 CET, Herbert Poetzl
Details
misplaced nautilus desktop (35.33 KB, image/png)
2012-03-24 15:21 CET, Herbert Poetzl
Details
.xsession-errors as discussed in my previous message (156.28 KB, text/plain)
2012-03-25 18:50 CEST, Bogdan Gruescu
Details

Description Dimitri Jakov 2012-02-15 02:15:42 CET
Description of problem:

In GNOME Shell 3.3.5, some part of code dealing with extension loading has been split into separate library, libgnome-shell-js.so (see GNOME bug 668429: https://bugzilla.gnome.org/show_bug.cgi?id=668429)
After upgrade to GNOME Shell 3.3.5 in Mageia, extension loading stops working. Every extension fails with "Error: Could not locate shell_js_add_extension_importer: libgnome-shell-js.so: cannot open shared object file: no such file or directory" (can bee examined with GNOME Shell's "looking glass").

The library itself gets installed to /usr/lib/gnome-shell/libgnome-shell-js.so. Symlinking /usr/lib/libgnome-shell-js.so -> /usr/lib/gnome-shell/libgnome-shell-js.so and restarting GNOME Shell fixes the problem, but I'm not sure it's the Right Way⢠- GNOME developers should be contacted for that. Moreover, the main library, libgnome-shell.so, loads OK from the /usr/lib/gnome-shell location.

Version-Release number of selected component (if applicable):

3.3.5-1.mga2

How reproducible:

always

Steps to Reproduce:
1. update gnome-shell to 3.3.5-1.mga2 (Cauldron)
2. restart GNOME Shell (Alt-F2 r <Enter>)
3. invoke "Looking Glass" (Alt-F2 lg <Enter>), switch to "Errors" tab
Comment 1 Manuel Hiebel 2012-02-15 17:32:07 CET
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

Keywords: (none) => Triaged
CC: (none) => fundawang, jani.valimaa
Assignee: bugsquad => olav

Olav Vitters 2012-03-02 23:26:35 CET

See Also: (none) => https://bugzilla.gnome.org/show_bug.cgi?id=670477
Target Milestone: --- => Mageia 2

Comment 2 Manuel Hiebel 2012-03-03 00:22:21 CET
/me will try to search more at upstream for gnome :)

Keywords: (none) => UPSTREAM

Comment 3 Olav Vitters 2012-03-11 23:39:33 CET
*** Bug 4878 has been marked as a duplicate of this bug. ***

CC: (none) => gruescubogdan

Comment 4 Olav Vitters 2012-03-11 23:40:07 CET
*** Bug 4737 has been marked as a duplicate of this bug. ***

CC: (none) => herbert

Reinout van Schouwen 2012-03-12 00:01:57 CET

CC: (none) => reinout

Comment 5 Olav Vitters 2012-03-12 00:09:07 CET
# objdump -x /usr/bin/gnome-shell | grep RPATH
  RPATH                /usr/lib64/gnome-bluetooth:/usr/lib64/gnome-shell


According to upstream, the right RPATH should make this work. Seems to be fine with gnome-shell gnome-shell-3.3.90-4.mga2.

Could someone try it out? Make sure it is actually using that version (ALT-F2, r, enter)
Comment 6 Bogdan Gruescu 2012-03-12 05:35:52 CET
Yes.

[bogdan@localhost ~]$ rpm -qa gnome-shell
gnome-shell-3.3.90-4.mga2

Then:
Alt-F2 r <Enter>
Alt-F2 lg <Enter>

No errors in "Errors" tab, just a line like this:
info t=2012-03-12T04:11:30Z loaded at Mon Mar 12 2012 06:11:30 GMT+0200 (EET)

In "Extensions" tab, the only message is "No extensions installed".

The others tabs are irrelevant.

It seems that is fixed, not sure whether the developers like the message 'No extensions installed' or some extensions ought to be available by default after a standard install.
Comment 7 Herbert Poetzl 2012-03-12 09:26:17 CET
the 'restart' above left me without window manager ... now I get:

$ gnome-shell --replace
Window manager warning: Log level 16: Failed to load shared library 'libgnome-shell-js.so' referenced by the typelib: libgnome-shell-js.so: cannot open shared object file: No such file or directory
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)

folks-WARNING **: Failed to find primary PersonaStore with type ID 'eds' and ID 'system'.
Individuals will not be linked properly and creating new links between Personas will not work.
The configured primary PersonaStore's backend may not be installed. If you are unsure, check with your distribution.
gnome-shell-calendar-server[14929]: Got HUP on stdin - exiting
Segmentation fault (core dumped)
Comment 8 Herbert Poetzl 2012-03-12 10:07:22 CET
after logout and logon, the original issue is still present (see attachment).

this is with gnome-shell-3.3.90-4.mga2.x86_64.

Status: NEW => REOPENED

Comment 9 Herbert Poetzl 2012-03-12 10:08:21 CET
Created attachment 1730 [details]
Error when trying to load an extension.
Comment 10 Olav Vitters 2012-03-12 11:27:19 CET
I cannot reproduce. For me, it says the extension was already installed (so not working, but different issue).

Status: REOPENED => NEW

Comment 11 Herbert Poetzl 2012-03-12 11:39:24 CET
just remove it from ~/.local/share/gnome-shell/extensions/ and download a new one from http://extensions.gnome.org.

note: don't forget to 'ALT-F2 r' and restart the gnome-tweak-tool :)
Comment 12 Bogdan Gruescu 2012-03-12 19:19:02 CET
Sorry about my previous message (Comment 6), I wasn't careful ...

Now I tried properly with the system-monitor extension and I got exactly the same error as in Herbert attachment from Comment 9. I tried with a different extension 'places status indicator' and the error was the same, except the extension name.
(both downloaded from http://extensions.gnome.org)

I also tried the extensions available in the repositories (packaged by Jani Valimaa) but these are at version 3.3.2. (not updated) and, as expected, do not work (error in Looking Glass: "extension is not compatible with current GNOME Shell and/or GJS version").

At command gnome-shell --replace, the message displayed is almost identical with that from Comment 7.

[bogdan@localhost ~]$ gnome-shell --replace
folks-DEBUG: individual-aggregator.vala:310: Setting primary store IDs to defaults.
folks-DEBUG: individual-aggregator.vala:343: Primary store IDs are 'eds' and 'system'.
Window manager warning: Log level 16: Failed to load shared library 'libgnome-shell-js.so' referenced by the typelib: libgnome-shell-js.so: cannot open shared object file: No such file or directory
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)
      JS LOG: GNOME Shell started at Mon Mar 12 2012 18:51:36 GMT+0200 (EET)
Window manager warning: Log level 16: STACK_OP_REMOVE: window 0x60 not in stack

Even after I've removed all the extensions and restarted the computer, I still get the warnings:

[bogdan@localhost ~]$ gnome-shell --replace
folks-DEBUG: individual-aggregator.vala:310: Setting primary store IDs to defaults.
folks-DEBUG: individual-aggregator.vala:343: Primary store IDs are 'eds' and 'system'.
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)
      JS LOG: GNOME Shell started at Mon Mar 12 2012 18:59:39 GMT+0200 (EET)
Comment 13 Olav Vitters 2012-03-12 20:00:32 CET
I got a few hints upstream on how to resolve this using 'chrpath'. It is just annoying I can only do so in the dark (extensions totally fail to install for me). Also, the "RPATH" seems to be ok.

Could someone run the following commands for me:
> chrpath -l /usr/lib64/gnome-shell/libgnome-shell.so
/usr/lib64/gnome-shell/libgnome-shell.so: RPATH=/usr/lib64/gnome-bluetooth
> chrpath -l /usr/bin/gnome-shell
/usr/bin/gnome-shell: RPATH=/usr/lib64/gnome-bluetooth:/usr/lib64/gnome-shell


Above commands give me the right RPATHS :-(
Olav Vitters 2012-03-12 20:00:44 CET

Summary: gnome-shell 3.3.5 extension loading is broken => gnome-shell 3.3.5+ extension loading is broken

Comment 14 Herbert Poetzl 2012-03-12 20:20:20 CET
(In reply to comment #13)
> I got a few hints upstream on how to resolve this using 'chrpath'. It is just
> annoying I can only do so in the dark (extensions totally fail to install for
> me). Also, the "RPATH" seems to be ok.

my system was clean installed from Mageia 2 Beta 1 (gnome3) a few days ago and is since updated to latest cauldron every time I test something, so it is basically a default install.

in what way do extensions fail to install for you?
(except for the fact that they do not show up after installing and restarting gnome-shell because of the errors described here)

> Could someone run the following commands for me:
> > chrpath -l /usr/lib64/gnome-shell/libgnome-shell.so
> /usr/lib64/gnome-shell/libgnome-shell.so: RPATH=/usr/lib64/gnome-bluetooth
> > chrpath -l /usr/bin/gnome-shell
> /usr/bin/gnome-shell: RPATH=/usr/lib64/gnome-bluetooth:/usr/lib64/gnome-shell

> Above commands give me the right RPATHS :-(

$ chrpath -l /usr/lib64/gnome-shell/libgnome-shell.so
/usr/lib64/gnome-shell/libgnome-shell.so: RPATH=/usr/lib64/gnome-bluetooth
$ chrpath -l /usr/bin/gnome-shell
/usr/bin/gnome-shell: RPATH=/usr/lib64/gnome-bluetooth:/usr/lib64/gnome-shell
Comment 15 Dimitri Jakov 2012-03-12 20:53:49 CET
Maybe libgnome-shell.so's RPATH is insufficient? Probably it should be "/usr/lib64/gnome-bluetooth:/usr/lib64/gnome-shell", just like in the gnome-shell binary itself. Unfortunately, it can't be modified with chrpath, since the length of the tag is limited by its initial value ("/usr/lib64/gnome-bluetooth"). Can someone try updating makefiles so that the library gets built with full RPATH?
Comment 16 Olav Vitters 2012-03-12 21:22:46 CET
What Fedora does:
http://pkgs.fedoraproject.org/gitweb/?p=gnome-shell.git;a=blob;f=gnome-shell.spec;hb=HEAD

related bug:
https://bugzilla.redhat.com/show_bug.cgi?id=716572

Seems it was only needed for 3.1. So not much help.
Comment 17 Herbert Poetzl 2012-03-12 22:17:43 CET
just for information, it 'broke' somewhere around 3.3.4/3.3.5 -> 3.3.90 i.e. I was using extensions after 3.3.2 quite fine with the gnome3 shell packaged back then and it 'suddenly' stopped working without the additional LD_LIBRARY_PATH=/usr/lib64/gnome-shell ...
Olav Vitters 2012-03-14 21:54:09 CET

Whiteboard: (none) => NEEDHELP

Comment 18 Manuel Hiebel 2012-03-15 15:41:33 CET
setting to release_blocker (for the stable release) so it's not forget

Priority: Normal => release_blocker

Comment 19 Olav Vitters 2012-03-22 09:59:07 CET
Upstream still thinks it is a distribution problem. Fedora is not effected.

Could someone try again with the latest gnome-shell (3.3.92)?

Note: Loads of extensions probably still have to be marked compatible!
Comment 20 Dimitri Jakov 2012-03-22 11:45:17 CET
Still broken in 3.3.92. I'm almost sure it's the matter of (in)correct RPATH for /usr/lib/gnome-shell/libgnome-shell.so. I've asked Fedora guys to share their RPATH (see upstream bug discussion), so let's see.
Comment 21 Herbert Poetzl 2012-03-23 20:54:34 CET
I can confirm, still broken here as well ...
Comment 22 Herbert Poetzl 2012-03-24 15:21:05 CET
Created attachment 1835 [details]
misplaced nautilus desktop

since the latest cauldron update, the 'workaround' (specifying LD_LIBRARY_PATH and restarting gnome shell) has a strange side effect on the nautilus desktop.
the attached screenshot is from the second head, there is no desktop on the primary head (1680x1050).
Comment 23 Olav Vitters 2012-03-24 19:45:29 CET
fwang made a change in 3.3.92-2 to disable something which might have had an effect on this. Assume it doesn't help, still, testing is appreciated.

Noticed on the upstream bug that opensuse is also affected.
Comment 24 Marja Van Waes 2012-03-25 07:24:50 CEST
(In reply to comment #23)
> fwang made a change in 3.3.92-2 to disable something which might have had an
> effect on this. Assume it doesn't help, still, testing is appreciated.
> 
> Noticed on the upstream bug that opensuse is also affected.

cc'ing two more committers of this package, because of the NEEDHELP on the whiteboard

Besides, this bug is a release blocker

CC: (none) => dmorganec, mageia, marja11
Severity: normal => critical

Comment 25 Marja Van Waes 2012-03-25 07:39:10 CEST
(In reply to comment #23)
> fwang made a change in 3.3.92-2 to disable something which might have had an
> effect on this. Assume it doesn't help, still, testing is appreciated.
> 


@ Dimitri, Herbert and Bogdan (and anybody else affected)

Please report whether that helped
Comment 26 Bogdan Gruescu 2012-03-25 18:47:21 CEST
I've done the first update since about 48 hours and now I cannot log into GNOME any more (The message 'Oh no! Something has gone wrong.' appears and the only option is to log out). Sorry for mix up issues, normally I should open a new bug for it.
I booted in safe mode, log in as root and tried to obtain the file .xsession-errors and attach it here (if that helps).
Comment 27 Bogdan Gruescu 2012-03-25 18:50:52 CEST
Created attachment 1845 [details]
.xsession-errors as discussed in my previous message
Colin Guthrie 2012-03-25 19:11:19 CEST

Attachment 1845 mime type: application/octet-stream => text/plain

Comment 28 Colin Guthrie 2012-03-25 19:12:48 CEST
Can you try with a fresh user account?
Comment 29 Bogdan Gruescu 2012-03-25 19:44:48 CEST
Luckily I can log into iceWM and use mcc from there to create a new user, but the new user doesn't log into GNOME either. I've just noticed that (no matter with which user) if I press Alt+F1 from the window with the message 'Oh no! Something ...' (that is, after the log in failed) I can see the GNOME desktop, however, the attempt is of no real use.
Comment 30 Olav Vitters 2012-03-25 23:27:51 CEST
That was 'just' a bug in libgnomekbd. I reverted the commit causing this. Please try again with libgnomekbd-3.4.0-2.mga2.
Comment 31 Bogdan Gruescu 2012-03-26 19:21:16 CEST
GNOME log in issue is now fixed; gnome-shell extensions still doesn't work.
Comment 32 Herbert Poetzl 2012-03-27 00:57:15 CEST
nothing new here either, i.e. gnome-shell extensions do not work, same error on the gnome-shell console.

workaround with LD_LIBRARY_PATH makes the shell extensions work immediately but now seems to confuse nautilus which places the desktop at a significant offset.
Comment 33 Scott Fulford 2012-03-28 03:52:51 CEST
Just wanted to say 'same here', extensions no go.  M2B2 x64

CC: (none) => nextwavecs

Comment 34 Dimitri Jakov 2012-04-04 22:48:10 CEST
Another "was-so-pissed-off-that-decided-to-fix-it-myself" situation :)

By default, in Mageia everything is built with "--enable-new-dtags" linker flag. This means that both the old DT_RPATH and the new DT_RUNPATH will be added to the executable. But DT_RUNPATH 1) is not transitive, i.e. it is not being traced up to the executable itself, 2) hides DT_RPATH. That's why GNOME Shell can't load a GModule (libgnome-shell-js.so) from a non-standard location (/usr/lib*/gnome-shell). Fortunately, we have a RPM variable to disable that nasty linker flag.

See also glibc bug #13945.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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