Crashes on startup if shows "required directories missing" dialog

Bug #1286766 reported by Pedro on 2014-03-02
218
This bug affects 25 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Critical
nautilus (Ubuntu)
Medium
Robert Ancell

Bug Description

[Impact]
If nautilus fails to find the directories it requires on startup it attempts to show a dialog describing this and crashes due to following code assuming this dialog is a file browser window.

[Test Case]
1. Create a test account
2. Log into this account from a text terminal
3. Create an invalid nautilus configuration directory:
$ mkdir .config
$ touch .config/nautilus
4. Log into this account from the greeter

Expected result:
You arrive at the users desktop

Observed result:
You arrive at the users desktop but background icons are not shown. A blank dialog pops up momentarily then a crash report dialog. The blank dialog periodically pops up again (as nautilus attempts to restart).

[Regression Potential]
There is a low risk that the proposed fix could cause other unforceen bugs.

Pedro (pelogan84) wrote :

StacktraceTop:
 bsearch (__compar=<optimized out>, __size=2, __nmemb=50, __base=0xb6928380 <locale_index>, __key=<optimized out>) at /usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:28
 lookup_item_id_for_one_locale (key=0xb69282d6 <__FUNCTION__.6173+14> "t", item_id=0x6) at /build/buildd/glib2.0-2.39.91/./glib/gtranslit.c:174
 ?? ()

Changed in nautilus (Ubuntu):
importance: Undecided → Medium
summary: - nautilus crashed with SIGABRT in g_assertion_message()
+ nautilus crashed with SIGABRT in bsearch()
tags: removed: need-i386-retrace

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
information type: Private → Public
tags: added: apport-request-retrace

Package: nautilus 1:3.10.1-0ubuntu8
ProcCmdline: nautilus

tags: removed: apport-request-retrace
tags: added: bugpattern-needed
tags: added: ubuntu-desktop-trusty
Changed in nautilus (Ubuntu):
status: Confirmed → Triaged

The stack trace here seems corrupted but the errors.ubuntu.com report that is linking to this bug report [1] shows a proper stack trace.

This indicates the problem is when a warning dialog pops up on startup due to either the home directory or desktop directory not existing. Some following code then assumes this dialog is a file browser window and hits an exception.

I tried to reproduce this locally by deleting my Desktop folder / replacing it with a file but then it just reverts to using the home directory. The error reports don't give an indication on what users are doing to trigger this.

I can reproduce the crash by modifying nautilus to show the dialog always on startup.

[1] https://errors.ubuntu.com/problem/e424819541e6fb73af5b7a2cc967afc4ff1afd58

summary: - nautilus crashed with SIGABRT in bsearch()
+ Crashes on startup if shows "required directories missing" dialog
Robert Ancell (robert-ancell) wrote :

Found a way to reproduce, updated description.

description: updated
Changed in nautilus (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Robert Ancell (robert-ancell)
Changed in nautilus:
importance: Unknown → Medium
status: Unknown → New
Changed in nautilus:
importance: Medium → Critical
status: New → Fix Released

Hello Pedro, or anyone else affected,

Accepted nautilus into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nautilus/1:3.10.1-0ubuntu9 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 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, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

tags: added: verification-needed

[ubuntu 14.04-64bit on virtualbox.]
confirmed Observed result:
You arrive at the users desktop but background icons are not shown.
A blank dialog pops up momentarily then a crash report dialog.
The blank dialog periodically pops up again (as nautilus attempts to restart).

[enable trusty-proposed & install nautilus.]
$ apt-cache policy nautilus
nautilus:
  インストールされているバージョン: 1:3.10.1-0ubuntu9
  候補: 1:3.10.1-0ubuntu9
  バージョンテーブル:
 *** 1:3.10.1-0ubuntu9 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.10.1-0ubuntu8 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/main i386 Packages

[create new user & ~/.config/nautilus]
$ adduser testuser
$ su testuser
$ cd
$ mkdir .config
$ touch .config/nautilus
exit & logout

[login testuser]
pop up "Oops! Something went wrong." dialog. (does not repeat momentarily.)
---------------------------------------------
Unable to create a required folder. Please create the following folder, or set permissions such that it can be created:
/home/testuser/.config/nautilus}
---------------------------------------------

click "ok" button. --> pop up dialog cleare.
start nautilus. --> no problem.
open terminal & delete .config/nautilus
relogin testuser --> auto created ~/.config/nautilus directory & no pop up dialog.

Is this result correct?

Robert Ancell (robert-ancell) wrote :

Thanks katsu! That looks correct to me. Please update the tags.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.10.1-0ubuntu9

---------------
nautilus (1:3.10.1-0ubuntu9) trusty; urgency=medium

  * debian/patches/git_crash_on_required_dirs_dialog.patch
    - Fix crash when showing "required directories missing" dialog
      (LP: #1286766)
 -- Robert Ancell <email address hidden> Wed, 23 Apr 2014 12:44:29 +1200

Changed in nautilus (Ubuntu):
status: In Progress → Fix Released

The verification of the Stable Release Update for nautilus has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Robert Ancell (robert-ancell) wrote :

The error reports seem to be random memory corruption. I'm not sure that this SRU is causing these - it may be that there is an existing corruption issue that causes different stack traces each time it occurs. Looking at https://errors.ubuntu.com/?release=Ubuntu%2014.04&package=nautilus&period=day seems to indicate this might be the case.

Brian Murray (brian-murray) wrote :

https://errors.ubuntu.com/api/1.0/package-rate-of-crashes/?format=json&release=Ubuntu%2014.04&package=nautilus&old_version=1%3A3.10.1-0ubuntu8&new_version=1%3A3.10.1-0ubuntu9&date=20140505

This has the rate of crashes between the two package versions but it only indicates that there has not been an increase, not the actual difference in quantities.

Brian Murray (brian-murray) wrote :

I'm okay with manually setting the phased-update-percentage of this to 100%.

To post a comment you must log in.