After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683671 - Segmentation fault when looking at process properties
Segmentation fault when looking at process properties
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: process list
3.5.x
Other Linux
: Normal critical
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-09 14:04 UTC by Kristian Laakkonen
Modified: 2012-12-15 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kristian Laakkonen 2012-09-09 14:04: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
  • #0 vfprintf
    from /usr/lib/libc.so.6
  • #1 __vasprintf_chk
    from /usr/lib/libc.so.6
  • #2 g_vasprintf
    from /usr/lib/libglib-2.0.so.0
  • #3 g_strdup_vprintf
    from /usr/lib/libglib-2.0.so.0
  • #4 g_strdup_printf
    from /usr/lib/libglib-2.0.so.0
  • #5 fill_proc_properties
    at procproperties.cpp line 130
  • #6 update_procproperties_dialog
    at procproperties.cpp line 175
  • #7 procprop_timer
    at procproperties.cpp line 234
  • #8 ??
    from /usr/lib/libglib-2.0.so.0
  • #9 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #10 ??
    from /usr/lib/libglib-2.0.so.0
  • #11 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #12 gtk_main
    from /usr/lib/libgtk-3.so.0
  • #13 Gtk::Main::run_impl()
    from /usr/lib/libgtkmm-3.0.so.1
  • #14 Gtk::Main::run()
    from /usr/lib/libgtkmm-3.0.so.1
  • #15 main
    at procman.cpp line 760

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 ***
Comment 1 Robert Roth 2012-09-27 19:58:02 UTC
Strange, I can't reproduce this. Does this happen with any selected process? Do you have one or more processes selected?
Comment 2 Kristian Laakkonen 2012-09-28 22:24:51 UTC
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.
Comment 3 Robert Roth 2012-10-02 10:59:23 UTC
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.
Comment 4 Kristian Laakkonen 2012-10-03 16:41:32 UTC
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
Comment 5 Robert Roth 2012-11-06 21:50:15 UTC
Unfortunately I still can't reproduce this, so don't really know how to fix it.
Comment 6 Robert Roth 2012-12-07 12:47:16 UTC
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.
Comment 7 Robert Roth 2012-12-08 00:50:29 UTC
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.
Comment 8 Kristian Laakkonen 2012-12-10 22:07:26 UTC
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?
Comment 9 Robert Roth 2012-12-10 23:11:01 UTC
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.
Comment 10 Kristian Laakkonen 2012-12-15 22:22:37 UTC
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.