alexmurray / indicator-sensors

72 stars 11 forks source link

Constantly crash on Ubuntu 23.04 #43

Open vitali-fridman opened 1 year ago

vitali-fridman commented 1 year ago

The program constantly crash on multiple systems with Ubuntu 23.04. The systems in question have very different hardware, so this is not hardware but OS version specific. The program my work for a number of minutes (5-10 typically) but invariable crash.

alexmurray commented 1 year ago

Thanks for reporting this issue. Can you please provide any more details? How did you install indicator-sensors (apt or snap), which version did you install? Can you try running it from a terminal and see what output it provides? Can you also try running it from a terminal with the --verbose option and then capturing that output until it crashes? Thanks.

vitali-fridman commented 1 year ago

Hi Alex,

Thanks for getting back so quickly. I always install it as snap from the Ubuntu snap store and it always worked great, until I updated my computers to Ubuntu 23.04. The UI indicates version 1.3. I have not tried running it from the terminal before, so I'm doing it now, with --verbose flag. I will run it this way on a few different boxes and will let you know tomorrow if it crashes and what's in the logs.

Thanks again, Vitali

On Wed, May 31, 2023 at 6:01 PM Alex Murray @.***> wrote:

Thanks for reporting this issue. Can you please provide any more details? How did you install indicator-sensors (apt or snap), which version did you install? Can you try running it from a terminal and see what output it provides? Can you also try running it from a terminal with the --verbose option and then capturing that output until it crashes? Thanks.

— Reply to this email directly, view it on GitHub https://github.com/alexmurray/indicator-sensors/issues/43#issuecomment-1571161517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGM3AUNKU73QGZV3SG7YETXI7SVPANCNFSM6AAAAAAYWGHI4M . You are receiving this because you authored the thread.Message ID: @.***>

vitali-fridman commented 1 year ago

Hi Alex,

I'm running from terminal in verbose mode on four very different machines and it seems that it does not crash in this case. I looked at the system log when it was crashing and I see entries like this:

indicator-senso[3439]: segfault at 7f03504a32d9 ip 00007f04ae8ed5a1 sp 00007ffea46a2d88 error 4 in libgobject-2.0.so.0.7600.1[7f04ae8c3000+34000] likely on CPU 37 (core 37, socket 0)

3439 is pid of indicator-sensors process.

And also like this:

gnome-shell[3134]: Received error from D-Bus search provider indicator-sensors.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
2023-05-28T12:09:12.127902-07:00 donnager3 gnome-shell[3134]: Received error from D-Bus search provider indicator-sensors.desktop during GetResultMetas: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

Hope this helps, Vitali

vitali-fridman commented 1 year ago

I checked all four computers and application did not crash running overnight. It appears it has something to do running from terminal or not.

vitali-fridman commented 1 year ago

I just now realized that it appears to be crashing when I open another gnome application. Not sure 100% but that may be related.

vitali-fridman commented 1 year ago

I was correct. The application crashed when another gnome application starts. This is what happened:

indicator-sensors --verbose 1>sensors-out.txt 
Segmentation fault (core dumped)

Nothing interesting in verbose log:

[dynamic] DEBUG: Got existing rate data for sensor: Tctl - rate: 0.000000, last_value 54.000000, last_time 59924690937
[dynamic] DEBUG: abs rate of change of sensor Tctl: 0.356548 (t0: 55.875000, t-1: 54.000000, dv: 1.875000, dt: 5.258757)
[dynamic] DEBUG: EWMA abs rate of change of sensor Tctl: 0.071310 
[dynamic] MESSAGE: New highest EWMA rate sensor: Tctl (rate 0.071310)
indicator-sensors --verbose 1>sensors-out.txt 
Segmentation fault (core dumped)
[dbus] DEBUG: GetInitialResultSet() called with d
alexmurray commented 1 year ago

Thanks for the updated details - I wonder if perhaps it is crashing in the dbus plugin - can you try disabling this in the Preferences and see if that helps? Also can you try running the version from the edge channel and see if this resolves the issues?

sudo snap refresh indicator-sensors --edge

alexmurray commented 1 year ago

So looking at the above - I notice the output says GetInitialResultSet() which is a method provided for the gnome-shell search provider - but as far as I know snapd does not support exposing these to gnome-shell yet in any way - so I wonder if perhaps you have either manually compiled and installed indicator-sensors before, OR if you also have the deb of it installed, such that the gnome-shell search provider stuff is actually hooked up to the snap?

My suspicion here is that gnome-shell has perhaps changed the search provider API and we are not handling it properly anymore.

vitali-fridman commented 1 year ago

I reinstalled it from edge channel (version 1.4). So far so good, it does not seems to crash when other gui app starts. I will update my other systems and will keep you updated. And I never compiled it myself or installed from deb, only use snap.

alexmurray commented 1 year ago

Thanks for letting me know - I don't have a lot of time to look into this further at the moment but for now I have promoted the edge snap to stable and will try look at this more over the weekend. FWIW I was able to reproduce it with the 1.3 deb version in Ubuntu 23.04 but the backtrace wasn't very useful, and neither was valgrind:

$ gdb /usr/bin/indicator-sensors 
GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/indicator-sensors...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Reading symbols from /home/amurray/.cache/debuginfod_client/53d70b5214ed1c7f21331de50ccefaf9140f251c/debuginfo...
(gdb) r                                                                                    
Starting program: /usr/bin/indicator-sensors 
[Thread debugging using libthread_db enabled]                                              
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff59ff6c0 (LWP 53161)]                                                    
[New Thread 0x7fffeffff6c0 (LWP 53162)]
[New Thread 0x7ffff51fe6c0 (LWP 53163)]
[New Thread 0x7ffff49fd6c0 (LWP 53164)]                                                    
[New Thread 0x7fffef7fe6c0 (LWP 53165)]
[New Thread 0x7fffeec3d6c0 (LWP 53166)]                                                    
[Detaching after fork from child process 53167]
[aticonfig] WARNING: Error calling aticonfig to detect if running on a hybrid system with integrated GPU active: Failed to execute child process “aticonfig” (No such file or directory)
[libsensors] WARNING: could not get value for input feature of sensor 'thinkpad-isa-0000': Can't read [-3]
[libsensors] WARNING: could not get value for input feature of sensor 'thinkpad-isa-0000': Can't read [-3]
[libsensors] WARNING: could not get value for input feature of sensor 'iwlwifi_1-virtual-0': Can't read [-3]
[Thread 0x7fffeec3d6c0 (LWP 53166) exited]

Thread 1 "indicator-senso" received signal SIGSEGV, Segmentation fault.
g_type_check_instance_is_fundamentally_a (type_instance=0x7fffe4350550, 
    fundamental_type=0x50) at ../../../gobject/gtype.c:4166
4166      node = lookup_type_node_I (type_instance->g_class->g_type);    
(gdb) bt full
#0  g_type_check_instance_is_fundamentally_a (type_instance=0x7fffe4350550, fundamental_type=0x50) at ../../../gobject/gtype.c:4166
        node = <optimised out>
#1  0x00007ffff7ecdc6d in g_object_unref (_object=0x7fffe4350550) at ../../../gobject/gobject.c:3807
        _g_boolean_var_133 = <optimised out>
        object = 0x7fffe4350550
        old_ref = <optimised out>
        __func__ = "g_object_unref"
#2  0x00007ffff7337f6d in g_source_callback_unref (cb_data=0x7fffe0005b40) at ../../../glib/gmain.c:1742
        callback = 0x7fffe0005b40
#3  g_source_callback_unref (cb_data=0x7fffe0005b40) at ../../../glib/gmain.c:1735
        callback = 0x7fffe0005b40
#4  0x00007ffff733f92f in g_source_destroy_internal (source=0x7fffe42febc0, context=0x555555597060, have_lock=1) at ../../../glib/gmain.c:1407
        tmp_list = <optimised out>
        old_cb_data = 0x7fffe0005b40
        old_cb_funcs = 0x7ffff742c380 <g_source_callback_funcs>
#5  0x00007ffff7342400 in g_main_dispatch (context=0x555555597060) at ../../../glib/gmain.c:3490
        dispatch = <optimised out>
        prev_source = <optimised out>
        begin_time_nsec = 0
        was_in_call = 0
        user_data = 0x7fffe4350550
        callback = 0x7ffff75328d0 <call_in_idle_cb>
        cb_funcs = <optimised out>
        cb_data = <optimised out>
        need_destroy = <optimised out>
        source = 0x7fffe42febc0
        current = 0x555555597290
        i = 0
#6  g_main_context_dispatch (context=0x555555597060) at ../../../glib/gmain.c:4200
#7  0x00007ffff739d178 in g_main_context_iterate.constprop.0 (context=0x555555597060, block=<optimised out>, dispatch=1, self=<optimised out>) at ../../../glib/gmain.c:4276
        max_priority = 2147483647
        timeout = 5582
        some_ready = 1
        nfds = <optimised out>
        allocated_nfds = 3
        fds = 0x5555558201a0
#8  0x00007ffff7341bdf in g_main_loop_run (loop=0x5555558203a0) at ../../../glib/gmain.c:4479
        __func__ = "g_main_loop_run"
#9  0x00007ffff77f54bd in gtk_main () at ../../../gtk/gtkmain.c:1329
        loop = 0x5555558203a0
#10 0x000055555555d6c7 in main (argc=<optimised out>, argv=<optimised out>) at ./indicator-sensors/indicator-sensors.c:226
        context = <optimised out>
        application = 0x55555575f9e0
        scale = IS_TEMPERATURE_SENSOR_SCALE_CELSIUS
        show_indicator = <optimised out>
        settings = <optimised out>
        manager = <optimised out>
        plugin_dir = <optimised out>
        engine = <optimised out>
        set = <optimised out>
        error = 0x0
        locale_dir = <optimised out>
        sensors = 0x55555581f8d0 = {0x55555581f8f0}
[amurray:~] 130 $ valgrind /usr/bin/indicator-sensors 
==52699== Memcheck, a memory error detector
==52699== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==52699== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==52699== Command: /usr/bin/indicator-sensors
==52699== 
==52861== 
==52861== HEAP SUMMARY:
==52861==     in use at exit: 2,832,771 bytes in 32,099 blocks
==52861==   total heap usage: 355,178 allocs, 323,079 frees, 29,817,723 bytes allocated
==52861== 
==52861== LEAK SUMMARY:
==52861==    definitely lost: 415 bytes in 11 blocks
==52861==    indirectly lost: 674 bytes in 14 blocks
==52861==      possibly lost: 1,224 bytes in 22 blocks
==52861==    still reachable: 2,637,762 bytes in 30,441 blocks
==52861==         suppressed: 0 bytes in 0 blocks
==52861== Rerun with --leak-check=full to see details of leaked memory
==52861== 
==52861== For lists of detected and suppressed errors, rerun with: -s
==52861== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[aticonfig] WARNING: Error calling aticonfig to detect if running on a hybrid system with integrated GPU active: Failed to execute child process “aticonfig” (No such file or directory)
[libsensors] WARNING: could not get value for input feature of sensor 'thinkpad-isa-0000': Can't read [-3]
[libsensors] WARNING: could not get value for input feature of sensor 'thinkpad-isa-0000': Can't read [-3]
[libsensors] WARNING: could not get value for input feature of sensor 'iwlwifi_1-virtual-0': Can't read [-3]
==52699== Invalid read of size 8
==52699==    at 0x52E5599: g_type_check_instance_is_fundamentally_a (gtype.c:4164)
==52699==    by 0x52CEC6C: g_object_unref (gobject.c:3807)
==52699==    by 0x535DF6C: UnknownInlinedFun (gmain.c:1742)
==52699==    by 0x535DF6C: g_source_callback_unref (gmain.c:1735)
==52699==    by 0x536592E: g_source_destroy_internal (gmain.c:1407)
==52699==    by 0x53683FF: UnknownInlinedFun (gmain.c:3490)
==52699==    by 0x53683FF: g_main_context_dispatch (gmain.c:4200)
==52699==    by 0x53C3177: g_main_context_iterate.constprop.0 (gmain.c:4276)
==52699==    by 0x5367BDE: g_main_loop_run (gmain.c:4479)
==52699==    by 0x4A834BC: gtk_main (gtkmain.c:1329)
==52699==    by 0x1116C6: main (indicator-sensors.c:226)
==52699==  Address 0xacf5910 is 0 bytes inside a block of size 104 free'd
==52699==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==52699==    by 0x52E466B: g_type_free_instance (gtype.c:2062)
==52699==    by 0x52EA05F: g_value_unset (gvalue.c:313)
==52699==    by 0xC5FA83F: _is_org_gnome_shell_search_provider2_skeleton_handle_method_call (is-org-gnome-shell-search-provider-generated.c:1677)
==52699==    by 0x51F94D9: g_dbus_interface_method_dispatch_helper (gdbusinterfaceskeleton.c:618)
==52699==    by 0x51DE9EB: call_in_idle_cb.lto_priv.2 (gdbusconnection.c:5000)
==52699==    by 0x536836E: UnknownInlinedFun (gmain.c:3460)
==52699==    by 0x536836E: g_main_context_dispatch (gmain.c:4200)
==52699==    by 0x53C3177: g_main_context_iterate.constprop.0 (gmain.c:4276)
==52699==    by 0x5367BDE: g_main_loop_run (gmain.c:4479)
==52699==    by 0x4A834BC: gtk_main (gtkmain.c:1329)
==52699==    by 0x1116C6: main (indicator-sensors.c:226)
==52699==  Block was alloc'd at
==52699==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==52699==    by 0x536D550: g_malloc0 (gmem.c:163)
==52699==    by 0x52E9B7C: g_type_create_instance (gtype.c:1965)
==52699==    by 0x52D120F: g_object_new_internal (gobject.c:2246)
==52699==    by 0x52D27B7: g_object_new_with_properties (gobject.c:2409)
==52699==    by 0x52D3560: g_object_new (gobject.c:2055)
==52699==    by 0x521A3E0: UnknownInlinedFun (gdbusmethodinvocation.c:371)
==52699==    by 0x521A3E0: schedule_method_call.constprop.0 (gdbusconnection.c:5033)
==52699==    by 0x51DEB88: validate_and_maybe_schedule_method_call.lto_priv.0 (gdbusconnection.c:5135)
==52699==    by 0x51DF19B: UnknownInlinedFun (gdbusconnection.c:5178)
==52699==    by 0x51DF19B: UnknownInlinedFun (gdbusconnection.c:7235)
==52699==    by 0x51DF19B: UnknownInlinedFun (gdbusconnection.c:2340)
==52699==    by 0x51DF19B: on_worker_message_received (gdbusconnection.c:2254)
==52699==    by 0x51F2495: UnknownInlinedFun (gdbusprivate.c:492)
==52699==    by 0x51F2495: UnknownInlinedFun (gdbusprivate.c:488)
==52699==    by 0x51F2495: UnknownInlinedFun (gdbusprivate.c:520)
==52699==    by 0x51F2495: _g_dbus_worker_do_read_cb (gdbusprivate.c:805)
==52699==    by 0x5186612: g_task_return_now (gtask.c:1309)
==52699==    by 0x518664C: complete_in_idle_cb (gtask.c:1323)
==52699== 

(indicator-sensors:52699): GLib-GObject-CRITICAL **: 11:53:58.053: g_object_unref: assertion 'G_IS_OBJECT (object)' failed