Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicator crashes occasionally #366

Open
aleksandar-stefanovic opened this issue Dec 9, 2023 · 4 comments
Open

Indicator crashes occasionally #366

aleksandar-stefanovic opened this issue Dec 9, 2023 · 4 comments

Comments

@aleksandar-stefanovic
Copy link

Running on elementary OS 7.1.

Indicator occasionally closes on its own, and I can't stably reproduce it, but it seems to me that it's more frequent when there is a lot of CPU load.

I can help reproduce and log this issue (and even fix it if the bug is obvious), but I'm not sure where to start with collecting logs (the last statement of README just logs a couple of lines and then returns, it doesn't keep logging), especially if the wingpanel indicator has its own separate logs somewhere.

@stsdc
Copy link
Member

stsdc commented Dec 9, 2023

Hi,

G_MESSAGES_DEBUG=all GTK_DEBUG=interactive com.github.stsdc.monitor is for the app only.
To see what indicator logs, you have to kill Wingpanel and restart it. killall io.elementary.wingpanel && io.elementary.wingpanel - since Wingpanel restarts itself, you have to immediately run it after killing.

If you want print some values you can use print("%d", cpu_percentage); Here are some docs regarding DBus.

Also please remember, to see changes you made to the Indicator, you have to restart the Wingpanel.

Here are example logs:
image

@stsdc
Copy link
Member

stsdc commented Dec 9, 2023

Indicator watches for the app to appear on DBus and only then reveals itself. So maybe it's the app that is crushing?

@davidak
Copy link

davidak commented Mar 7, 2024

I have the situation that monitor crashes regularly on one of my systems. It seem to happen under high CPU load (100%).

I started it with G_MESSAGES_DEBUG=all GTK_DEBUG=interactive com.github.stsdc.moni and got:

...
** (com.github.stsdc.monitor:276076): CRITICAL **: 17:36:23.675: monitor_igpu_get_temperature: assertion 'self != NULL' failed
malloc(): unaligned tcache chunk detected
Aborted (core dumped)

The coredump with stack trace looks like this:

[root@X230:~]# coredumpctl info
           PID: 276076 (.com.github.sts)
           UID: 1000 (davidak)
           GID: 100 (users)
        Signal: 6 (ABRT)
     Timestamp: Thu 2024-03-07 17:36:23 CET (2min 50s ago)
  Command Line: com.github.stsdc.monitor
    Executable: /nix/store/ibbqqyfxc2qzx6q158j4k0crbfxprj8n-monitor-0.17.0/bin/.com.github.stsdc.monitor-wrapped
 Control Group: /user.slice/user-1000.slice/session-5.scope
          Unit: session-5.scope
         Slice: user-1000.slice
       Session: 5
     Owner UID: 1000 (davidak)
       Boot ID: 37ab0efe15754760a59c7a8352b05e99
    Machine ID: b8781c43275e4719a76ba46fb15b92cb
      Hostname: X230
       Storage: /var/lib/systemd/coredump/core.\x2ecom\x2egithub\x2ests.1000.37ab0efe15754760a59c7a8352b05e99.276076.1709829383000000.zst (present)
  Size on Disk: 5.4M
       Message: Process 276076 (.com.github.sts) of user 1000 dumped core.
                
                Module libpciaccess.so.0 without build-id.
                Module libncursesw.so.6 without build-id.
                Module libstdc++.so.6 without build-id.
                Module libdrm_intel.so.1 without build-id.
                Module libdrm_nouveau.so.2 without build-id.
                Module libdrm_amdgpu.so.1 without build-id.
                Module libelf.so.0 without build-id.
                Module libdrm_radeon.so.1 without build-id.
                Module libsensors.so.5 without build-id.
                Module libxcb-xfixes.so.0 without build-id.
                Module libxcb-sync.so.1 without build-id.
                Module libxcb-present.so.0 without build-id.
                Module libxcb-dri3.so.0 without build-id.
                Module libxcb-randr.so.0 without build-id.
                Module libxshmfence.so.1 without build-id.
                Module libXxf86vm.so.1 without build-id.
                Module libxcb-dri2.so.0 without build-id.
                Module libxcb-glx.so.0 without build-id.
                Module libdrm.so.2 without build-id.
                Module libGLdispatch.so.0 without build-id.
                Module libGLX.so.0 without build-id.
                Module libGL.so.1 without build-id.
                Module libgcc_s.so.1 without build-id.
                Module librsvg-2.so.2 without build-id.
                Module libpixbufloader-svg.so without build-id.
                Module libdconfsettings.so without build-id.
                Module libattr.so.1 without build-id.
                Module libdatrie.so.1 without build-id.
                Module libbrotlicommon.so.1 without build-id.
                Module libkeyutils.so.1 without build-id.
                Module libkrb5support.so.0 without build-id.
                Module libcom_err.so.3 without build-id.
                Module libk5crypto.so.3 without build-id.
                Module libkrb5.so.3 without build-id.
                Module libunistring.so.5 without build-id.
                Module liblz4.so.1 without build-id.
                Module libgcrypt.so.20 without build-id.
                Module libcap.so.2 without build-id.
                Module libgpg-error.so.0 without build-id.
                Module libassuan.so.0 without build-id.
                Module liblzma.so.5 without build-id.
                Module libacl.so.1 without build-id.
                Module libXdmcp.so.6 without build-id.
                Module libX11-xcb.so.1 without build-id.
                Module libxcb-util.so.1 without build-id.
                Module libpcre.so.1 without build-id.
                Module libdbus-1.so.3 without build-id.
                Module libatspi.so.0 without build-id.
                Module libexpat.so.1 without build-id.
                Module libbz2.so.1 without build-id.
                Module libgraphite2.so.3 without build-id.
                Module libthai.so.0 without build-id.
                Module libxcb-shm.so.0 without build-id.
                Module libxcb-render.so.0 without build-id.
                Module libfreetype.so.6 without build-id.
                Module libbrotlidec.so.1 without build-id.
                Module libgssapi_krb5.so.2 without build-id.
                Module libssh2.so.1 without build-id.
                Module libidn2.so.0 without build-id.
                Module libnghttp2.so.14 without build-id.
                Module libostree-1.so.1 without build-id.
                Module libxml2.so.2 without build-id.
                Module libXau.so.6 without build-id.
                Module libsystemd.so.0 without build-id.
                Module libpolkit-gobject-1.so.0 without build-id.
                Module libpolkit-agent-1.so.0 without build-id.
                Module libseccomp.so.2 without build-id.
                Module libgpgme.so.11 without build-id.
                Module libdconf.so.1 without build-id.
                Module libzstd.so.1 without build-id.
                Module libarchive.so.13 without build-id.
                Module libxcb.so.1 without build-id.
                Module libXRes.so.1 without build-id.
                Module libstartup-notification-1.so.0 without build-id.
                Module libXrender.so.1 without build-id.
                Module libpcre2-8.so.0 without build-id.
                Module libffi.so.8 without build-id.
                Module libselinux.so.1 without build-id.
                Module libz.so.1 without build-id.
                Module libjpeg.so.62 without build-id.
                Module libpng16.so.16 without build-id.
                Module libXinerama.so.1 without build-id.
                Module libXrandr.so.2 without build-id.
                Module libXcomposite.so.1 without build-id.
                Module libXdamage.so.1 without build-id.
                Module libXcursor.so.1 without build-id.
                Module libxkbcommon.so.0 without build-id.
                Module libXfixes.so.3 without build-id.
                Module libtracker-sparql-3.0.so.0 without build-id.
                Module libatk-bridge-2.0.so.0 without build-id.
                Module libXi.so.6 without build-id.
                Module libepoxy.so.0 without build-id.
                Module libatk-1.0.so.0 without build-id.
                Module libfribidi.so.0 without build-id.
                Module libfontconfig.so.1 without build-id.
                Module libpangoft2-1.0.so.0 without build-id.
                Module libharfbuzz.so.0 without build-id.
                Module libpangocairo-1.0.so.0 without build-id.
                Module libpango-1.0.so.0 without build-id.
                Module libXext.so.6 without build-id.
                Module libflatpak.so.0 without build-id.
                Module libjson-glib-1.0.so.0 without build-id.
                Module libudisks2.so.0 without build-id.
                Module libX11.so.6 without build-id.
                Module libhandy-1.so.0 without build-id.
                Module libwnck-3.so.0 without build-id.
                Module libgtop-2.0.so.11 without build-id.
                Module libgee-0.8.so.2 without build-id.
                Module libgranite.so.6 without build-id.
                Module liblivechart.so without build-id.
                Module .com.github.stsdc.monitor-wrapped without build-id.
                Stack trace of thread 276076:
                #0  0x00007fcfd12fed7c __pthread_kill_implementation (libc.so.6 + 0x8cd7c)
                #1  0x00007fcfd12af9c6 raise (libc.so.6 + 0x3d9c6)
                #2  0x00007fcfd12988fa abort (libc.so.6 + 0x268fa)
                #3  0x00007fcfd1299767 __libc_message.cold (libc.so.6 + 0x27767)
                #4  0x00007fcfd1308a45 malloc_printerr (libc.so.6 + 0x96a45)
                #5  0x00007fcfd130cf0c __libc_malloc (libc.so.6 + 0x9af0c)
                #6  0x00007fcfd09a8789 pcre2_compile_8 (libpcre2-8.so.0 + 0xe789)
                #7  0x00007fcfd1a2fdc0 regex_compile (libglib-2.0.so.0 + 0x74dc0)
                #8  0x00007fcfd1a3083b g_regex_new (libglib-2.0.so.0 + 0x7583b)
                #9  0x000000000042ad1a monitor_process_parse_stat (.com.github.stsdc.monitor-wrapped + 0x2ad1a)
                #10 0x000000000042bb41 monitor_process_update (.com.github.stsdc.monitor-wrapped + 0x2bb41)
                #11 0x0000000000429de4 monitor_process_manager_update_processes (.com.github.stsdc.monitor-wrapped + 0x29de4)
                #12 0x0000000000412fde ___lambda19__gsource_func (.com.github.stsdc.monitor-wrapped + 0x12fde)
                #13 0x00007fcfd1a15f8b g_main_dispatch (libglib-2.0.so.0 + 0x5af8b)
                #14 0x00007fcfd1a18ff7 g_main_context_iterate_unlocked.constprop.0 (libglib-2.0.so.0 + 0x5dff7)
                #15 0x00007fcfd1a195cc g_main_context_iteration (libglib-2.0.so.0 + 0x5e5cc)
                #16 0x00007fcfd1beccfd g_application_run (libgio-2.0.so.0 + 0xe8cfd)
                #17 0x000000000040f7d7 main (.com.github.stsdc.monitor-wrapped + 0xf7d7)
                #18 0x00007fcfd1299fce __libc_start_call_main (libc.so.6 + 0x27fce)
                #19 0x00007fcfd129a089 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x28089)
                #20 0x000000000040f845 _start (.com.github.stsdc.monitor-wrapped + 0xf845)
                
                Stack trace of thread 276077:
                #0  0x00007fcfd137d63d syscall (libc.so.6 + 0x10b63d)
                #1  0x00007fcfd1a734c0 g_cond_wait (libglib-2.0.so.0 + 0xb84c0)
                #2  0x00007fcfd19e314b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x2814b)
                #3  0x00007fcfd1a46312 g_thread_pool_spawn_thread (libglib-2.0.so.0 + 0x8b312)
                #4  0x00007fcfd1a45ccd g_thread_proxy (libglib-2.0.so.0 + 0x8accd)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                
                Stack trace of thread 276086:
                #0  0x00007fcfd137d63d syscall (libc.so.6 + 0x10b63d)
                #1  0x00007fcfd1a7366c g_cond_wait_until (libglib-2.0.so.0 + 0xb866c)
                #2  0x00007fcfd19e3121 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x28121)
                #3  0x00007fcfd1a46672 g_thread_pool_thread_proxy (libglib-2.0.so.0 + 0x8b672)
                #4  0x00007fcfd1a45ccd g_thread_proxy (libglib-2.0.so.0 + 0x8accd)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                
                Stack trace of thread 276078:
                #0  0x00007fcfd1371d8f __poll (libc.so.6 + 0xffd8f)
                #1  0x00007fcfd1a18f97 g_main_context_iterate_unlocked.constprop.0 (libglib-2.0.so.0 + 0x5df97)
                #2  0x00007fcfd1a195cc g_main_context_iteration (libglib-2.0.so.0 + 0x5e5cc)
                #3  0x00007fcfd1a19611 glib_worker_main (libglib-2.0.so.0 + 0x5e611)
                #4  0x00007fcfd1a45ccd g_thread_proxy (libglib-2.0.so.0 + 0x8accd)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                
                Stack trace of thread 276091:
                #0  0x00007fcfd12f9c96 __futex_abstimed_wait_common (libc.so.6 + 0x87c96)
                #1  0x00007fcfd12fc488 pthread_cond_wait@@GLIBC_2.3.2 (libc.so.6 + 0x8a488)
                #2  0x00007fcfacb0f289 cnd_wait (crocus_dri.so + 0x10f289)
                #3  0x00007fcfacac334b util_queue_thread_func (crocus_dri.so + 0xc334b)
                #4  0x00007fcfacb0f1c7 impl_thrd_routine (crocus_dri.so + 0x10f1c7)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                
                Stack trace of thread 276079:
                #0  0x00007fcfd1371d8f __poll (libc.so.6 + 0xffd8f)
                #1  0x00007fcfd1a18f97 g_main_context_iterate_unlocked.constprop.0 (libglib-2.0.so.0 + 0x5df97)
                #2  0x00007fcfd1a195cc g_main_context_iteration (libglib-2.0.so.0 + 0x5e5cc)
                #3  0x00007fcfcefc889d dconf_gdbus_worker_thread (libdconfsettings.so + 0xb89d)
                #4  0x00007fcfd1a45ccd g_thread_proxy (libglib-2.0.so.0 + 0x8accd)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                
                Stack trace of thread 276080:
                #0  0x00007fcfd1371d8f __poll (libc.so.6 + 0xffd8f)
                #1  0x00007fcfd1a18f97 g_main_context_iterate_unlocked.constprop.0 (libglib-2.0.so.0 + 0x5df97)
                #2  0x00007fcfd1a197ef g_main_loop_run (libglib-2.0.so.0 + 0x5e7ef)
                #3  0x00007fcfd1c29586 gdbus_shared_thread_func (libgio-2.0.so.0 + 0x125586)
                #4  0x00007fcfd1a45ccd g_thread_proxy (libglib-2.0.so.0 + 0x8accd)
                #5  0x00007fcfd12fd084 start_thread (libc.so.6 + 0x8b084)
                #6  0x00007fcfd137f60c __clone3 (libc.so.6 + 0x10d60c)
                ELF object binary architecture: AMD x86-64

Is that helpful?

You might be able to reproduce it by creating load using stress-ng. I'm able to reproduce it by playing 6 youtube video at the same time. Other systems should be able to handle that.

Here the situation when the crash happened: https://youtu.be/gQRpygZcBB0?si=9w0IuGfiObkCylqr&t=158

This seem to be a bug in monitor since other programs don't crash in such situations and it would be helpful to have it for debugging.

@stsdc
Copy link
Member

stsdc commented Mar 8, 2024

In stack trace it mentions Process.parse_stat () while using regex on stat file. But Monitor log shows get_temperature from IGPU, which shouldn't run at all since this is discrete Intel GPU. 🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants