mate-desktop / mate-system-monitor

Process viewer and system resource monitor for MATE
https://mate-desktop.org
GNU General Public License v2.0
45 stars 27 forks source link

system monitor using same colour line for 48 CPU cores #251

Open geraldo-netto opened 1 year ago

geraldo-netto commented 1 year ago

Expected behaviour

System monitor is expected to use a different colour for each CPU core but many CPU cores get the same colours Also, the colour picker works properly up to 32 cores, after 32, if you select a different colour from CPU core 33 onwards and apply it, it will crash system monitor

Actual behaviour

mint-sys_monit

Steps to reproduce the behaviour

1) open system monitor in a machine with more than 32 CPU cores 2) visualise the CPU graph with repeated colours for CPU cores

MATE general version

mate 1.26.0

Package version

mate system monitor 1.26.0-1

Linux Distribution

linux mint 21.1 (Vera)

Link to bugreport of your Distribution (requirement)

N/A

Crash dump

===================================================================
 Info                                                              
===================================================================
...
       Message: Process 12851 (mate-system-mon) of user 1000 dumped core.

                Found module linux-vdso.so.1 with build-id: d12a0722892fe44b2b9fb1dc28d620145337f616
                Found module libibus-1.0.so.5 with build-id: e3dae4899cdd44fe8f7e77ab5ba21e1fa4859782
                Found module im-ibus.so with build-id: 76823247c5f509589ca3b1bbf2bc8eb38c26b029
                Found module libgioremote-volume-monitor.so with build-id: 44e6ba116e23759ddad789a966ea066d4a6b6760
                Found module libdconfsettings.so with build-id: 28be9445dc37a4f123f206cda2ffc7dea558a315
                Found module libgvfscommon.so with build-id: e7fa580fb91bb21aac9fc69229e0961dc743f2b1
                Found module libgvfsdbus.so with build-id: 28abe694dac468552cc1d23d6f643e7989de85e8
                Found module libxkbfile.so.1 with build-id: b585f533dd10bd8c043f887705d4e45828baf206
                Found module libxklavier.so.16 with build-id: a581072418d786fb4a1d160ee7143bbd977025e7
                Found module libgnomekbd.so.8 with build-id: 636c4ae86d1bff2aa2cb92b39b42e41ff714ec7c
                Found module libgnomekbdui.so.8 with build-id: e01ea8bdf45e3995a2449f1cb4bd8e6bd886efa5
                Found module libxapp.so.1 with build-id: c2604faecc8b0da20c901263b5c716224cd5818e
                Found module libxapp-gtk3-module.so with build-id: a879184917c79399c48158e5c6f139cd89499ab4
                Found module libmd.so.0 with build-id: cd2d2f71b3967ebde30e2aa43b8eb63339020c06
                Found module libbsd.so.0 with build-id: 9a6c72469251e2feb63e175ef5cb944ce6e00df3
                Found module libbrotlicommon.so.1 with build-id: 43a72967cf84155914c8b3e915926733d1e57c11
                Found module libgpg-error.so.0 with build-id: 3fbec71c67bee60d8aef00697ee187079b0fb307
                Found module libpcre2-8.so.0 with build-id: 184a841c55fb7fe5e3873fcda8368c71016cd54c
                Found module libblkid.so.1 with build-id: cdf95a964e3302bb356fefc4b801fae8c4340b31
                Found module libXdmcp.so.6 with build-id: 6b60f99504aa1d3999ea02a14366d1a39d6c5dcf
                Found module libbrotlidec.so.1 with build-id: 4b1f390dd6e24d49684db8b2443d082379e8e977
                Found module libicudata.so.70 with build-id: b1c2496dd0543023c7a19c961bb7f3abc818f465
                Found module libdatrie.so.1 with build-id: 128b6874a47f2b783d9e9060d3caaee4110bfd3d
                Found module libuuid.so.1 with build-id: 64c0d0cb22fa2bdeca075a0c0418ba5ff314b220
                Found module libexpat.so.1 with build-id: d212d1f61d04a1e60fccad1a8c118428cfd9be42
                Found module libgraphite2.so.3 with build-id: 5ffbc76fc948f6b88d766a7210c2e6a329a6c278
                Found module libatspi.so.0 with build-id: 2843c68233d5ba81da3d6bc31422e49472873dba
                Found module libdbus-1.so.3 with build-id: 63e8b99215502138cb63afd6d65851a5e837ed49
                Found module libgcrypt.so.20 with build-id: 60a5e524de0ed8323edf33e9eb9127a9eee02359
                Found module libcap.so.2 with build-id: 9e11e3bca4b0a25d047cb36e933e1d727663cf8e
                Found module liblz4.so.1 with build-id: a85971851cd059f1af80d553c8e7170d42ec59a1
                Found module libzstd.so.1 with build-id: 5d9d0d946a3154a748e87e17af9d14764519237b
                Found module libpcre.so.3 with build-id: 3982f316c887e3ad9598015fa5bae8557320476a
                Found module libffi.so.8 with build-id: 59c2a6b204f74f358ca7711d2dfd349d88711f6a
                Found module libselinux.so.1 with build-id: 6fa53202ce676297de24873c886443b2759bfd8a
                Found module libmount.so.1 with build-id: eeb33f2b4b9c3eb0a29575eb9932ef08663bd836
                Found module libXrender.so.1 with build-id: 7ccbfa4c24e93c42fa50dd2e42fa277630f9650c
                Found module libxcb-render.so.0 with build-id: cb521131fd3b0f2ee6056cbc2014b3b8ef0d5c0e
                Found module libxcb.so.1 with build-id: 1bef862a339557aa16c34c7a4b27f8f3aea90517
                Found module libxcb-shm.so.0 with build-id: edb24ef4079aa423edcc50a3bb0dfb912fe8a57a
                Found module libfreetype.so.6 with build-id: bc6c65a19e6f75fea5e74a7fd6c0b91182e1a8b0
                Found module libpixman-1.so.0 with build-id: 5e936cdac032b6048d9d1a8c0bb0e4a10c86d48c
                Found module libjpeg.so.8 with build-id: c54abff9294357e28532a76a049a4cb2542fc15b
                Found module libpng16.so.16 with build-id: d58bf7c11ac793d528926238d831792b5ef792cf
                Found module ld-linux-x86-64.so.2 with build-id: 61ef896a699bb1c2e4e231642b2e1688b2f1a61e
                Found module liblzma.so.5 with build-id: b85da6c48eb60a646615392559483b93617ef265
                Found module libz.so.1 with build-id: 30840b79ac329ecbf1dec0bb60180eed256d319f
                Found module libicuuc.so.70 with build-id: bef3ff1d70aadd68aab07d858a759360c8b919ae
                Found module libthai.so.0 with build-id: afa54530349e68380815d606d15dbfda8952799f
                Found module libXext.so.6 with build-id: 9fb1880e02dfa11a8c39cd1a170109de08302059
                Found module libwayland-client.so.0 with build-id: a85980f4efa33fa5cadfbf257349fef99d499427
                Found module libwayland-egl.so.1 with build-id: e13dfac5961e8fb58c54984fe8110a73c2f5ef99
                Found module libwayland-cursor.so.0 with build-id: abcd1ab467757354ac36fd0938b82d47d7aebe1f
                Found module libxkbcommon.so.0 with build-id: a4b17d939092101dc8f6b2a1d70eaf1fddb2dd51
                Found module libXdamage.so.1 with build-id: 8358b7625700dc247fa21fb4304cba877a28bb04
                Found module libXcomposite.so.1 with build-id: 2c84db5342304ba1a76db7dd9b7a3bfaa8a716ce
                Found module libXcursor.so.1 with build-id: d936a5db46d8babb0f2cc490df36b6b18a16d8aa
                Found module libXrandr.so.2 with build-id: 069f930a2b41f3908a1a92b1a51c38bd13a559e2
                Found module libXinerama.so.1 with build-id: 9823bebfa26a681265db4aeb09abf44deec38401
                Found module libfontconfig.so.1 with build-id: 0bb435fdd5ec37178e14ea03bb36f779a4b72a94
                Found module libharfbuzz.so.0 with build-id: 3b9c495c079286b8d1f55d0937a0a771593eb7e6
                Found module libpangoft2-1.0.so.0 with build-id: fc7f13d8298f5e10fb1acbaa5472ec8b6fbf2bd9
                Found module libfribidi.so.0 with build-id: 6e075a666e1da8ffdb948d734e75d82b1b6dc0fb
                Found module libepoxy.so.0 with build-id: 5ea53a2b100e4b044eee19d5222881a724abf046
                Found module libatk-bridge-2.0.so.0 with build-id: 7e8009077fbdcd7bf094c51bf78742b96f216d73
                Found module libatk-1.0.so.0 with build-id: b93088667fbd06f6b72d273403d352e7c0554698
                Found module libXfixes.so.3 with build-id: a9c550a40b8154a3b4b5e2ac182bb50c013c3f18
                Found module libXi.so.6 with build-id: 8ff5a3ac871a90fd9d0a7917c61f748a41c6b5ee
                Found module libX11.so.6 with build-id: b8d9314a7185312e4813abcac67d8b68ae2fd690
                Found module libatkmm-1.6.so.1 with build-id: fd4e19a710a00de0c4359b06ae988fd606f5162a
                Found module libpangomm-1.4.so.1 with build-id: 7392a28f5a06ad125c179695b3741331510330d7
                Found module libcairomm-1.0.so.1 with build-id: 11f5c2097449e061d2b146ff999419fa9ca9d5a9
                Found module libgdkmm-3.0.so.1 with build-id: 4560ccdfcd1656760dfad9edeb5dbc97a0371fa1
                Found module libXau.so.6 with build-id: 7089b383cacbfc1760634a3be19a923e51fe3315
                Found module libc.so.6 with build-id: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d
                Found module libgcc_s.so.1 with build-id: 09c4935b79388431a1248f6a98e00d7dc81b8513
                Found module libm.so.6 with build-id: 27e82301dba6c3f644404d504e1bb1c97894b433
                Found module libstdc++.so.6 with build-id: f57e02bfadacc0c923c82457d5e18e1830b5faea
                Found module libsystemd.so.0 with build-id: e45f7492c0f62251620378d7224ad0371a8d1f98
                Found module libglib-2.0.so.0 with build-id: 4391c4dcc011997cd19e40aff210bbea196f2c57
                Found module libgmodule-2.0.so.0 with build-id: 0b98edffeab1f749240487745c728cbb9be665c8
                Found module libsigc-2.0.so.0 with build-id: e5769fe6e782b354e32316abb6ab11f0df1fa35d
                Found module libgobject-2.0.so.0 with build-id: 43b1771abd6810182580f3277cda8eb15f5b7cee
                Found module libglibmm-2.4.so.1 with build-id: 1578de9c248e58bed0f7cf4187a3d9808f5455e4
                Found module libgio-2.0.so.0 with build-id: 8c1eeb15cbed3d816b7f1a39f240be4b3201d51a
                Found module libgiomm-2.4.so.1 with build-id: 918b5b4c39950f4e5079fb4f8b84dd40861a9761
                Found module libcairo.so.2 with build-id: 60a39c3684e41370bd0a59ed1ecbdccf47e30069
                Found module libgdk_pixbuf-2.0.so.0 with build-id: 374b383e3b68b5d8b552519094129f401596e502
                Found module librsvg-2.so.2 with build-id: d90852732e03f74b9e1b885131f22beb1791061c
                Found module libxml2.so.2 with build-id: 1cf4a22fbe15a77baca28e9c824592b8b5d852ff
                Found module libpango-1.0.so.0 with build-id: 42c8896c53d9d22dc73ba7a78b326d61f34e4442
                Found module libpangocairo-1.0.so.0 with build-id: 65987e60b791e0eb6231575b8d5cfd33a6379b22
                Found module libcairo-gobject.so.2 with build-id: 71b5bd37d77ea1862d2ed00e9f6ead482f307db8
                Found module libgdk-3.so.0 with build-id: 97b768ef80858a79741be2492754d948989e63c6
                Found module libgtk-3.so.0 with build-id: 9a340345f5e200f42140f3cb4bacb407e91843f8
                Found module libgtkmm-3.0.so.1 with build-id: 0493b27573bb4799bbc54ebb50f0aa67f514910e
                Found module libgtop-2.0.so.11 with build-id: 2af228410c6593bc72b630ef37b99bdabf859fd8
                Found module mate-system-monitor with build-id: 6e6b2bdb7199d147a9b32f2609eaa0834b315f08
                Stack trace of thread 12851:
                #0  0x00007fef28c8fcef g_log_structured_array (libglib-2.0.so.0 + 0x5ccef)
                #1  0x00007fef28c8ffb9 g_log_default_handler (libglib-2.0.so.0 + 0x5cfb9)
                #2  0x00007fef28c9141a g_logv (libglib-2.0.so.0 + 0x5e41a)
                #3  0x00007fef28c91703 g_log (libglib-2.0.so.0 + 0x5e703)
                #4  0x00007fef28f48991 n/a (libgio-2.0.so.0 + 0xf1991)
                #5  0x00007fef28f4b5c7 g_settings_set_value (libgio-2.0.so.0 + 0xf45c7)
                #6  0x00005577c366ac39 _Z20cb_cpu_color_changedP15_GSMColorButtonPv (mate-system-monitor + 0x1fc39)
                #7  0x00007fef28d81d2f g_closure_invoke (libgobject-2.0.so.0 + 0x14d2f)
                #8  0x00007fef28d9dc36 n/a (libgobject-2.0.so.0 + 0x30c36)
                #9  0x00007fef28d9f614 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32614)
                #10 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #11 0x00005577c368a111 n/a (mate-system-monitor + 0x3f111)
                #12 0x00007fef28d81d2f g_closure_invoke (libgobject-2.0.so.0 + 0x14d2f)
                #13 0x00007fef28d9dc36 n/a (libgobject-2.0.so.0 + 0x30c36)
                #14 0x00007fef28d9f614 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32614)
                #15 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #16 0x00007fef28d9f700 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32700)
                #17 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #18 0x00007fef2a13daa0 n/a (libgtk-3.so.0 + 0x13daa0)
                #19 0x00007fef28d9f700 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32700)
                #20 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #21 0x00007fef2a13d874 n/a (libgtk-3.so.0 + 0x13d874)
                #22 0x00007fef2a3f0be5 n/a (libgtk-3.so.0 + 0x3f0be5)
                #23 0x00007fef28d9f700 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32700)
                #24 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #25 0x00007fef2a207ffc n/a (libgtk-3.so.0 + 0x207ffc)
                #26 0x00007fef28d86866 g_cclosure_marshal_VOID__BOXEDv (libgobject-2.0.so.0 + 0x19866)
                #27 0x00007fef28d9f700 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32700)
                #28 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #29 0x00007fef2a1ffacb n/a (libgtk-3.so.0 + 0x1ffacb)
                #30 0x00007fef2a20783b n/a (libgtk-3.so.0 + 0x20783b)
                #31 0x00007fef2a208443 n/a (libgtk-3.so.0 + 0x208443)
                #32 0x00007fef2a1cef90 gtk_event_controller_handle_event (libgtk-3.so.0 + 0x1cef90)
                #33 0x00007fef2a3a0045 n/a (libgtk-3.so.0 + 0x3a0045)
                #34 0x00007fef2a3e6eb8 n/a (libgtk-3.so.0 + 0x3e6eb8)
                #35 0x00007fef28d9f700 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32700)
                #36 0x00007fef28d9f863 g_signal_emit (libgobject-2.0.so.0 + 0x32863)
                #37 0x00007fef2a3ae724 n/a (libgtk-3.so.0 + 0x3ae724)
                #38 0x00007fef2a251680 n/a (libgtk-3.so.0 + 0x251680)
                #39 0x00007fef2a25252a gtk_main_do_event (libgtk-3.so.0 + 0x25252a)
                #40 0x00007fef2a932743 n/a (libgdk-3.so.0 + 0x39743)
                #41 0x00007fef2a969f56 n/a (libgdk-3.so.0 + 0x70f56)
                #42 0x00007fef28c88d3b g_main_context_dispatch (libglib-2.0.so.0 + 0x55d3b)
                #43 0x00007fef28cdd6c8 n/a (libglib-2.0.so.0 + 0xaa6c8)
                #44 0x00007fef28c863e3 g_main_context_iteration (libglib-2.0.so.0 + 0x533e3)
                #45 0x00007fef28f37fb5 g_application_run (libgio-2.0.so.0 + 0xe0fb5)
                #46 0x00005577c3667719 main (mate-system-monitor + 0x1c719)
                #47 0x00007fef28429d90 __libc_start_call_main (libc.so.6 + 0x29d90)
                #48 0x00007fef28429e40 __libc_start_main_impl (libc.so.6 + 0x29e40)
                #49 0x00005577c36681e5 _start (mate-system-monitor + 0x1d1e5)

                Stack trace of thread 12855:
                #0  0x00007fef28518d7f __GI___poll (libc.so.6 + 0x118d7f)
                #1  0x00007fef28cdd666 n/a (libglib-2.0.so.0 + 0xaa666)
                #2  0x00007fef28c882b3 g_main_loop_run (libglib-2.0.so.0 + 0x552b3)
                #3  0x00007fef28f6c07a n/a (libgio-2.0.so.0 + 0x11507a)
                #4  0x00007fef28cb7a51 n/a (libglib-2.0.so.0 + 0x84a51)
                #5  0x00007fef28494b43 start_thread (libc.so.6 + 0x94b43)
                #6  0x00007fef28526a00 __clone3 (libc.so.6 + 0x126a00)

                Stack trace of thread 12856:
                #0  0x00007fef28518d7f __GI___poll (libc.so.6 + 0x118d7f)
                #1  0x00007fef28cdd666 n/a (libglib-2.0.so.0 + 0xaa666)
                #2  0x00007fef28c863e3 g_main_context_iteration (libglib-2.0.so.0 + 0x533e3)
                #3  0x00007fef259e133d n/a (libdconfsettings.so + 0x733d)
                #4  0x00007fef28cb7a51 n/a (libglib-2.0.so.0 + 0x84a51)
                #5  0x00007fef28494b43 start_thread (libc.so.6 + 0x94b43)
                #6  0x00007fef28526a00 __clone3 (libc.so.6 + 0x126a00)

                Stack trace of thread 12854:
                #0  0x00007fef28518d7f __GI___poll (libc.so.6 + 0x118d7f)
                #1  0x00007fef28cdd666 n/a (libglib-2.0.so.0 + 0xaa666)
                #2  0x00007fef28c863e3 g_main_context_iteration (libglib-2.0.so.0 + 0x533e3)
                #3  0x00007fef28c86431 n/a (libglib-2.0.so.0 + 0x53431)
                #4  0x00007fef28cb7a51 n/a (libglib-2.0.so.0 + 0x84a51)
                #5  0x00007fef28494b43 start_thread (libc.so.6 + 0x94b43)
                #6  0x00007fef28526a00 __clone3 (libc.so.6 + 0x126a00)
===================================================================
 GDB Log                                                           
===================================================================

warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing

warning: Can't open file /home/netto/.config/dconf/user (deleted) during file-backed mapping note processing

warning: Can't open file /run/user/1000/dconf/user (deleted) during file-backed mapping note processing
[New LWP 12851]
[New LWP 12855]
[New LWP 12856]
[New LWP 12854]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mate-system-monitor'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007fef28c8fcef in g_log_structured_array () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7fef259ece00 (LWP 12851))]

===================================================================
 GDB Backtrace                                                     
===================================================================

warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing

warning: Can't open file /home/netto/.config/dconf/user (deleted) during file-backed mapping note processing

warning: Can't open file /run/user/1000/dconf/user (deleted) during file-backed mapping note processing
[New LWP 12851]
[New LWP 12855]
[New LWP 12856]
[New LWP 12854]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mate-system-monitor'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007fef28c8fcef in g_log_structured_array () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7fef259ece00 (LWP 12851))]
#0  0x00007fef28c8fcef in g_log_structured_array () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fef28c8ffb9 in g_log_default_handler () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c9141a in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef28c91703 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fef28f48991 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007fef28f4b5c7 in g_settings_set_value () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00005577c366ac39 in cb_cpu_color_changed(_GSMColorButton*, void*) ()
#7  0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00005577c368a111 in  ()
#12 0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007fef2a13daa0 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#19 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007fef2a13d874 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007fef2a3f0be5 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#23 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007fef2a207ffc in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#26 0x00007fef28d86866 in g_cclosure_marshal_VOID__BOXEDv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007fef2a1ffacb in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007fef2a20783b in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#31 0x00007fef2a208443 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#32 0x00007fef2a1cef90 in gtk_event_controller_handle_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#33 0x00007fef2a3a0045 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#34 0x00007fef2a3e6eb8 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#35 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007fef2a3ae724 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#38 0x00007fef2a251680 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#39 0x00007fef2a25252a in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#40 0x00007fef2a932743 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#41 0x00007fef2a969f56 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#42 0x00007fef28c88d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fef28cdd6c8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fef28c863e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fef28f37fb5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#46 0x00005577c3667719 in main ()

===================================================================
 GDB Backtrace (all threads)                                       
===================================================================

warning: Can't open file /SYSV00000000 (deleted) during file-backed mapping note processing

warning: Can't open file /home/netto/.config/dconf/user (deleted) during file-backed mapping note processing

warning: Can't open file /run/user/1000/dconf/user (deleted) during file-backed mapping note processing
[New LWP 12851]
[New LWP 12855]
[New LWP 12856]
[New LWP 12854]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mate-system-monitor'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007fef28c8fcef in g_log_structured_array () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7fef259ece00 (LWP 12851))]

Thread 4 (Thread 0x7fef24fff640 (LWP 12854)):
#0  0x00007fef28518d7f in __GI___poll (fds=0x5577c3862000, nfds=2, timeout=3999) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fef28cdd666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c863e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef28c86431 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fef28cb7a51 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fef28494b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140722755131408, -2660132571860211132, 140665094665792, 0, 140665149802576, 140722755131760, 2651219930343762500, 2651246991502305860}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fef28526a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7fef1f7fe640 (LWP 12856)):
#0  0x00007fef28518d7f in __GI___poll (fds=0x5577c3930750, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fef28cdd666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c863e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef259e133d in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007fef28cb7a51 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fef28494b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140722755133200, -2660132571860211132, 140665002387008, 17, 140665149802576, 140722755133552, 2651337577551063620, 2651246991502305860}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fef28526a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7fef1ffff640 (LWP 12855)):
#0  0x00007fef28518d7f in __GI___poll (fds=0x5577c38722f0, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
#1  0x00007fef28cdd666 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c882b3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef28f6c07a in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fef28cb7a51 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fef28494b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140722755131696, -2660132571860211132, 140665010779712, 11, 140665149802576, 140722755132048, 2651336478576306756, 2651246991502305860}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#6  0x00007fef28526a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7fef259ece00 (LWP 12851)):
#0  0x00007fef28c8fcef in g_log_structured_array () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fef28c8ffb9 in g_log_default_handler () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c9141a in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef28c91703 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fef28f48991 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007fef28f4b5c7 in g_settings_set_value () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00005577c366ac39 in cb_cpu_color_changed(_GSMColorButton*, void*) ()
#7  0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00005577c368a111 in  ()
#12 0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007fef2a13daa0 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#19 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007fef2a13d874 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007fef2a3f0be5 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#23 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007fef2a207ffc in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#26 0x00007fef28d86866 in g_cclosure_marshal_VOID__BOXEDv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007fef2a1ffacb in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007fef2a20783b in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#31 0x00007fef2a208443 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#32 0x00007fef2a1cef90 in gtk_event_controller_handle_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#33 0x00007fef2a3a0045 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#34 0x00007fef2a3e6eb8 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#35 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007fef2a3ae724 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#38 0x00007fef2a251680 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#39 0x00007fef2a25252a in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#40 0x00007fef2a932743 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#41 0x00007fef2a969f56 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#42 0x00007fef28c88d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fef28cdd6c8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fef28c863e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fef28f37fb5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#46 0x00005577c3667719 in main ()
#0  0x00007fef28c8fcef in g_log_structured_array () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fef28c8ffb9 in g_log_default_handler () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fef28c9141a in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fef28c91703 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fef28f48991 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007fef28f4b5c7 in g_settings_set_value () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00005577c366ac39 in cb_cpu_color_changed(_GSMColorButton*, void*) ()
#7  0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00005577c368a111 in  ()
#12 0x00007fef28d81d2f in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007fef28d9dc36 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007fef28d9f614 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007fef2a13daa0 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#19 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007fef2a13d874 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007fef2a3f0be5 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#23 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007fef2a207ffc in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#26 0x00007fef28d86866 in g_cclosure_marshal_VOID__BOXEDv () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007fef2a1ffacb in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007fef2a20783b in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#31 0x00007fef2a208443 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#32 0x00007fef2a1cef90 in gtk_event_controller_handle_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#33 0x00007fef2a3a0045 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#34 0x00007fef2a3e6eb8 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#35 0x00007fef28d9f700 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007fef28d9f863 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007fef2a3ae724 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#38 0x00007fef2a251680 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#39 0x00007fef2a25252a in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#40 0x00007fef2a932743 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#41 0x00007fef2a969f56 in  () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#42 0x00007fef28c88d3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fef28cdd6c8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fef28c863e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fef28f37fb5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#46 0x00005577c3667719 in main ()
lukefromdc commented 1 year ago

32 is a power of two, so I am wondering if we are storing something in a fixed length variable ( 5 bytes maybe?) related to this and overflowing it with more than 32 cores. Keep in mind, when this code was first written, a big server board with two or maybe four sockets with single-core CPU's (maybe hyperthreaded) would have been the maximum anyone ever saw.

geraldo-netto commented 1 year ago

Hi @lukefromdc ,

Indeed you're right Also, I was trying to play around with it and noticed the same fix applied in [1] works:

...
    <key name="cpu-color32" type="s">
      <default>'#069999'</default>
      <summary>Default graph CPU color</summary>
    </key>
...
    <key name="cpu-color47" type="s">
      <default>'#369999'</default>
      <summary>Default graph CPU color</summary>
    </key>
...

[1] https://github.com/mate-desktop/mate-system-monitor/pull/147/files

lukefromdc commented 1 year ago

This shows we were simply running out of individually specified gsettings keys. I could see trying to store a gsettings value that does not exist being enough to attempt a write to RAM that has not been allocated, which would be a segfault.

This layout of the program was fine for when only a few cores ever existed but now means we will have to keep growing the list of gsettings keys. For now we should do that as it's the simplest fix with the least potential for regressions. If we ever have to increase 48 to 64 or 96 keys though it becomes a lot of work (once each time) and rather a lot of RAM to hold separate gsettings keys. Not sure a better way exists, we'd need a struct holding one color value per core number, and allocated at startup to the number of cores present on the machine to optimize this sort of thing. Might be easier to just keep growing org.mate.system-monitor.gschema.xml.in as we know that works and won't create new bugs

geraldo-netto commented 1 year ago

@lukefromdc ,

shall I preper a patch for org.mate.system-monitor.gschema.xml.in containing 64 entries? My understanding is that colours are on rgba format, right? (never touched this code nor gtk) Do we have any guideline on colours? Also, I wonder if it would make any sense recreate all colours for all 64 entries because we don't want to have duplicates Maybe for the future, we could consider grouping CPU cores and/or socket (if there are too many) using geometric mean?

lukefromdc commented 1 year ago

Proceed with it, simply match the format of the preceding entries. These are RGB not RGBA colors, you can see them in https://github.com/mate-desktop/mate-system-monitor/pull/147/files where the default for higher numbers of core (but only up to 32) was set to #339999

I don't have anything w more than 12 threads so cannot test for function, not sure if anyone on the team does. Thus I can check that it does not create a problem on a smaller machine but will have to rely on you to check the higher number cores

geraldo-netto commented 1 year ago

Uhm... I have update the xml and still sigtrapping...

(mate-system-monitor:1092987): GLib-GIO-ERROR **: 13:36:35.041: Settings schema 'org.mate.system-monitor' does not contain a key named 'cpu-color42'
Trace/breakpoint trap (core dumped)

The XML ():

    <key name="cpu-color0" type="s">
      <default>'#FF6E00'</default>
      <summary>Default graph CPU color</summary>
    </key>
    ...
    <key name="cpu-color31" type="s">
      <default>'#339999'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color32" type="s">
      <default>'#180808'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color33" type="s">
      <default>'#301818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color34" type="s">
      <default>'#781818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color35" type="s">
      <default>'#901818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color36" type="s">
      <default>'#A81818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color37" type="s">
      <default>'#C01818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color38" type="s">
      <default>'#D81818'</default>
      <summary>Default graph cpu color</summary>
    </key>
    <key name="cpu-color39" type="s">
      <default>'#F01818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color40" type="s">
      <default>'#FFCC00'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color41" type="s">
      <default>'#009900'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color42" type="s">
      <default>'#CC6600'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color43" type="s">
      <default>'#330099'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color44" type="s">
      <default>'#CC0066'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color45" type="s">
      <default>'#00FFCC'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color46" type="s">
      <default>'#FFCC99'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color47" type="s">
      <default>'#339999'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color48" type="s">
      <default>'#A83018'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color49" type="s">
      <default>'#A84818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color50" type="s">
      <default>'#A86018'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color51" type="s">
      <default>'#A87818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color52" type="s">
      <default>'#A8A818'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color53" type="s">
      <default>'#A8C018'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color54" type="s">
      <default>'#A8E018'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color55" type="s">
      <default>'#A8F018'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color56" type="s">
      <default>'#A8A820'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color57" type="s">
      <default>'#A8A840'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color58" type="s">
      <default>'#A8A860'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color59" type="s">
      <default>'#A8A880'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color60" type="s">
      <default>'#A8A8A0'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color61" type="s">
      <default>'#A8A8C0'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color62" type="s">
      <default>'#A8A8E0'</default>
      <summary>Default graph CPU color</summary>
    </key>
    <key name="cpu-color63" type="s">
      <default>'#A8A8FE'</default>
      <summary>Default graph CPU color</summary>
    </key>

Another thing is that, it seems better to use 24px for a lot of cores

// file interface.cpp
static void
create_sys_view (ProcData *procdata, GtkBuilder * builder)
{
   ...
   gtk_box_pack_start (GTK_BOX (temp_hbox), color_picker, FALSE, TRUE, 0);
   if (procdata->config.num_cpus > 15) {
      gtk_widget_set_size_request(GTK_WIDGET(color_picker), 32, -1);
   } else {
      // reduces color box in order to fit more CPU cores
      gtk_widget_set_size_request(GTK_WIDGET(color_picker), 24, -1);
   }

   // removed the check for single CPU, just let it enumerate for many cores
   label_text = g_strdup_printf (_("CPU%d"), i+1);
   ...
}

Before changing pixel size: before

After changing pixel size: after

lukefromdc commented 1 year ago

That suggests we are indeed overflowing a fixed length variable somewhere, and that in turn could mean a buffer overflow attack becomes possible on a multiuser system with enough cores with MATE installed: invoke mate-system-monitor from a specially crafted script, then bring up the CPU use display and watch it crash back to the terminal-and trigger your overflow attack. Never done this so I don't know what you'd have to do in terminal but segfaults on too much data are a known vulnerability.