GNOME Bugzilla – Bug 683671
Segmentation fault when looking at process properties
Last modified: 2012-12-15 22:22:37 UTC
Viewing process properties when the "Dependencies" view is selected crashes the program sometimes. Steps to reproduce: 1) Open gnome-system-monitor and select the "Processes" tab. 2) Select View -> Dependencies from the menu (ensure that it is selected). 3) Right-click on some process and select "Properties". 4) Wait for the crash to happen (usually 2-10 seconds). I tried this with versions 3.4.1 and 3.5.90.1 and the crash happens in both of them. Sometimes the crash doesn't happen, but most of the time anyway. I couldn't get the crash to happen when the View -> Dependencies option wasn't selected. I also noticed another bug that could be related: the process whose properties are shown sometimes changes over time so that it is not anymore the originally selected process. A couple of times the properties view became corrupted and showed strange characters and nonsense data. Stack trace (with version 3.5.90.1): Program received signal SIGSEGV, Segmentation fault. 0xb6c43744 in vfprintf () from /usr/lib/libc.so.6 (gdb) bt
+ Trace 230828
Sometimes the row number given for the function fill_proc_properties was different, like 131 or 145. Sometimes there were other errors just before the crash, for example: (gnome-system-monitor:17904): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() or *** glibc detected *** /usr/bin/gnome-system-monitor: corrupted double-linked list: 0x08696030 ***
Strange, I can't reproduce this. Does this happen with any selected process? Do you have one or more processes selected?
I have only one process selected. Some processes crash the program more easily than others, but I don't see any obvious reason for that. It also seems that the crash happens more likely if the program was just started. The bug occurs both on my Arch Linux computer and on a fresh Ubuntu 12.04.1 LTS 32 bit installation on VirtualBox.
Could you please specify some more easily crashing processes, and attach a screencast? I did not manage to reproduce this neither on Precise nor on Quantal and checking the code also hints me that this should not happen, but it still seems to happen for you.
Here is a screencast where the crashing processes are nautilus and gnome-system-monitor itself. At the end of the video you can see how sometimes the process that is shown changes randomly. Link: http://www.screencast.com/t/Z7gjsv1kO
Unfortunately I still can't reproduce this, so don't really know how to fix it.
Can you build system monitor from trunk? If not, do you have Ubuntu 12.10 installed on any of your systems (physical or VM) - just asking, because I can help you building system monitor from source there? Could you please help me testing if I propose some patches, as I can't reproduce this locally, but I think I have found the source of the problem and have a possible solution.
I have pushed a possible fix (cleanup of an old and unnecessary workaround) in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Okay, I built the latest revision from git://git.gnome.org/gnome-system-monitor on a Ubuntu 12.10 virtual machine and installed it in my home directory, but it seems that the already-installed version and the newly built version are conflicting somehow, there are some problems with schemas etc. What is the correct way to build and test the latest version?
Usually I do the following: 1 pull the latest version of system monitor 2 create a /devel directory with 'sudo mkdir /devel' 3 cd to the checked out gnome system monitor directory 4 run './autogen.sh --prefix=/devel' - this installs everything to /devel instead of the default /usr, thus you can have both the working stable and the development version 5 run 'sudo make install' to build and install gnome system monitor 6 copy the schema file to the standard location with 'sudo cp /devel/share/glib-2.0/schemas/org.gnome.gnome-system-monitor.* /usr/share/glib-2.0/schemas/' 7 compile the glib schemas with 'sudo glib-compile-schemas /usr/share/glib-2.0/schemas/' 8 You should be able to run system monitor with 'src/gnome-system-monitor' Most of the steps only need to be done once, usually you only repeat steps 1, 3, 5, 8, and only do the other steps if there are schema issues, or other issues. I hope this helps.
It seems that the problem is indeed fixed now, I couldn't get the newest version to crash. I did some further investigation and it seems that the commit that fixed the problem was actually f7f4c550 Do not clear the full treestore ... That version is the first that does not crash.