diff mbox series

[bug#58569] gnu packages gnome-console: Remove nautilus extension

Message ID 87sfjnad0i.fsf@disroot.org
State New
Headers show
Series [bug#58569] gnu packages gnome-console: Remove nautilus extension | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

ashish.is--- via Guix-patches" via Oct. 16, 2022, 5:34 p.m. UTC
Hi,

this patch removes the gnome-console nautilus extension as it crashes nautilus
(at least on my machine). In my opinion it is safe to remove it, as this
feature is implemented directly into nautilus-43 and the original code is
purged from the gnome-console repo. (see
https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/911 and
https://gitlab.gnome.org/GNOME/console/-/commit/c4bd2312f4b432a33810a8dcdf3cadabae5169d7)

This sadly means, that in nautilus-42 there will be no "Open in Console", but
the issue is on some code that is already deprecated in the Console repo. (I
have studied gdb info and it appears that kgx_nautilus_get_background_items()
returns a GList* that is { .next = NULL, .prev = NULL, .data = NULL } but
nautilus does only perform a check that GList* is NULL, otherwise it expects a
valid list)

I can maybe supply a patch to gnome-console, but I don't see a reason to.

Kind regards,

Maya

Comments

Liliana Marie Prikler Oct. 17, 2022, 8:18 a.m. UTC | #1
Am Sonntag, dem 16.10.2022 um 19:34 +0200 schrieb Mája Tomášek:
> 
> Hi,
> 
> this patch removes the gnome-console nautilus extension as it crashes
> nautilus (at least on my machine).
I can confirm it working as intended on at least two separate machines,
both configured 

> In my opinion it is safe to remove it, as this
> feature is implemented directly into nautilus-43 and the original
> code is purged from the gnome-console repo. (see
> https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/911 and
> https://gitlab.gnome.org/GNOME/console/-/commit/c4bd2312f4b432a33810a8dcdf3cadabae5169d7
> )
> 
> This sadly means, that in nautilus-42 there will be no "Open in
> Console", but the issue is on some code that is already deprecated in
> the Console repo. (I have studied gdb info and it appears that
> kgx_nautilus_get_background_items() returns a GList* that is { .next
> = NULL, .prev = NULL, .data = NULL } but nautilus does only perform a
> check that GList* is NULL, otherwise it expects a valid list)
> 
> I can maybe supply a patch to gnome-console, but I don't see a reason
> to.
In my opinion, it'd be better to find out why it crashes in the first
place.  See [1] for the breaking code.  My suspicion is that item ends
up NULL, which would be big if true.

Cheers

[1]
https://gitlab.gnome.org/GNOME/console/-/blob/42.2/nautilus/kgx-nautilus.c#L48
ashish.is--- via Guix-patches" via Oct. 17, 2022, 4:20 p.m. UTC | #2
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

> Am Sonntag, dem 16.10.2022 um 19:34 +0200 schrieb Mája Tomášek:
>> 
>> Hi,
>> 
>> this patch removes the gnome-console nautilus extension as it crashes
>> nautilus (at least on my machine).
> I can confirm it working as intended on at least two separate machines,
> both configured 

I have pinpointed the issue! I tried the debugging steps and suddenly
nautilus opened fine.

So, the issue is that I have some deffective version of
libkgx-nautilus.so, which does return NULL list.

But, if I provide a different version of gnome-console
(ie. --with-debug-info=gnome-console) nautilus suddenly opens fine.

I have run multiple guix pulls, guix system reconfigure, guix gc
--verify=contents but it has not fixed it.

It even works when I use run guix shell --pure nautilus gnome-console.

I am now completely lost.
Liliana Marie Prikler Oct. 18, 2022, 6:19 a.m. UTC | #3
Am Montag, dem 17.10.2022 um 18:20 +0200 schrieb Mája Tomášek:
> Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:
> 
> > Am Sonntag, dem 16.10.2022 um 19:34 +0200 schrieb Mája Tomášek:
> > > 
> > > Hi,
> > > 
> > > this patch removes the gnome-console nautilus extension as it
> > > crashes nautilus (at least on my machine).
> > I can confirm it working as intended on at least two separate
> > machines, both configured 
> 
> I have pinpointed the issue! I tried the debugging steps and suddenly
> nautilus opened fine.
> 
> So, the issue is that I have some deffective version of
> libkgx-nautilus.so, which does return NULL list.
> 
> But, if I provide a different version of gnome-console
> (ie. --with-debug-info=gnome-console) nautilus suddenly opens fine.
> 
> I have run multiple guix pulls, guix system reconfigure, guix gc
> --verify=contents but it has not fixed it.
> 
> It even works when I use run guix shell --pure nautilus gnome-
> console.
> 
> I am now completely lost.
IIRC you have to --verify=contents,repair.  Note that repair might
still not work due to gnome-console – like all gnome packages –
receiving grafts, which is known to mess with guix build --repair.

If everything else fails, you can try rolling back to a generation
before gnome-console was built, delete all future generations, gc, and
then rebuild gnome-console.  This should definitely make nautilus work,
under the assumption that your gnome-console build succeeds this time
and no spurious hardware failure turns up.

Cheers
Dominic Martinez Oct. 18, 2022, 9:48 p.m. UTC | #4
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

> IIRC you have to --verify=contents,repair.  Note that repair 
> might
> still not work due to gnome-console – like all gnome packages –
> receiving grafts, which is known to mess with guix build 
> --repair.

I'm encountering the same issue, so it seems strange for it to be 
a spurious corruption. Just chiming in in case this doesn't work.
ashish.is--- via Guix-patches" via Oct. 20, 2022, 7:58 p.m. UTC | #5
Dominic Martinez <dom@dominicm.dev> writes:

> Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:
>
>> IIRC you have to --verify=contents,repair.  Note that repair 
>> might
>> still not work due to gnome-console – like all gnome packages –
>> receiving grafts, which is known to mess with guix build 
>> --repair.
>
> I'm encountering the same issue, so it seems strange for it to be 
> a spurious corruption. Just chiming in in case this doesn't work.

I have tested everything that has been suggested, but nothing really
worked. When I try apply transform on gnome
(options->transformation
'((with-debug-info . "gnome-console")))
it does not allow me to do so. (Apparently there is a version conflict.

I know that this issue is not present on
guix shell --pure nautilus gnome-console

And is also fixed with
guix shell --with-debug-info=gnome-console nautilus gnome-console

But I cannot upgrade gnome-console, or at least when I tried rollbacking
to a previous version (about a month ago) then deleting all generations,
running guix gc. But the issue is back when I ran guix system
reconfigure.

I have now verified, that it is indeed not a binary corruption issue. As both
in normal and in the pure environment the libkgx-nautilus.so are the
same file.

The fact that it does not occur when using the
--with-debug-info=gnome-console option is kind of a bummer, as I cannot
use gdb to debug gnome-console :D

Regards

Maya
Liliana Marie Prikler Oct. 21, 2022, 6:09 a.m. UTC | #6
Am Donnerstag, dem 20.10.2022 um 21:58 +0200 schrieb Mája Tomášek:
> I have now verified, that it is indeed not a binary corruption issue.
> As both in normal and in the pure environment the libkgx-nautilus.so
> are the same file.
Your nautilus could still be corrupted, though, linking to the wrong
libkgx-nautilus.so

Cheers
ashish.is--- via Guix-patches" via Oct. 24, 2022, 9:50 p.m. UTC | #7
Dominic Martinez <dom@dominicm.dev> writes:

> Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:
>
>> IIRC you have to --verify=contents,repair.  Note that repair 
>> might
>> still not work due to gnome-console – like all gnome packages –
>> receiving grafts, which is known to mess with guix build 
>> --repair.
>
> I'm encountering the same issue, so it seems strange for it to be 
> a spurious corruption. Just chiming in in case this doesn't work.

Just an fyi, I have temporarily fixed the issue by unsetting
NAUTILUS_EXTENSION_PATH environment variable

This is only a temporary fix, but it means that you can use your desktop
normally in the meantime.
ashish.is--- via Guix-patches" via Oct. 24, 2022, 9:54 p.m. UTC | #8
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

> Am Donnerstag, dem 20.10.2022 um 21:58 +0200 schrieb Mája Tomášek:
>> I have now verified, that it is indeed not a binary corruption issue.
>> As both in normal and in the pure environment the libkgx-nautilus.so
>> are the same file.
> Your nautilus could still be corrupted, though, linking to the wrong
> libkgx-nautilus.so
>
> Cheers

I think that nautilus loads this library by checking for objects in
NAUTILUS_EXTENSION_PATH and loading them into the system at
runtime. Simply unsetting the variable fixes the issue. So in my opinion
nautilus cannot link the wrong file, as it does on runtime and that is
set to a variable that essentialy links it to the same file.

Sidenote, nautilus is actually not involved in the process, as
gnome-console is not it's input. (It's actually the other way around)

Cheers
Liliana Marie Prikler Oct. 25, 2022, 5:59 a.m. UTC | #9
Am Montag, dem 24.10.2022 um 23:54 +0200 schrieb Mája Tomášek:
> I think that nautilus loads this library by checking for objects in
> NAUTILUS_EXTENSION_PATH and loading them into the system at
> runtime. Simply unsetting the variable fixes the issue. So in my
> opinion nautilus cannot link the wrong file, as it does on runtime
> and that is set to a variable that essentialy links it to the same
> file.t
Ahh, you're right of course.  Still, when debugging against guix shell,
you ought to take the shell cache into account, which can obscure bugs.
In either case, check very carefully that the two libkgx-nautilus
actually point to the same file.


Cheers
diff mbox series

Patch

---
 gnu/packages/gnome.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fbaef9eb6e..c71894bcb9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5445,8 +5445,7 @@  (define-public gnome-console
     (build-system meson-build-system)
     (arguments
      (list #:glib-or-gtk? #t
-           #:configure-flags #~(list "-Dtests=true"
-                                     "-Dnautilus=enabled")
+           #:configure-flags #~(list "-Dtests=true")
            #:phases #~(modify-phases %standard-phases
                         (add-after 'unpack 'patch-nautilus-extension-path
                           (lambda _
-- 
2.37.3