nautilus crashes when trying to view the properties of any folder not owned by root with gksudo or sudo

Bug #1405441 reported by chris pollock
134
This bug affects 26 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Critical
Ubuntu GNOME
Fix Released
Medium
Bruce Pieterse
nautilus (Ubuntu)
Fix Released
High
Bruce Pieterse
Trusty
Fix Released
Undecided
Unassigned
Utopic
Invalid
Undecided
Unassigned

Bug Description

[Impact]

 * Prevents a user from using sudo or gksudo to view or change the owner properties of folder not owned by root. In this case clamav

 * This also fixes the following upstream bug report which has not been reported on launchpad: https://bugzilla.gnome.org/show_bug.cgi?id=700492

 * The debdiff above applies a fix from upstream gnome git: https://git.gnome.org/browse/nautilus/commit/?id=f7d1394a03e6d02cd5c67f9c85a142e33f14566f but has been fixed in 3.14.2 of nautilus and is not present in vivid

[Test Case]

* Install gksu and clamav (sudo apt-get install gksu clamav)
* Run gksudo nautilus from the terminal
* Navigate to /var/lib and right-click on the folder clamav and click on Properties
* Nautilus crashes with a segfault in _IO_vfprintf_internal

[Regression Potential]
* Low, this patch just fixes incorrect handling of the owner field, it should not introduce any issues and has been well tested in 3.14.

-----

This constantly happens when trying to look at the properties of a file after running gksudo nautilus.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: nautilus 1:3.12.2-0ubuntu1~trusty3 [origin: LP-PPA-gnome3-team-gnome3-staging]
Uname: Linux 3.14.0-031400-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
Date: Wed Dec 24 08:33:41 2014
ExecutablePath: /usr/bin/nautilus
GsettingsChanges:

InstallationDate: Installed on 2014-10-24 (61 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcCmdline: nautilus
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x7f37cd17e8f3 <_IO_vfprintf_internal+7443>: repnz scas %es:(%rdi),%al
 PC (0x7f37cd17e8f3) ok
 source "%es:(%rdi)" (0x2078756d00202d00) not located in a known VMA region (needed readable region)!
 destination "%al" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: nautilus
StacktraceTop:
 _IO_vfprintf_internal (s=s@entry=0x7fff36e8aa30, format=<optimized out>, format@entry=0x4f454e "%s\n%s", ap=ap@entry=0x7fff36e8aba8) at vfprintf.c:1661
 __GI___vasprintf_chk (result_ptr=0x7fff36e8ab88, flags=1, format=0x4f454e "%s\n%s", args=0x7fff36e8aba8) at vasprintf_chk.c:66
 g_vasprintf () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_strdup_vprintf () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_strdup_printf () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
Title: nautilus crashed with SIGSEGV in _IO_vfprintf_internal()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
chris pollock (cpollock) wrote :
Revision history for this message
Ubuntu GNOME (ug-bot) wrote :

StacktraceTop:
 ?? ()
 ?? ()
 ?? ()
 ?? ()
 ?? ()

Revision history for this message
Ubuntu GNOME (ug-bot) wrote : Stacktrace.txt
Revision history for this message
Ubuntu GNOME (ug-bot) wrote : StacktraceSource.txt
Revision history for this message
Ubuntu GNOME (ug-bot) wrote : ThreadStacktrace.txt
Changed in ubuntu-gnome:
status: New → Invalid
Revision history for this message
Ubuntu GNOME (ug-bot) wrote : Crash report cannot be processed

Thank you for your report!

However, processing it in order to get sufficient information for the
developers failed (it does not generate a useful symbolic stack trace). This
might be caused by some outdated packages which were installed on your system
at the time of the report:

no debug symbol package found for gir1.2-glib-2.0
no debug symbol package found for libbz2-1.0
no debug symbol package found for librtmp0

Please upgrade your system to the latest package versions. If you still
encounter the crash, please file a new report.

Thank you for your understanding, and sorry for the inconvenience!

tags: removed: need-amd64-retrace
Tim Lunn (darkxst)
information type: Private → Public
Revision history for this message
chris pollock (cpollock) wrote : Re: nautilus crashed with SIGSEGV in _IO_vfprintf_internal()

Please find as an attachment the output of sudo ubuntu-bug /var/crash/_usr_bin_nautilus.0.crash I hope this is sufficient for the missing information required.

Revision history for this message
chris pollock (cpollock) wrote :
Changed in ubuntu-gnome:
status: Invalid → New
Revision history for this message
Bruce Pieterse (octoquad) wrote :

I was unable to reproduce this, however I did get another crash when looking at properties of folders not owned by root. Is it a specific file type e.g. .avi, .txt, etc that causes this crash?

What happens if you use sudo nautilus? Does the same thing occur as well?

Changed in ubuntu-gnome:
status: New → Incomplete
Revision history for this message
chris pollock (cpollock) wrote :

After further testing this morning per your comment above I can verify that whether I run 'sudo nautilus' or 'gksudo nautilus' it will crash if the owner of the file or folder is not root for instance just trying to see the properties of the folder /var/lib/clamav will cause the crash. The same if I try to seen the properties of any file or folder in my home directory.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

Just to make sure that we are on the same page, do you get this error message immediately after running gksudo nautilus:
"Unable to create a required folder. Please create the following folder, or set permissions such that it can be created:
/root/.config/nautilus"? This is easily fixed by creating the directories.

When getting the properties of a folder not owned by root you get the following message "The owner could not be changed. Sorry, could not change the owner of "Folder Name" Specified owner 'Owner of file' doesn't exist". This shows for a second then nautilus crashes with "** ERROR:nautilus-properties-window.c:1839:schedule_owner_change_timeout: assertion failed: (NAUTILUS_IS_FILE (file))" on the command line.

If this is the case, I will need a backtrace from you using this guide: https://wiki.ubuntu.com/Backtrace. I have successfully been able to get a backtrace, but in my case the error is in g_assertion_message(). There are a few extra steps we need to do before that is not covered in the guide, but i'll be glad to provide these steps for you if you can confirm the above for me.

Thanks

Revision history for this message
chris pollock (cpollock) wrote :

I have the nautilus folder in /root/.config. I do not get "The owner could not be changed. Sorry, could not change the owner of "Folder Name" Specified owner 'Owner of file' doesn't exist". This shows for a second then nautilus crashes with "** ERROR:nautilus-properties-window.c:1839:schedule_owner_change_timeout: assertion failed: (NAUTILUS_IS_FILE (file))" at all. When it crashes I get "Unhandled error message: Error when getting information for file '/home/chris/nautilus': No such file or directory". What I get is in the attachment. Also when running apport-retrace with the -s option I get:

chris@localhost:/var/crash$ sudo apport-retrace -s /var/crash/_usr_bin_nautilus.0.crash
ERROR: report file does not contain one of the required fields: CoreDump DistroRelease Package ExecutablePath

I'm getting a bit lost here to say the least

When attempting to generate the backtrace as shown here - https://wiki.ubuntu.com/Backtrace and running these steps:

gdb <program> 2>&1 | tee ~/gdb-<program>.txt
(gdb) handle SIG33 pass nostop noprint
(gdb) set pagination 0
(gdb) run <arguments, if any>

The program will start. Perform any actions necessary to reproduce the crash. If the program hangs but doesn't crash you can press ctrl+c in gdb while the program is frozen and then continue with the next step.

Nautilus will hang and so will gdb. I can't CTRL>C to stop nautilus.

I'm probably doing something incorrect however I can't figure it out.

Revision history for this message
chris pollock (cpollock) wrote :

I believe I've got something now. In the above comment I made earlier where the Wiki says

Perform any actions necessary to reproduce the crash. If the program hangs but doesn't crash you can press ctrl+c in gdb while the program is frozen and then continue with the next step.

was apparently not the correct thing to do as it would also freeze up gdb or at least it does on my machine. So I ran nautilus as gksudo nautilus started gdb as shown in the attachment. I'm hoping this is what you need.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

I am unable to get the same crash message as you, but something is definitely wrong when using gksudo and nautilus together.

Changed in ubuntu-gnome:
status: Incomplete → Triaged
importance: Undecided → Medium
milestone: none → trusty.1
Revision history for this message
chris pollock (cpollock) wrote :

Thanks Bruce, please note that at this time it seems to happen when looking at the properties of folders/files that are not owned by root such as in /var/lib/clamav which is owned by clamav with group clamav.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

I get the same crash as you when navigating to /var/lib/ with gksudo nautilus and then trying to view the properties of clamav.

It hangs for ~1-3 seconds then crashes.

octoquad@ugqa:~$ gksudo nautilus
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

Interesting thing is, the above error message is related to samba. I installed the samba package, restarted and now the above message does not show, however the crash still occurs with:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3b298f3 in _IO_vfprintf_internal (s=s@entry=0x7fffffffe070, format=<optimized out>, format@entry=0x4f4401 "%s\n%s", ap=ap@entry=0x7fffffffe1e8) at vfprintf.c:1661
1661 vfprintf.c: No such file or directory.

There are quite a few reports regarding this specific segmentation fault, but with different scenarios.

I think there is enough information to work on this, however we need to now check if this is downstream or upstream issue. I'll check with another distro and see if I can reproduce this.

Thanks

summary: - nautilus crashed with SIGSEGV in _IO_vfprintf_internal()
+ nautilus crashes when viewing the properties of /var/lib/clamav with
+ gksudo or sudo
summary: - nautilus crashes when viewing the properties of /var/lib/clamav with
- gksudo or sudo
+ nautilus crashes when trying to view the properties of /var/lib/clamav
+ with gksudo or sudo
Revision history for this message
Tim Lunn (darkxst) wrote : Re: nautilus crashes when trying to view the properties of /var/lib/clamav with gksudo or sudo
Revision history for this message
chris pollock (cpollock) wrote :

Downloaded the package and I see that I need an up-to-date Gnome development environment which I apparently don't have as I've got 3.12.2 installed. Also the 'README' mentions an 'INSTALL' file which I can't find in the package.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

I have applied the fix in comment #17 to the stock 14.04 version of nautilus (nautilus_3.10.1-0ubuntu9.4) as that is affected as well and have just tested it and it now works correctly. I will need to apply the same patch to staging ppa of nautilus (3.12.2-0ubuntu1~trusty3). This fix should land in the normal updates in a couple of days. Hang in there.

Revision history for this message
Tim Lunn (darkxst) wrote :

Hi Bruce,
  Great! please attach a debdiff[1] of your packaging and complete the SRU paperwork[2] in the bug description up top.

[1] http://packaging.ubuntu.com/html/traditional-packaging.html#creating-a-debdiff
[2] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Thanks!

Changed in nautilus (Ubuntu):
status: New → Fix Committed
status: Fix Committed → In Progress
status: In Progress → Fix Released
Revision history for this message
Tim Lunn (darkxst) wrote :

This bug is already fixed in vivd, only affects nautilus 3.10 in both trusty and utopic

Changed in ubuntu-gnome:
assignee: nobody → Bruce Pieterse (octoquad)
Changed in nautilus (Ubuntu):
assignee: nobody → Bruce Pieterse (octoquad)
Revision history for this message
Bruce Pieterse (octoquad) wrote :
description: updated
description: updated
description: updated
Changed in ubuntu-gnome:
status: Triaged → Won't Fix
status: Won't Fix → In Progress
Changed in ubuntu-gnome:
status: In Progress → Fix Committed
Changed in ubuntu-gnome:
status: Fix Committed → Fix Released
tags: added: verification-needed
tags: removed: verification-needed
Tim Lunn (darkxst)
Changed in nautilus (Ubuntu):
status: Fix Released → New
Revision history for this message
Tim Lunn (darkxst) wrote :

resetting status so it shows up in sponsorship queue, This is however already fixed in nautilus 3.14 on vivid.

Tim Lunn (darkxst)
summary: - nautilus crashes when trying to view the properties of /var/lib/clamav
- with gksudo or sudo
+ nautilus crashes when trying to view the properties of any folder not
+ owned by root with gksudo or sudo
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nautilus (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

The fix is already in the vivid version

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

I've rebased the trusty debdiff on the current updates version and sponsored

Changed in nautilus:
importance: Unknown → Critical
status: Unknown → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello chris, 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.6 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!

Changed in nautilus (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
chris pollock (cpollock) wrote : Re: [Bug 1405441] Re: nautilus crashes when trying to view the properties of any folder not owned by root with gksudo or sudo

On Wed, 2015-02-04 at 18:16 +0000, Chris J Arges wrote:
> Hello chris, 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.6 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!
>
> ** Also affects: nautilus (Ubuntu Trusty)
> Importance: Undecided
> Status: New
>
> ** Also affects: nautilus (Ubuntu Utopic)
> Importance: Undecided
> Status: New
>
> ** Changed in: nautilus (Ubuntu Trusty)
> Status: New => Fix Committed
>
> ** Tags added: verification-needed
>
This bug has been fixed about a month ago:

Start-Date: 2015-01-08 19:44:12
Commandline: aptdaemon role='role-commit-packages' sender=':1.92'
Upgrade: libnautilus-extension1a:amd64 (3.12.2-0ubuntu1~trusty3,
3.12.2-0ubuntu1~trusty4), cpio:amd64 (2.11+dfsg-1ubuntu1, 2.11
+dfsg-1ubuntu1.1), nautilus:amd64 (3.12.2-0ubuntu1~trusty3,
3.12.2-0ubuntu1~trusty4), nautilus-data:amd64 (3.12.2-0ubuntu1~trusty3,
3.12.2-0ubuntu1~trusty4), nautilus-dbg:amd64 (3.12.2-0ubuntu1~trusty3,
3.12.2-0ubuntu1~trusty4)
End-Date: 2015-01-08 19:45:41

Do you still wish for me to do some testing?

--
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
19:20:56 up 8:38, 1 user, load average: 0.10, 0.18, 0.26
Ubuntu 14.04.1 LTS, kernel 3.13.0-45-generic

Revision history for this message
Tim Lunn (darkxst) wrote :

chris, you need to test with the actual package in trusty (1:3.10.1-0ubuntu9.6 ), that will probably mean you need to purge the ppa or use a vm

Revision history for this message
chris pollock (cpollock) wrote :

On Thu, 2015-02-05 at 02:03 +0000, Tim wrote:
> chris, you need to test with the actual package in trusty
> (1:3.10.1-0ubuntu9.6 ), that will probably mean you need to purge the
> ppa or use a vm
>
If I recall I was running the 3.12.0 version when I reported this bug.
If it requires me regressing to a lower version I'd much rather someone
else test this that is still running 3.10 as I've currently got too much
going right now with trying to find a kernel bug, build ClamAv for some
older versions and other projects.

Chris

--
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
20:20:53 up 9:38, 1 user, load average: 0.25, 0.33, 0.38
Ubuntu 14.04.1 LTS, kernel 3.13.0-45-generic

Revision history for this message
Doug McMahon (mc3man) wrote :

nautilus (1:3.10.1-0ubuntu9.6), no ill effects, no crash

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

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

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

  * debian/patches/git_nautilus-property-dialog-fix-user-list-for-owner-change.patch
    - "NautilusPropertyDialog: Fix user list for owner change" (lp: #1405441)
 -- Bruce Pieterse <email address hidden> Thu, 08 Jan 2015 03:25:35 +0200

Changed in nautilus (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update 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 regressions.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

Utopic is now EOL.

Changed in nautilus (Ubuntu Utopic):
status: New → Invalid
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.