Caja crashes intermittently multiple times per day

Bug #1369331 reported by superkuh
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu MATE
Invalid
Undecided
Unassigned

Bug Description

Hi. I installed the MATE desktop over Xubuntu 14.04 after a painless and successful upgrade from 12.04. After logging into the MATE desktop for the first time I immediately and persistently began to have the Caja file manager crash on me. It does this about once every 3 hours or so on average but the timing is seemingly random. I always submit the crashes via Apport but it's been weeks and nothing has changed... so I'm submitting it as a bug here.

It may or may not be related to me opening NFS shares in Caja. I only mention this because I almost always have an NFS share open.

Follow the advice of the guys on #ubuntu-mate I attached gdb to the Caja pid and waited for the crash. I have attached the backtrace from that as mylog.txt and it is also excerpted below,

Start it from the beginning? (y or n) Starting program: /usr/bin/caja
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee0ce700 (LWP 14200)]
[New Thread 0x7fffed8cd700 (LWP 14211)]
[New Thread 0x7fffecebe700 (LWP 14220)]
[New Thread 0x7fffdffff700 (LWP 14221)]
[New Thread 0x7fffddf6f700 (LWP 14222)]
[New Thread 0x7fffdcd77700 (LWP 14224)]
[Thread 0x7fffddf6f700 (LWP 14222) exited]
[Thread 0x7fffdcd77700 (LWP 14224) exited]
[New Thread 0x7fffdcd77700 (LWP 14230)]
[Thread 0x7fffdcd77700 (LWP 14230) exited]
[New Thread 0x7fffdcd77700 (LWP 14235)]
[New Thread 0x7fffddf6f700 (LWP 14236)]
[Thread 0x7fffdffff700 (LWP 14221) exited]
[Thread 0x7fffdcd77700 (LWP 14235) exited]
[New Thread 0x7fffdcd77700 (LWP 14255)]
[Thread 0x7fffddf6f700 (LWP 14236) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4cf8ac0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#0 0x00007ffff4cf8ac0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007ffff4cb0231 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff4cf9929 in g_slice_free1 ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff4cdb2be in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff4cdde40 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff4cde048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff4cde30a in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff64e6447 in gtk_main ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8 0x0000000000449e64 in main (argc=1, argv=0x7fffffffe6f8) at caja-main.c:614

Tags: caja segfault
Revision history for this message
superkuh (n-ubunt1-u) wrote :
Revision history for this message
superkuh (n-ubunt1-u) wrote :

Sep 15 17:17:01 sol CRON[21479]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 15 17:19:50 sol kernel: [227990.649091] caja[21216]: segfault at d98bd35 ip 00007ff22f54e297 sp 00007fffee3d6a00 error 4 in libglib-2.0.so.0.4000.0[7ff22f4ea000+106000]
Sep 15 17:40:57 sol kernel: [229257.407776] caja[21217]: segfault at dac15d6 ip 00007ffff4cf9297 sp 00007fffffffe0b0 error 4 in libglib-2.0.so.0.4000.0[7ffff4c95000+106000]
Sep 15 17:44:57 sol whoopsie[1277]: Parsing /var/crash/_usr_bin_caja.0.crash.
Sep 15 17:44:57 sol whoopsie[1277]: Uploading /var/crash/_usr_bin_caja.0.crash.
Sep 15 17:44:58 sol whoopsie[1277]: Sent; server replied with: No error
Sep 15 17:44:58 sol whoopsie[1277]: Response code: 200
Sep 15 17:44:58 sol whoopsie[1277]: Reported OOPS ID e8f40c56-3d29-11e4-a072-fa163e373683
Sep 15 17:45:13 sol whoopsie[1277]: Sent; server replied with: No error
Sep 15 17:45:13 sol whoopsie[1277]: Response code: 200
Sep 15 18:17:01 sol CRON[25661]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 15 19:02:02 sol kernel: [234119.583690] caja[21743]: segfault at df645fd ip 00007f92529be297 sp 00007fff224107f0 error 4 in libglib-2.0.so.0.4000.0[7f925295a000+106000]
Sep 15 19:17:01 sol CRON[27216]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 15 20:08:47 sol kernel: [238121.684271] caja[26816]: segfault at e338da1 ip 00007f0a541c2297 sp 00007fff2847ab90 error 4 in libglib-2.0.so.0.4000.0[7f0a5415e000+106000]
Sep 15 20:17:01 sol CRON[28921]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 15 20:27:11 sol kernel: [239225.620455] caja[28842]: segfault at e446861 ip 00007f32c7ab9297 sp 00007fff55da5dc0 error 4 in libglib-2.0.so.0.4000.0[7f32c7a55000+106000]

Revision history for this message
superkuh (n-ubunt1-u) wrote :

caja:
  Installed: 1.8.1-2~ppa1~trusty1
  Candidate: 1.8.1-2~ppa1~trusty1
  Version table:
 *** 1.8.1-2~ppa1~trusty1 0
        500 http://ppa.launchpad.net/ubuntu-mate-dev/trusty-mate/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Guy Stone (stoneguy3) wrote :

No NFS shares here, but there are some SAMBA ones. Quad AMD, 8GB, 7 workspaces + VBox, so this system is pretty busy. Running Tahr + Mate 1.8 rather than ubuntu-mate, but same behaviour.

I've been trashing the apport reports because caja isn't part of mainstream ubuntu (yet). Will figure out what is meant by "attached gdb to the caja pid" to provide some additional info here.

Revision history for this message
superkuh (n-ubunt1-u) wrote :

NFS turns out to not be involved. I tried not opening any NFS shares and still had Caja crash regularly. But to generate a useful backtrace with gdb, you have to set up a few things first. One is installing all the relevant *-dbg packages.

To find out what you need to install go to https://wiki.ubuntu.com/DebuggingProgramCrash and download 'list-symbols-packages-v2.sh' from https://wiki.ubuntu.com/DebuggingProgramCrash?action=AttachFile&do=get&target=list-symbols-packages-v2.sh .

$ chmod +x packages-v2.sh
$ sudo bash ./list-symbols-packages-v2.sh -p $(caja) 2>/dev/null

Install the relevant debug packages it lists, like:

$ sudo apt-get install mate-desktop-dbg caja-dbg caja-extensions-dbg libcaja-extension1-dbg python-caja-dbg mate-utils-dbg libmate-window-settings1-dbg mate-user-share-dbg atril-dbg engrampa-dbg libatrildocument3-dbg mate-gnome-main-menu-applet-dbg

Then set a kernel feature to allow processes to debug other processes without being root (until you reboot)
$ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

$ gdb -p `pidof caja`
(gdb) set logging file ~/cajalog.txt
(gdb) set logging on

At this point Caja will be frozen and non-interactive. That is normal.

(gdb) run

It'll say that Caja is already running and ask you if you want to restart the process. If you don't it doesn't seem to be able to get a backtrace, so say 'y' to restarting it.

Now wait for the crash to happen. When it does gdb will say something like, "Program received signal SIGSEGV, Segmentation fault." Now type,

(gdb) backtrace

The result should show up in ~/cajalog.txt .

Revision history for this message
superkuh (n-ubunt1-u) wrote :

Alright, I think this time I recorded a proper backtrace. I have it attached. In order to do so I had to start gdb as root and then answer 'y' to restarting the process after I hit 'run'. But apparently I should've just typed, "continue" instead of run and then I wouldn't have needed to start a new caja process.

Regardless, I think I finally have some useful debug info.

Revision history for this message
superkuh (n-ubunt1-u) wrote :

I have discovered that this exact bug effects Thunar too (backtrace here: http://pastebin.com/UiXC1LcX). Therefore it is not an Ubuntu MATE issue but more likely a more general glib2.0 / filemanagers issue.

Feel free to close this bug on the Ubuntu MATE launchpad. I'll try to figure out where I should submit it upstream by making posts on the Ubuntu forums: http://ubuntuforums.org/showthread.php?t=2244484&p=13123232

Changed in ubuntu-mate:
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.