Mint 22.3: xapp-sn-watcher segfaults on the second right-click of a tray icon (c445c22 not on 3.2-maintenance)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, linux
- Lĩnh vực
- desktop, operating-systems
Hướng nghiên cứu
Start with xapp-status-icon.c, where synthesize_event() creates the dummy rect window and the popup event takes it without a ref (around lines 367 and 383), then compare with the fix in commit c445c22 on master. The backport needs that change applied on the 3.2-maintenance branch, and the crash should no longer appear in a repeated right-click loop on a tray icon. Reproducing it needs an AppIndicator tray icon and a display where the watcher can be run under gdb.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Distribution
Linux Mint 22.3, Cinnamon 6.6
Package version
libxapp1 3.2.4+mint22.3 (libgtk-3-0t64 3.24.41-4ubuntu1.3)
Graphics hardware in use
No response
Frequency
Only occasionally
Bug description
xapp-sn-watcher crashed when I right-clicked the Whatsie tray icon, and all tray icons reloaded once cinnamon-session restarted it. As far as I can tell this is the use-after-free that c445c22 fixes on master, where it showed up as "GdkWindow unexpectedly destroyed" warnings. The dummy rect window from synthesize_event() goes into the popup event without a ref, so on the second popup of the same menu the old dummy is freed while its XID is still in GDK's table, and the DestroyNotify lookup can hand back freed memory.
Crashing thread:
#0 gdk_event_source_get_filter_window () at gdk/x11/gdkeventsource.c:123
#1 gdk_event_source_translate_event () at gdk/x11/gdkeventsource.c:189
#2 _gdk_x11_display_queue_events () at gdk/x11/gdkeventsource.c:341
#3 gdk_display_get_event () at gdk/gdkdisplay.c:442
#4 gdk_event_source_dispatch () at gdk/x11/gdkeventsource.c:354
#5 g_main_dispatch () at glib/gmain.c:3344
...
#8 g_application_run ()
#9 main ()
The event is a DestroyNotify for 0x2c002a5. In the core that XID still maps to a freed 416-byte GdkWindow. It is the dummy from my first right-click on Whatsie, and Whatsie's menu from the second click was still open.
Steps to reproduce
Right-click an AppIndicator tray icon, close the menu, and right-click the same icon again. The second popup frees the first dummy every time, but whether the watcher then segfaults depends on the heap, so it can take many tries.
Expected behavior
The menu opens and xapp-sn-watcher keeps running.
Additional information
A gdb watchpoint on the dummy's ref_count showed 2 at gtk_menu_popup_at_rect, 1 after gdk_event_free (xapp-status-icon.c:383), and 0 inside the second popup's g_object_set_data_full (line 367), before the DestroyNotify arrived. A right-click loop on a separate X display with the packaged 3.2.4 crashed in 3 of 5 runs, same frame #0, and the other 2 survived 200 cycles. With c445c22 applied on top of 3.2.4 the dummy stays alive until GDK has handled its DestroyNotify and dropped the XID.
c445c22 is on master but not on 3.2-maintenance, so Mint 22 still has the bug. Could it go into the next 3.2.x? Happy to test a build, or to send the cherry-pick as a PR if that is easier.
- Ngôn ngữ chính
- C
- Star
- 173
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxmint/xapp
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
xapp-sn-watcher segfaults in g_dbus_proxy_get_name every time Blip (Flatpak) registers its tray iconĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Tất cả issue của linuxmint/xapp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenPrinting/cups#1826 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backport to 3.0 advertises a suffix that does not existCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
389ds/389-ds-base#8152 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RetroAchievements/rcheevos#580 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
meta:feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mpv-player/mpv#18855 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày