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 672741 - crash on pressing button kill process
crash on pressing button kill process
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: process list
git master
Other Linux
: Normal critical
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-24 07:33 UTC by Pavel Vasin
Modified: 2012-04-02 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (774 bytes, patch)
2012-04-02 16:46 UTC, Pavel Vasin
none Details | Review

Description Pavel Vasin 2012-03-24 07:33:00 UTC
backtrace:
==2829== Invalid read of size 1
==2829==    at 0x402C43B: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2829==    by 0x80922EF: void procman::tree_store_update<char const>(_GtkTreeModel*, _GtkTreeIter*, int, char const*) (util.cpp:571)
==2829==    by 0x8087093: void procman::tree_store_update<char>(_GtkTreeModel*, _GtkTreeIter*, int, char*) (util.h:147)
==2829==    by 0x80856E1: update_info_mutable_cols(ProcInfo*) (proctable.cpp:657)
==2829==    by 0x8086731: refresh_list(ProcData*, int const*, unsigned int) (proctable.cpp:981)
==2829==    by 0x808692D: proctable_update_list(ProcData*) (proctable.cpp:1029)
==2829==    by 0x80869C4: proctable_update_all(ProcData*) (proctable.cpp:1048)
==2829==    by 0x809291D: kill_process(ProcData*, int) (procactions.cpp:190)
==2829==    by 0x8092964: kill_dialog_button_pressed(_GtkDialog*, int, void*) (procdialogs.cpp:58)
==2829==    by 0x50288C9: g_cclosure_marshal_VOID(intXX_t) (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5026663: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5039068: ??? (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x50418BE: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5041AC2: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x45A34EC: ??? (in /usr/lib/libgtk-3.so.0.320.0)
==2829==    by 0x5028422: g_cclosure_marshal_VOID__VOIDv (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5026906: ??? (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5041490: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x5041AC2: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.3122.0)
==2829==    by 0x4539508: ??? (in /usr/lib/libgtk-3.so.0.320.0)
==2829==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
Comment 1 Chris Kühl 2012-03-24 15:31:53 UTC
I'm unable to reproduce this crash. Can you give me more information about your system: distro, version of system monitor in the about dialog etc.? Also can you describe step-by-step how you trigger the crash?
Comment 2 Pavel Vasin 2012-03-24 15:37:22 UTC
Arch linux, gnome-system-monitor 3.3.92

How to reproduce:
1. run gnome-system-monitor
2. select a program from list
3. press button "End Process"
4. in confirmation dialog also press "End Process"
5. selected program terminated
6. gnome-system-monitor crashes
Comment 3 Chris Kühl 2012-03-24 16:08:30 UTC
I'm on the same distro and test system-monitor inside of jhbuild without running into this crash. How are you installing this?
Comment 4 Pavel Vasin 2012-03-24 16:12:11 UTC
Installed from gnome-unstable repo and later rebuilded to get debug info.

Do you use systemd?
Comment 5 Chris Kühl 2012-03-24 16:18:19 UTC
(In reply to comment #4)
> Installed from gnome-unstable repo and later rebuilded to get debug info.
> 
> Do you use systemd?

bingo! after configuring with --enable-systemd I can recreate. Thanks. I'll look at this more closely later tonight.
Comment 6 Pavel Vasin 2012-04-02 16:46:13 UTC
Created attachment 211150 [details] [review]
proposed patch

systemd functions like sd_pid_get_unit can return NULL, so here patch to avoid dereference NULL
Comment 7 Chris Kühl 2012-04-02 18:08:55 UTC
Thanks. Please apply if you're able.
Comment 8 Pavel Vasin 2012-04-02 18:19:32 UTC
I do not have commit access.
Comment 9 Chris Kühl 2012-04-02 18:39:41 UTC
Ok, I've done it. Thanks.

Fixed in commit 65ed172b6.