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

budgie-desktop crashes when searching in budgie menu #228142

Closed
bobby285271 opened this issue Apr 25, 2023 · 9 comments · Fixed by #228428
Closed

budgie-desktop crashes when searching in budgie menu #228142

bobby285271 opened this issue Apr 25, 2023 · 9 comments · Fixed by #228428
Labels
0.kind: bug Something is broken

Comments

@bobby285271
Copy link
Member

bobby285271 commented Apr 25, 2023

Describe the bug

When typing something here:

The desktop crashes and you have to re-login (well it's Chinese in the screenshot but I hope you get the idea)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open budgie menu
  2. Type something
  3. See crash

Expected behavior

No crash.

Screenshots

See above.

Additional context

I don't see this issue before the GNOME 44 update. Probably another issue caused by GLib 2.76 but I haven't go deep yet.

Notify maintainers

@FedericoSchonborn

Metadata

I am on https://github.com/NixOS/nixpkgs/commits/830de34f05ba01959cec62a6e47e91547b07fc66 right now, it's nixos-unstable with pull request #227526 picked.

@bobby285271 bobby285271 added the 0.kind: bug Something is broken label Apr 25, 2023
@bobby285271
Copy link
Member Author

bobby285271 commented Apr 25, 2023

Backtrace points to https://github.com/BuddiesOfBudgie/budgie-desktop/blob/v10.7.1/src/appindexer/RelevancyService.vala#L185

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fb3f68e8b43 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fb3f6899cb6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fb3f68838ba in __GI_abort () at abort.c:79
#4  0x00007fb3f68845f5 in __libc_message (fmt=fmt@entry=0x7fb3f69fa789 "%s\n") at ../sysdeps/posix/libc_fatal.c:150
#5  0x00007fb3f68f2785 in malloc_printerr (str=str@entry=0x7fb3f69fd9b0 "double free or corruption (!prev)") at malloc.c:5651
#6  0x00007fb3f68f480c in _int_free (av=0x7fb3f6a38aa0 <main_arena>, p=0x333f060, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4577
#7  0x00007fb3f68f6e83 in __GI___libc_free (mem=mem@entry=0x333f070) at malloc.c:3367
#8  0x00007fb3f758f995 in g_free (mem=mem@entry=0x333f070) at ../glib/gmem.c:232
#9  0x00007fb3ecee2836 in budgie_relevancy_service_get_levenshtein_distance (s2=0x29d19c0 "f", s1=0x332c590 "budgie控制中心", self=0x1) at ../src/appindexer/RelevancyService.vala:185
#10 budgie_relevancy_service_update_relevancy (self=self@entry=0x2637820, app=<optimized out>, term=term@entry=0x32ea800 "f") at ../src/appindexer/RelevancyService.vala:112
#11 0x00007fb3ecf00773 in application_view_search_changed (self=0x26fd5f0, search_term=0x32ea800 "f") at ../src/panel/applets/budgie-menu/views/View.vala:88
#12 0x00007fb3ecef8389 in __lambda13_ (self=0x2615ea0) at ../src/panel/applets/budgie-menu/BudgieMenuWindow.vala:108
#13 ___lambda13__gtk_editable_changed (_sender=<optimized out>, self=0x2615ea0) at ../src/panel/applets/budgie-menu/BudgieMenuWindow.vala:106
#14 0x00007fb3f76894c0 in g_closure_invoke (closure=0x2a90c70, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7ffdffa3c7e0, 
    invocation_hint=invocation_hint@entry=0x7ffdffa3c760) at ../gobject/gclosure.c:832
#15 0x00007fb3f769c576 in signal_emit_unlocked_R (node=node@entry=0x286bba0, detail=detail@entry=0, instance=instance@entry=0x2700c90, emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7ffdffa3c7e0) at ../gobject/gsignal.c:3802
#16 0x00007fb3f76a348d in g_signal_emit_valist (instance=instance@entry=0x2700c90, signal_id=signal_id@entry=349, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3c978)
    at ../gobject/gsignal.c:3555
