Bug 1509847 - mutter SEGV in Wayland if DRM resolution is not matched
Summary: mutter SEGV in Wayland if DRM resolution is not matched
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mutter
Version: 7.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Florian Müllner
QA Contact: Desktop QE
Depends On:
Blocks: 1481401
TreeView+ depends on / blocked
Reported: 2017-11-06 08:01 UTC by fujiwara
Modified: 2018-05-17 14:39 UTC (History)
4 users (show)

Fixed In Version: mutter-3.26.2-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-10 13:06:05 UTC
Target Upstream Version:

Attachments (Terms of Use)
Patch of meta-monitor-config-manager.c (617 bytes, patch)
2017-11-06 08:02 UTC, fujiwara
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0770 0 None None None 2018-04-10 13:07:01 UTC

Description fujiwara 2017-11-06 08:01:23 UTC
GNOME Wayland caused a SEGV in RHEL 7.5:

Program received signal SIGSEGV, Segmentation fault.
0x00007f5f7daa9fba in meta_monitor_config_manager_create_current (
    config_manager=0x1cef4f0) at backends/meta-monitor-config-manager.c:607
607	  primary_logical_monitor_config->is_primary = TRUE;

(gdb) print primary_logical_monitor_config
$1 = (MetaLogicalMonitorConfig *) 0x0

#0  0x00007f5f7daa9fba in meta_monitor_config_manager_create_current (config_manager=0x1cef4f0) at backends/meta-monitor-config-manager.c:607
#1  0x00007f5f7dab5312 in meta_monitor_manager_ensure_configured (manager=0x1d041b0) at backends/meta-monitor-manager.c:552
#2  0x00007f5f7db7d27c in meta_monitor_manager_kms_ensure_initial_config (manager=0x1d041b0) at backends/native/meta-monitor-manager-kms.c:1253
#3  0x00007f5f7dab4e88 in meta_monitor_manager_ensure_initial_config (manager=0x1d041b0) at backends/meta-monitor-manager.c:415
#4  0x00007f5f7dab58d7 in meta_monitor_manager_constructed (object=0x1d041b0)
    at backends/meta-monitor-manager.c:733
#5  0x00007f5f77d7a292 in g_object_new_internal ()
    at /lib64/libgobject-2.0.so.0
#6  0x00007f5f77d7bb0d in g_object_new_with_properties ()
    at /lib64/libgobject-2.0.so.0
#7  0x00007f5f77d7c4f1 in g_object_new () at /lib64/libgobject-2.0.so.0
#8  0x00007f5f7db75a2e in meta_backend_native_create_monitor_manager (backend=0x1cf1910) at backends/native/meta-backend-native.c:405
#9  0x00007f5f7da9dee3 in create_monitor_manager (backend=0x1cf1910)
    at backends/meta-backend.c:364
#10 0x00007f5f7da9e073 in meta_backend_real_post_init (backend=0x1cf1910)
    at backends/meta-backend.c:444
#11 0x00007f5f7db75998 in meta_backend_native_post_init (backend=0x1cf1910)
    at backends/native/meta-backend-native.c:385
---Type <return> to continue, or q <return> to quit---
#12 0x00007f5f7da9e598 in meta_backend_post_init (backend=0x1cf1910)
    at backends/meta-backend.c:632
#13 0x00007f5f7da9eda5 in meta_clutter_init () at backends/meta-backend.c:1034
#14 0x00007f5f7db044d4 in meta_init () at core/main.c:573
#15 0x000000000040214f in main (argc=1, argv=0x7ffcd19f40e8) at main.c:443

I think the API meta_monitor_config_manager_create_current() does not exist in upstream.

This is caused by meta_monitor_is_active() is false.

#0  0x00007fc27532aa10 in meta_monitor_is_active (monitor=0x2f01440)
    at backends/meta-monitor.c:201
#1  0x00007fc275322c53 in create_logical_monitor_config_from_output (monitor_manager=0x17481b0, monitor=0x2f01440, primary_logical_monitor_config=0x0, layout_mode=META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL)
    at backends/meta-monitor-config-manager.c:569
#2  0x00007fc275322d22 in meta_monitor_config_manager_create_current (config_manager=0x7fc244006050) at backends/meta-monitor-config-manager.c:601

197       MetaOutput *output;
199       output = meta_monitor_get_main_output (monitor);
201       return output->crtc && output->crtc->current_mode;
(gdb) print output->crtc->current_mode
$8 = (MetaCrtcMode *) 0x0

The current_mode could not be gotten by drm_mode_equal() in backends/native/meta-monitor-manager-kms.c:init_crtc() .

Since the API does not exist in upstream, I think it would be good to delete the API or fix it.

Comment 2 fujiwara 2017-11-06 08:02:41 UTC
Created attachment 1348451 [details]
Patch of meta-monitor-config-manager.c

After I applied this patch, mutter works fine in my box.

Comment 5 fujiwara 2017-11-08 04:13:15 UTC
I confirmed mutter-3.26.2-3.el7 fixes this issue.

Comment 8 errata-xmlrpc 2018-04-10 13:06:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.