nautilus --version segfaults in g_application_impl_get_dbus_object_path

Bug #1820859 reported by errors.ubuntu.com bug bridge
144
This bug affects 18 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Hirsute
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

* Impact

nautilus hits a segfault when called with the version argument, which was annoying but became problematic in hirsute since the desktop icons ng calls that command to check if nautilus is available

* Test case

$ nautilus --version
shouldn't segfault

* Regression potential

The change is in a patch which was added to expose open locations to Unity for the benefit of the launcher and which is also used by the dashtodock one now. Check that the launcher correctly indicates which windows are active, especially when dealing with external devices.

--------------

The Ubuntu Error Tracker has been receiving reports about a problem regarding nautilus. This problem was most recently seen with package version 1:3.31.90-1ubuntu2, the problem page at https://errors.ubuntu.com/problem/8a8c9fc62039a8bb83a7ee530ac4140a9b8c29d9 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

tags: added: eoan
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue seems to be due to a distro patch (19_unity_open_location_xid) and started in disco so maybe a rebasing issue

Changed in nautilus (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

Khurshid, could you have a look, it seems like you are the one who rebased the patch for the new nautilus

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

How to reproduce this ?

Previously crash was in `nautilus_window_slot_get_location` which is now fixed upstream.

With 3.32.1-1ubuntu1, I can't reproduce with G_MESSAGES_DEBUG=all /usr/bin/nautilus. Can you copy/paste error as I don't have access?

But we don't really to update windows locations when org.freedesktop.FileManager1 is acquired or being acquired. If there is still a error I will open a merge.

Revision history for this message
Brian Murray (brian-murray) wrote :
Download full text (3.3 KiB)

Here is the Stacktrace from the Error Report:

#0 g_application_impl_get_dbus_object_path (impl=0x0) at ../../../gio/gapplicationimpl-dbus.c:855
No locals.
#1 0x00007f1d99b3afa4 in g_application_get_dbus_object_path (application=<optimized out>) at ../../../gio/gapplication.c:2108
        __FUNCTION__ = "g_application_get_dbus_object_path"
#2 0x00005618fcdb1b05 in update_dbus_opened_locations (self=0x5618fed38140) at ../src/nautilus-application.c:1407
        priv = 0x5618fed38010
        i = <optimized out>
        l = <optimized out>
        sl = <optimized out>
        locations = 0x0
        locations_size = 0
        locations_array = <optimized out>
        window = <optimized out>
        location = <optimized out>
        dbus_object_path = 0x0
        windows_to_locations = 0x0
        b = {u = {s = {partial_magic = 0, type = 0x5618ff89f620, y = {94665366435361, 0, 0, 18446744073709551615, 94665365961056, 8, 0, 3, 1033660112, 0, 0, 0, 0, 0}}, x = {0, 94665366435360, 94665366435361, 0, 0, 18446744073709551615, 94665365961056, 8, 0, 3, 1033660112, 0, 0, 0, 0, 0}}}
        wb = {u = {s = {partial_magic = 0, type = 0x7f1d80003980, y = {1, 32, 94665366770608, 9448834217829765632, 0, 94665354542176, 6, 0, 0, 94665354566224, 0, 139765121204133, 32, 94665365837920}}, x = {0, 139764678277504, 1, 32, 94665366770608, 9448834217829765632, 0, 94665354542176, 6, 0, 0, 94665354566224, 0, 139765121204133, 32, 94665365837920}}}
        windows_to_locations_builder = {u = {s = {partial_magic = 94665365356048, type = 0x5618ff797e10, y = {0, 0, 4243608448, 94665354538272, 4, 8, 94665354567736, 0, 8, 139765121205065, 0, 139765121204849, 94665365356048, 4286152208}}, x = {94665365356048, 94665365356048, 0, 0, 4243608448, 94665354538272, 4, 8, 94665354567736, 0, 8, 139765121205065, 0, 139765121204849, 94665365356048, 4286152208}}}
        __FUNCTION__ = "update_dbus_opened_locations"
#3 0x00005618fcdb4d8d in bus_acquired_cb (conn=<optimized out>, name=<optimized out>, user_data=0x5618ff794ac0) at ../src/nautilus-freedesktop-dbus.c:168
        fdb = 0x5618ff794ac0
        application = <optimized out>
        __FUNCTION__ = "bus_acquired_cb"
#4 0x00007f1d99b6fec4 in connection_get_cb (source_object=<optimized out>, res=0x5618fed5c840, user_data=0x5618ff799ee0) at ../../../gio/gdbusnameowning.c:487
        client = 0x5618ff799ee0
#5 0x00007f1d99b0f059 in g_task_return_now (task=0x5618fed5c840) at ../../../gio/gtask.c:1209
No locals.
#6 0x00007f1d99b0fb73 in g_task_return (task=0x5618fed5c840, type=<optimized out>) at ../../../gio/gtask.c:1278
        source = 0x7f1d74001340
#7 0x00007f1d99b620c2 in bus_get_async_initable_cb (source_object=0x5618fed4e020, res=0x5618fed5c9c0, user_data=user_data@entry=0x5618fed5c840) at ../../../gio/gdbusconnection.c:7346
        task = 0x5618fed5c840
        error = 0x0
        __FUNCTION__ = "bus_get_async_initable_cb"
        _g_boolean_var_ = <optimized out>
#8 0x00007f1d99b0f059 in g_task_return_now (task=0x5618fed5c9c0) at ../../../gio/gtask.c:1209
No locals.
#9 0x00007f1d99b0f099 in complete_in_idle_cb (task=0x5618fed5c9c0) at ../../../gio/gtask.c:1223
No locals.
#10 0x00007f1d9a67e958 in ?? ()
No symbol table...

Read more...

tags: added: focal
tags: added: groovy
Revision history for this message
Sebastien Bacher (seb128) wrote :

On focal doing 'nautilus --version' is enough to trigger the issue

tags: added: desktop-lts-wishlist
summary: - /usr/bin/nautilus:11:g_application_impl_get_dbus_object_path:g_application_get_dbus_object_path:update_dbus_opened_locations:bus_acquired_cb:connection_get_cb
+ nautilus --version segfaults in g_application_impl_get_dbus_object_path
Revision history for this message
Vladimir Kondratyev (vladimirkondratyev) wrote :

"nautilus --version" crashes always (vanilla Ubuntu 2020.04 desktop installation).

Revision history for this message
AES (7a9a07c614) wrote :

Hello, what additional info can I provide to help diagnose the issue? I get these segfaults sometimes right after boot. Not sure if anything is broken though since the system works fine (aside from other segfaults/crashes).

```
aes@pop-os:~$ sudo grep segfault /var/log/kern.log | grep nautilus
[sudo] password for aes:
Dec 21 19:33:44 pop-os kernel: [ 23.054275] nautilus[3601]: segfault at 20 ip 00007fa6d519f844 sp 00007ffce8181e68 error 4 in libgio-2.0.so.0.6600.1[7fa6d50ee000+119000]
Dec 21 21:10:37 pop-os kernel: [ 20.034278] nautilus[2479]: segfault at 20 ip 00007f460b754844 sp 00007ffd1c7d5de8 error 4 in libgio-2.0.so.0.6600.1[7f460b6a3000+119000]
Dec 21 21:16:06 pop-os kernel: [ 18.599962] nautilus[2332]: segfault at 20 ip 00007fa6e5036844 sp 00007ffcdb30fe68 error 4 in libgio-2.0.so.0.6600.1[7fa6e4f85000+119000]
```

I also tried `nautilus --version` and it does reproduce the issue reliably.

```
aes@pop-os:~$ uname -a
Linux pop-os 5.8.0-7630-generic #32~1606339263~20.10~61c3910-Ubuntu SMP Thu Nov 26 00:10:35 UTC x86_64 x86_64 x86_64 GNU/Linux
aes@pop-os:~$ apt search ^nautilus$
Sorting... Done
Full Text Search... Done
nautilus/groovy,now 1:3.38.1-1ubuntu1 amd64 [installed,automatic]
  file manager and graphical shell for GNOME
```

Revision history for this message
Compiler (pranav.bhattarai) wrote :

Ubuntu 20.10

pranav@exam ~> sudo grep segfault /var/log/kern.log | grep nautilus
Feb 3 19:33:08 exam kernel: [ 139.517251] nautilus[5024]: segfault at 20 ip 00007f090d32e844 sp 00007ffcff5f9ac8 error 4 in libgio-2.0.so.0.6600.1[7f090d27d000+119000]
Feb 4 08:36:13 exam kernel: [ 3365.554797] nautilus[25298]: segfault at 20 ip 00007f63db2bb844 sp 00007ffc8d543348 error 4 in libgio-2.0.so.0.6600.1[7f63db20a000+119000]
Feb 4 20:39:31 exam kernel: [ 116.732341] nautilus[5093]: segfault at 20 ip 00007f3ed92b5844 sp 00007ffe094049a8 error 4 in libgio-2.0.so.0.6600.1[7f3ed9204000+119000]
Feb 5 09:01:48 exam kernel: [ 47.645609] nautilus[4744]: segfault at 20 ip 00007f0a38603844 sp 00007ffeca430a28 error 4 in libgio-2.0.so.0.6600.1[7f0a38552000+119000]
Feb 5 11:02:25 exam kernel: [ 7284.527788] nautilus[42129]: segfault at 20 ip 00007ff9ef2c0844 sp 00007ffc4f5099b8 error 4 in libgio-2.0.so.0.6600.1[7ff9ef20f000+119000]
Feb 5 14:41:18 exam kernel: [20417.058166] nautilus[82964]: segfault at 20 ip 00007fb1fb9f8844 sp 00007ffdaef6db58 error 4 in libgio-2.0.so.0.6600.1[7fb1fb947000+119000]
Feb 5 15:56:24 exam kernel: [24923.578633] nautilus[113832]: segfault at 20 ip 00007fc89bbe7844 sp 00007ffc06c59ba8 error 4 in libgio-2.0.so.0.6600.1[7fc89bb36000+119000]
Feb 5 15:56:30 exam kernel: [24929.399261] nautilus[114018]: segfault at 20 ip 00007fd7a6e68844 sp 00007fff15760618 error 4 in libgio-2.0.so.0.6600.1[7fd7a6db7000+119000]
pranav@exam ~> uname -r
5.8.0-41-generic

Revision history for this message
Davide Aguiari (gorghino) wrote :

Pop!_OS 20.10

gorgo@pop-os:~$ sudo grep segfault /var/log/kern.log | grep nautilus
Mar 10 10:07:16 pop-os kernel: [ 19.393113] nautilus[3714]: segfault at 20 ip 00007f27e64098c4 sp 00007ffd8ee79288 error 4 in libgio-2.0.so.0.6600.1[7f27e6358000+119000]
Mar 10 11:34:07 pop-os kernel: [ 5230.014536] nautilus[17022]: segfault at 20 ip 00007f60c559f8c4 sp 00007ffe447357e8 error 4 in libgio-2.0.so.0.6600.1[7f60c54ee000+119000]

gorgo@pop-os:~$ uname -a
Linux pop-os 5.8.0-7642-generic #47~1614007149~20.10~82fb226-Ubuntu SMP Tue Feb 23 02:59:01 UTC x86_64 x86_64 x86_64 GNU/Linux

gorgo@pop-os:~$ nautilus --version
Initializing nautilus-dropbox 2020.03.04
GNOME nautilus 3.38.1
Segmentation fault (core dumped)

Revision history for this message
Hassan El Jacifi (waver) wrote :

Same issue:

~% date && nautilus --version
ven 19 mar 2021 15:43:34 CET
GNOME nautilus 3.38.1
[1] 16228 segmentation fault (core dumped) nautilus --version

 ~%
[ven mar 19 15:43:34 2021] nautilus[16228]: segfault at 20 ip 00001547cdd938c4 sp 00007ffde97f9288 error 4 in libgio-2.0.so.0.6600.1[1547cdce2000+119000]
[ven mar 19 15:43:34 2021] Code: 74 0c 31 d2 31 f6 e9 db 8d 02 00 0f 1f 00 c3 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8b 07 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa <48> 8b 47 20 c3 0f 1f 80 00 00 00 00 f3 0f 1e fa 55 48 83 ec 10 48

Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy

libglib2.0-0:amd64 2.66.1-2ubuntu0.2

Revision history for this message
BertN45 (lammert-nijhof) wrote :

It happened after a fresh install of Ubuntu 21.04 Beta on ZFS. Only the updates have been run and I was just installing or starting to install the Virtualbox Guest Additions

tags: added: rls-hh-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

The recent reports are probably due to the switch to desktop icons ng which calls nautilus to check if it's installed
https://gitlab.com/rastersoft/desktop-icons-ng/-/blob/master/desktopManager.js#L131

tags: added: needs-packaging
tags: removed: needs-packaging
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, fixed this in our patch (package is in hirsute queue right now), however it was hiding a glib issue: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2056

Changed in nautilus (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Great, thanks Marco. The release team isn't likely to accept it on the ISO at this point so let's turn it into a 0 day SRU, I'm editing the description

description: updated
Revision history for this message
Iain Lane (laney) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted nautilus into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nautilus/1:3.38.2-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.38.2-1ubuntu2

---------------
nautilus (1:3.38.2-1ubuntu2) hirsute; urgency=medium

  * d/p/19_unity_open_location_xid:
    - Do not update opened locations on bus connection.
      Nautilus may connect to the bus when the application is already about
      shut down, however at that point its implementation is destroyed but
      Gio doesn't handle this gracefully as per GNOME/GLib!2056.
      To prevent this, we can safely reduce the delta of the distro-patch by
      avoiding updating the opened locations on bus acquired, as we already do
      it in all the cases a window actually changes its state. (LP: #1820859)

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 21 Apr 2021 07:03:29 +0200

Changed in nautilus (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Per-Inge (per-inge-hallin) wrote : Re: [Bug 1820859] Re: nautilus --version segfaults in g_application_impl_get_dbus_object_path

Don't get the crash any longer.

Den tors 22 apr. 2021 kl 16:41 skrev Launchpad Bug Tracker <
<email address hidden>>:

> This bug was fixed in the package nautilus - 1:3.38.2-1ubuntu2
>
> ---------------
> nautilus (1:3.38.2-1ubuntu2) hirsute; urgency=medium
>
> * d/p/19_unity_open_location_xid:
> - Do not update opened locations on bus connection.
> Nautilus may connect to the bus when the application is already about
> shut down, however at that point its implementation is destroyed but
> Gio doesn't handle this gracefully as per GNOME/GLib!2056.
> To prevent this, we can safely reduce the delta of the distro-patch
> by
> avoiding updating the opened locations on bus acquired, as we
> already do
> it in all the cases a window actually changes its state. (LP:
> #1820859)
>
> -- Marco Trevisan (Treviño) <email address hidden> Wed, 21 Apr 2021
> 07:03:29 +0200
>
> ** Changed in: nautilus (Ubuntu Hirsute)
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1820859
>
> Title:
> nautilus --version segfaults in
> g_application_impl_get_dbus_object_path
>
> Status in nautilus package in Ubuntu:
> Fix Released
> Status in nautilus source package in Hirsute:
> Fix Released
>
> Bug description:
> * Impact
>
> nautilus hits a segfault when called with the version argument, which
> was annoying but became problematic in hirsute since the desktop icons
> ng calls that command to check if nautilus is available
>
> * Test case
>
> $ nautilus --version
> shouldn't segfault
>
> * Regression potential
>
> The change is in a patch which was added to expose open locations to
> Unity for the benefit of the launcher and which is also used by the
> dashtodock one now. Check that the launcher correctly indicates which
> windows are active, especially when dealing with external devices.
>
> --------------
>
>
> The Ubuntu Error Tracker has been receiving reports about a problem
> regarding nautilus. This problem was most recently seen with package
> version 1:3.31.90-1ubuntu2, the problem page at
> https://errors.ubuntu.com/problem/8a8c9fc62039a8bb83a7ee530ac4140a9b8c29d9
> contains more details, including versions of packages affected, stacktrace
> or traceback, and individual crash reports.
> If you do not have access to the Ubuntu Error Tracker and are a software
> developer, you can request it at http://forms.canonical.com/reports/.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1820859/+subscriptions
>

--
Skickat från min Sony Xperia eller Ubuntu

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.