#17 0x00007fb3f76a3928 in g_signal_emit_by_name (instance=0x2700c90, detailed_signal=0x7fb3f7021d20 "changed") at ../gobject/gsignal.c:3654
#18 0x00007fb3f6d6c9a1 in end_change () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#19 0x00007fb3f6d71eb0 in gtk_entry_real_insert_text () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#20 0x00007fb3f76894c0 in g_closure_invoke (closure=closure@entry=0x2637970, return_value=return_value@entry=0x0, n_param_values=4, param_values=param_values@entry=0x7ffdffa3ccb0, 
    invocation_hint=invocation_hint@entry=0x7ffdffa3cc30) at ../gobject/gclosure.c:832
#21 0x00007fb3f769c6a7 in signal_emit_unlocked_R (node=node@entry=0x26f4790, detail=detail@entry=0, instance=instance@entry=0x2700c90, emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0x7ffdffa3ccb0) at ../gobject/gsignal.c:3841
#22 0x00007fb3f76a348d in g_signal_emit_valist (instance=instance@entry=0x2700c90, signal_id=signal_id@entry=347, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3ce98)
    at ../gobject/gsignal.c:3555
#23 0x00007fb3f76a3928 in g_signal_emit_by_name (instance=0x2700c90, detailed_signal=0x7fb3f703c70b "insert-text") at ../gobject/gsignal.c:3654
#24 0x00007fb3f6d6ca25 in gtk_entry_insert_text () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#25 0x00007fb3f6d74441 in gtk_entry_enter_text () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#26 0x00007fb3f768c26b in g_cclosure_marshal_VOID__STRINGv (closure=0x26500b0, return_value=<optimized out>, instance=0x2609200, args=<optimized out>, marshal_data=<optimized out>, 
    n_params=<optimized out>, param_types=0x26f46b0) at ../gobject/gmarshal.c:1462
#27 0x00007fb3f76896b9 in _g_closure_invoke_va (closure=closure@entry=0x26500b0, return_value=return_value@entry=0x0, instance=instance@entry=0x2609200, args=args@entry=0x7ffdffa3d2a8, 
    n_params=1, param_types=0x26f46b0) at ../gobject/gclosure.c:895
#28 0x00007fb3f76a3457 in g_signal_emit_valist (instance=instance@entry=0x2609200, signal_id=signal_id@entry=373, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3d2a8)
    at ../gobject/gsignal.c:3462
#29 0x00007fb3f76a3928 in g_signal_emit_by_name (instance=0x2609200, detailed_signal=0x7fb3f703ce5a "commit") at ../gobject/gsignal.c:3654
#30 0x00007fb3f768c26b in g_cclosure_marshal_VOID__STRINGv (closure=0x2643650, return_value=<optimized out>, instance=0x2706470, args=<optimized out>, marshal_data=<optimized out>, 
    n_params=<optimized out>, param_types=0x26f46b0) at ../gobject/gmarshal.c:1462
#31 0x00007fb3f76896b9 in _g_closure_invoke_va (closure=closure@entry=0x2643650, return_value=return_value@entry=0x0, instance=instance@entry=0x2706470, args=args@entry=0x7ffdffa3d630, 
    n_params=1, param_types=0x26f46b0) at ../gobject/gclosure.c:895
#32 0x00007fb3f76a3457 in g_signal_emit_valist (instance=0x2706470, signal_id=373, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3d630) at ../gobject/gsignal.c:3462
#33 0x00007fb3f76a370f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3612
#34 0x00007fb3f768c26b in g_cclosure_marshal_VOID__STRINGv (closure=0x2636b20, return_value=<optimized out>, instance=0x26f5330, args=<optimized out>, marshal_data=<optimized out>, 
    n_params=<optimized out>, param_types=0x26f46b0) at ../gobject/gmarshal.c:1462
#35 0x00007fb3f76896b9 in _g_closure_invoke_va (closure=closure@entry=0x2636b20, return_value=return_value@entry=0x0, instance=instance@entry=0x26f5330, args=args@entry=0x7ffdffa3d978, 
    n_params=1, param_types=0x26f46b0) at ../gobject/gclosure.c:895
#36 0x00007fb3f76a3457 in g_signal_emit_valist (instance=instance@entry=0x26f5330, signal_id=signal_id@entry=373, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3d978)
    at ../gobject/gsignal.c:3462
#37 0x00007fb3f76a3928 in g_signal_emit_by_name (instance=0x26f5330, detailed_signal=0x7fb3f703ce5a "commit") at ../gobject/gsignal.c:3654
#38 0x00007fb3f6de3c49 in no_sequence_matches () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#39 0x00007fb3f6de439a in gtk_im_context_simple_filter_keypress () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#40 0x00007fb3ebc4d0fc in fcitx_im_context_filter_keypress () from /nix/store/5r6nzm1za894l1cqs05cj1xmwy47bdk3-fcitx5-with-addons-5.0.23/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so
#41 0x00007fb3f6d71814 in gtk_entry_key_press () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#42 0x00007fb3f6c9da64 in _gtk_marshal_BOOLEAN__BOXEDv () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#43 0x00007fb3f76895f0 in _g_closure_invoke_va (closure=closure@entry=0x23b2f60, return_value=return_value@entry=0x7ffdffa3ddb0, instance=instance@entry=0x2700c90, 
    args=args@entry=0x7ffdffa3de80, n_params=1, param_types=0x239b2d0) at ../gobject/gclosure.c:895
#44 0x00007fb3f76a29be in g_signal_emit_valist (instance=0x2700c90, signal_id=68, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3de80) at ../gobject/gsignal.c:3462
#45 0x00007fb3f76a370f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3612
#46 0x00007fb3f6f51294 in gtk_widget_event_internal.part () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#47 0x00007fb3f6f72beb in gtk_window_propagate_key_event () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#48 0x00007fb3f6f76fdb in gtk_window_key_press_event () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#49 0x00007fb3f6c9d969 in _gtk_marshal_BOOLEAN__BOXED () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#50 0x00007fb3f76894c0 in g_closure_invoke (closure=closure@entry=0x23b2f60, return_value=return_value@entry=0x7ffdffa3e170, n_param_values=2, 
    param_values=param_values@entry=0x7ffdffa3e1d0, invocation_hint=invocation_hint@entry=0x7ffdffa3e150) at ../gobject/gclosure.c:832
#51 0x00007fb3f769c6a7 in signal_emit_unlocked_R (node=<optimized out>, detail=detail@entry=0, instance=instance@entry=0x2615ea0, emission_return=emission_return@entry=0x7ffdffa3e2c0, 
    instance_and_params=instance_and_params@entry=0x7ffdffa3e1d0) at ../gobject/gsignal.c:3841
#52 0x00007fb3f76a2d75 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffdffa3e370)
    at ../gobject/gsignal.c:3565
#53 0x00007fb3f76a370f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3612
#54 0x00007fb3f6f51294 in gtk_widget_event_internal.part () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#55 0x00007fb3f6e0503f in propagate_event () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#56 0x00007fb3f6e06a96 in gtk_main_do_event () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#57 0x00007fb3f745b705 in _gdk_event_emit () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgdk-3.so.0
#58 0x00007fb3f74b3ed2 in gdk_event_source_dispatch () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgdk-3.so.0
#59 0x00007fb3f7588dbd in g_main_dispatch (context=0x23a77c0) at ../glib/gmain.c:3460
#60 g_main_context_dispatch (context=context@entry=0x23a77c0) at ../glib/gmain.c:4200
#61 0x00007fb3f7589068 in g_main_context_iterate (context=0x23a77c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#62 0x00007fb3f758931f in g_main_loop_run (loop=0x2509af0) at ../glib/gmain.c:4479
#63 0x00007fb3f6e05ce5 in gtk_main () from /nix/store/zjxrcqaz8m10nwf2jl7r4jb40ha3sisw-gtk+3-3.24.37/lib/libgtk-3.so.0
#64 0x0000000000414767 in _vala_main (args_length1=<optimized out>, args=<optimized out>) at ../src/panel/main.vala:45
#65 main (argc=<optimized out>, argv=<optimized out>) at ../src/panel/main.vala:21

Looks like there are changes on main that touches RelevancyService.vala after 10.7.1, I am testing that right now.

@bobby285271
Copy link
Member Author

I gave the latest HEAD (i.e. BuddiesOfBudgie/budgie-desktop@f49821a) a try and cannot reproduce the issue so probably some of the commits fixes the issue. I wonder if this can be reproduce by others and if some fixes can be backported before 23.05

@bobby285271
Copy link
Member Author

bobby285271 commented Apr 25, 2023

Ohhh goooooood and now I am reading #buddiesofbudgie-dev:matrix.org, let me make some noise there

Edit: yeah I found a exact same backtrace

@bobby285271
Copy link
Member Author

bobby285271 commented Apr 25, 2023

And now I am on 45d0a21, which has glib 2.74 (830de34 has 2.76). This is going to be weird because with G_SLICE=always-malloc I also cannot reproduce the crash (budgie-desktop 10.7.1), so probably not related to the slice allocator.

Edit: and it's vala 0.56.4 on 45d0a21 (no crash) and 0.56.6 on 830de34 (crash)

@bobby285271
Copy link
Member Author

bobby285271 commented Apr 25, 2023

Okay I guess I can basically confirm it's caused by vala update because I am now on 8722936 and cannnot reproduce the crash, wow it's first time I know valac can really cause issues 🙈

Bisect is too painful for my slow laptop 🙃

@EbonJaeger
Copy link

EbonJaeger commented Apr 25, 2023

Could you try compiling and running this Vala code on the broken version to see if it also crashes? It should do the same thing as the crashing Budgie code, just without crashing your desktop. If this ends up being a Vala issue, we need a minimal reproduction program to send.

int matrix_test()
{
  var matrix = new int[5, 5];

  // Initalize the array columns
  for (int i = 0; i < 5; i++)
  {
    matrix[i, 0] = i;
  }
  for (int j = 0; j < 5; j++)
  {
    matrix[0, j] = j;
  }

  // Set stuff to the array
  for (int i = 0; i < 5; i++)
  {
    for (int j = 0; j < 5; j++)
    {
      matrix[i, j] = 10;
    }
  }

  // Return the element at the end of the matrix
  return matrix[4, 4];
}

int main()
{
  var i = matrix_test();
  message("result: %d", i);
  return 0;
}

Build and run with (assuming you put it in a file called main.vala):

valac main.vala
./main

@bobby285271
Copy link
Member Author

I am now on 722bc3b and my desktop crashes, so the current range is GNOME/vala@0.56.4...0.56.5 🙃 I am away from keyboard for the next few hours because it's midnight here but feel free to drop questions 🙃


I built the program with vala 0.56.5, it exits normally with

** Message: 23:58:29.090: Application.vala:31: result: 10

@EbonJaeger
Copy link

Well, crap. I was hoping that would crash. Maybe this version when you get back? It's closer to the code in Budgie:

int matrix_test()
{
  var matrix = new int[5, 5];

  // Initalize the array columns
  for (int i = 0; i < 5; matrix[i, 0] = i++) {}
  for (int j = 0; j < 5; matrix[0, j] = j++) {}

  // Set stuff to the array
  for (int i = 0; i < 5; i++)
  {
    for (int j = 0; j < 5; j++)
    {
      var cost = 10;
      matrix[i, j] = cost;
    }
  }

  // Return the element at the end of the matrix
  return matrix[4, 4];
}

int main()
{
  var i = matrix_test();
  message("result: %d", i);
  return 0;
}

Of those commits, the only one that really looks suspicious to me is GNOME/vala@1851080 at a glance.

@bobby285271
Copy link
Member Author

bobby285271 commented Apr 25, 2023

I am still here (for now) 😆 but this runs normally for me as well

** Message: 00:12:15.294: Application.vala:26: result: 10

(hmmm can we really guarantee "if I can trigger the desktop crash, then using same vala same laptop same setup we can trigger a crash with some different program"?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants