! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-display-settings segfaults.
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Display Settings

Comments

Description Christian Herold 2019-08-13 10:58:38 CEST
Since the update to 4.14, xfce4-display-settings seg faults on my Archlinux.
The stack trace is not really helpful:

[0] from 0x00007ffff6f9e15e in __strcmp_avx2+30
(no arguments)
[1] from 0x0000555555565a0c
(no arguments)
[+]

>>> bt
#0  0x00007ffff6f9e15e in __strcmp_avx2 () at /usr/lib/libc.so.6
#1  0x0000555555565a0c in  ()
#2  0x000055555555dad5 in  ()
#3  0x0000555555560896 in  ()
#4  0x000055555555b201 in  ()
#5  0x00007ffff6e6aee3 in __libc_start_main () at /usr/lib/libc.so.6
#6  0x000055555555bd0e in  ()

System information:

System:    Host: bimo Kernel: 5.2.8-arch1-1-ARCH x86_64 bits: 64 compiler: gcc v: 9.1.0 Desktop: Xfce 4.14.1 tk: Gtk 3.24.10 
           info: xfce4-panel wm: xfwm4 dm: GDM 3.32.0 Distro: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 20HGS3B400 v: ThinkPad T470s serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: LENOVO model: 20HGS3B400 serial: <filter> UEFI: LENOVO v: N1WET49W (1.28 ) date: 07/04/2018 
Battery:   ID-1: BAT0 charge: 18.8 Wh condition: 18.9/23.5 Wh (80%) volts: 12.7/11.2 model: SANYO 00HW022 type: Li-poly 
           serial: <filter> status: Unknown cycles: 107 
           ID-2: BAT1 charge: 23.4 Wh condition: 23.4/26.3 Wh (89%) volts: 12.8/11.4 model: SANYO 01AV405 type: Li-ion 
           serial: <filter> status: Full cycles: 206 
CPU:       Topology: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP arch: Kaby Lake rev: 9 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21704 
           Speed: 700 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 700 2: 700 3: 700 4: 701 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5916 
           Display: x11 server: X.org 1.20.5 driver: i915 resolution: <xdpyinfo missing> 
           Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:9d71 
           Sound Server: ALSA v: k5.2.8-arch1-1-ARCH 
Network:   Device-1: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: 3.2.6-k port: efa0 bus ID: 00:1f.6 
           chip ID: 8086:15d8 
           IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 bus ID: 3a:00.0 chip ID: 8086:24fd 
           IF: wlp58s0 state: up mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 332.20 GiB (69.7%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW512HMJP-000L7 size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> rev: 6L7QCXY7 temp: 35 C scheme: GPT 
Partition: ID-1: / size: 466.45 GiB used: 332.13 GiB (71.2%) fs: btrfs dev: /dev/dm-0 
           ID-2: /boot size: 499.0 MiB used: 73.6 MiB (14.7%) fs: vfat dev: /dev/nvme0n1p1 
           ID-3: /home size: 466.45 GiB used: 332.13 GiB (71.2%) fs: btrfs dev: /dev/dm-0 
           ID-4: swap-1 size: 10.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 2235 
Info:      Processes: 262 Uptime: 2h 40m Memory: 19.50 GiB used: 2.54 GiB (13.0%) Init: systemd v: 242 Compilers: gcc: 9.1.0 
           clang: 8.0.1 Shell: zsh v: 5.7.1 running in: konsole inxi: 3.0.35
Comment 1 Bryson Reese 2019-08-13 22:06:58 CEST
Can confirm. I tried to build the xfce4-settings from source with debugging on, not sure if it worked, but I ran it through valgrind and got some interesting results.

Here is valgrind output from running xfce4-settings-manager, then clicking on display, then pressing "update profile":

bryson@archpad[xfce4-settings]$ valgrind xfce4-settings-manager
==10799== Memcheck, a memory error detector
==10799== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10799== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==10799== Command: xfce4-settings-manager
==10799== 

(xfce4-settings-manager:10799): xfce4-settings-manager-CRITICAL **: 12:55:02.889: pluggable dialog "xfce4-display-settings" crashed
==10799== Invalid read of size 8
==10799==    at 0x4FDC525: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE69C6: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x503BACA: gdk_display_get_event (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE6703: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x538DCF3: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x538FB10: ??? (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x5390A62: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x4B46EEE: gtk_main (in /usr/lib/libgtk-3.so.0.2406.4)
==10799==    by 0x10C274: ??? (in /usr/bin/xfce4-settings-manager)
==10799==    by 0x546FEE2: (below main) (in /usr/lib/libc-2.29.so)
==10799==  Address 0x9c7dc58 is 8 bytes inside a block of size 24 free'd
==10799==    at 0x48399AB: free (vg_replace_malloc.c:530)
==10799==    by 0x50259D2: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x502C248: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FD3D49: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x49521C4: ??? (in /usr/lib/libgtk-3.so.0.2406.4)
==10799==    by 0x4FDC51E: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE69C6: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x503BACA: gdk_display_get_event (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE6703: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x538DCF3: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x538FB10: ??? (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x5390A62: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==  Block was alloc'd at
==10799==    at 0x483877F: malloc (vg_replace_malloc.c:299)
==10799==    by 0x5387289: g_malloc (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x5369673: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x5391B34: g_list_append (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x502C9A1: gdk_window_add_filter (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x49518D9: ??? (in /usr/lib/libgtk-3.so.0.2406.4)
==10799==    by 0x4952115: ??? (in /usr/lib/libgtk-3.so.0.2406.4)
==10799==    by 0x4FDC51E: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE69C6: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x503BACA: gdk_display_get_event (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x4FE6703: ??? (in /usr/lib/libgdk-3.so.0.2406.4)
==10799==    by 0x538DCF3: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799== 
^C==10799== 
==10799== Process terminating with default action of signal 2 (SIGINT)
==10799==    at 0x553A667: poll (in /usr/lib/libc-2.29.so)
==10799==    by 0x538FA7F: ??? (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x5390A62: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.6000.6)
==10799==    by 0x4B46EEE: gtk_main (in /usr/lib/libgtk-3.so.0.2406.4)
==10799==    by 0x10C274: ??? (in /usr/bin/xfce4-settings-manager)
==10799==    by 0x546FEE2: (below main) (in /usr/lib/libc-2.29.so)
==10799== 
==10799== HEAP SUMMARY:
==10799==     in use at exit: 4,491,676 bytes in 36,748 blocks
==10799==   total heap usage: 864,248 allocs, 827,500 frees, 70,270,245 bytes allocated
==10799== 
==10799== LEAK SUMMARY:
==10799==    definitely lost: 24,599 bytes in 29 blocks
==10799==    indirectly lost: 61,023 bytes in 2,667 blocks
==10799==      possibly lost: 6,904 bytes in 96 blocks
==10799==    still reachable: 4,136,982 bytes in 31,995 blocks
==10799==                       of which reachable via heuristic:
==10799==                         length64           : 10,256 bytes in 137 blocks
==10799==                         newarray           : 2,480 bytes in 75 blocks
==10799==         suppressed: 0 bytes in 0 blocks
==10799== Rerun with --leak-check=full to see details of leaked memory
==10799== 
==10799== For counts of detected and suppressed errors, rerun with: -v
==10799== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

For me, sometimes xfce4-display-settings will open, and other times it will not. It either segfault's by opening, or by applying or updating a profile.

Hardware info:
bryson@archpad[~]$ sudo lshw
[sudo] password for bryson: 
archpad                     
    description: Notebook
    product: 20FCS0E80L (LENOVO_MT_20FC_BU_Think_FM_ThinkPad X1 Carbon 4th)
    vendor: LENOVO
    version: ThinkPad X1 Carbon 4th
    serial: R90LPSLL
    width: 4294967295 bits
    capabilities: smbios-2.8 dmi-2.8 smp vsyscall32
    configuration: administrator_password=disabled chassis=notebook family=ThinkPad X1 Carbon 4th power-on_password=disabled sku=LENOVO_MT_20FC_BU_Think_FM_ThinkPad X1 Carbon 4th uuid=CC8F4BC3-3033-B211-A85C-A491E2669F29
  *-core
       description: Motherboard
       product: 20FCS0E80L
       vendor: LENOVO
       physical id: 0
       version: SDK0J40705 WIN
       serial: W1KS69L11T1
       slot: Not Available
     *-cache:0
          description: L1 cache
          physical id: 3
          slot: L1 Cache
          size: 64KiB
          capacity: 64KiB
          capabilities: synchronous internal write-back data
          configuration: level=1
     *-cache:1
          description: L1 cache
          physical id: 4
          slot: L1 Cache
          size: 64KiB
          capacity: 64KiB
          capabilities: synchronous internal write-back instruction
          configuration: level=1
     *-cache:2
          description: L2 cache
          physical id: 5
          slot: L2 Cache
          size: 512KiB
          capacity: 512KiB
          capabilities: synchronous internal write-back unified
          configuration: level=2
     *-cache:3
          description: L3 cache
          physical id: 6
          slot: L3 Cache
          size: 4MiB
          capacity: 4MiB
          capabilities: synchronous internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
          vendor: Intel Corp.
          physical id: 7
          bus info: cpu@0
          version: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
          serial: None
          slot: U3E1
          size: 1047MHz
          capacity: 4005MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d cpufreq
          configuration: cores=2 enabledcores=2 threads=4
     *-memory
          description: System Memory
          physical id: 8
          slot: System board or motherboard
          size: 16GiB
        *-bank:0
             description: Chip LPDDR3 Synchronous 1867 MHz (0.5 ns)
             product: H9CCNNNCLTMLAR
             vendor: SK Hynix
             physical id: 0
             serial: None
             slot: ChannelA
             size: 8GiB
             width: 64 bits
             clock: 1867MHz (0.5ns)
        *-bank:1
             description: Chip LPDDR3 Synchronous 1867 MHz (0.5 ns)
             product: H9CCNNNCLTMLAR
             vendor: SK Hynix
             physical id: 1
             serial: None
             slot: ChannelB
             size: 8GiB
             width: 64 bits
             clock: 1867MHz (0.5ns)
     *-firmware
          description: BIOS
          vendor: LENOVO
          physical id: c
          version: N1FET43W (1.17 )
          date: 08/02/2016
          size: 128KiB
          capacity: 15MiB
          capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification uefi
     *-pci
          description: Host bridge
          product: Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 08
          width: 32 bits
          clock: 33MHz
          configuration: driver=skl_uncore
          resources: irq:0
        *-display
             description: VGA compatible controller
             product: Skylake GT2 [HD Graphics 520]
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 07
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:130 memory:f0000000-f0ffffff memory:e0000000-efffffff ioport:e000(size=64) memory:c0000-dffff
        *-generic:0 UNCLAIMED
             description: System peripheral
             product: Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
             vendor: Intel Corporation
             physical id: 8
             bus info: pci@0000:00:08.0
             version: 00
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm cap_list
             configuration: latency=0
             resources: memory:f124a000-f124afff
        *-generic:1
             description: Non-VGA unclassified device
             product: Sunrise Point-LP Integrated Sensor Hub
             vendor: Intel Corporation
             physical id: 13
             bus info: pci@0000:00:13.0
             version: 21
             width: 64 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: driver=intel_ish_ipc latency=0
             resources: irq:20 memory:f124b000-f124bfff
        *-usb
             description: USB controller
             product: Sunrise Point-LP USB 3.0 xHCI Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 21
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:125 memory:f1220000-f122ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 5.2.8-arch1-1-ARCH xhci-hcd
                physical id: 0
                bus info: usb@1
                logical name: usb1
                version: 5.02
                capabilities: usb-2.00
                configuration: driver=hub slots=12 speed=480Mbit/s
              *-usb:0
                   description: USB hub
                   product: USB2.0 Hub
                   vendor: VIA Labs, Inc.
                   physical id: 4
                   bus info: usb@1:4
                   version: 52.84
                   capabilities: usb-2.10
                   configuration: driver=hub slots=4 speed=480Mbit/s
                 *-usb:0
                      description: USB hub
                      product: USB2.0 Hub
                      vendor: VIA Labs, Inc.
                      physical id: 1
                      bus info: usb@1:4.1
                      version: 52.81
                      capabilities: usb-2.10
                      configuration: driver=hub slots=4 speed=480Mbit/s
                    *-usb:0
                         description: Keyboard
                         product: Corsair K70R Gaming Keyboard
                         vendor: Corsair
                         physical id: 1
                         bus info: usb@1:4.1.1
                         version: 1.09
                         capabilities: usb-2.00
                         configuration: driver=usbhid maxpower=500mA speed=12Mbit/s
                    *-usb:1
                         description: Audio device
                         product: ThinkPad OneLink Plus Dock Audio
                         vendor: C-Media Electronics Inc.
                         physical id: 4
                         bus info: usb@1:4.1.4
                         version: 1.09
                         capabilities: usb-2.00 audio-control
                         configuration: driver=usbhid maxpower=100mA speed=12Mbit/s
                 *-usb:1
                      description: USB hub
                      product: USB2.0 Hub
                      vendor: Genesys Logic, Inc.
                      physical id: 2
                      bus info: usb@1:4.2
                      version: 85.37
                      capabilities: usb-2.00
                      configuration: driver=hub maxpower=100mA slots=2 speed=480Mbit/s
                    *-usb
                         description: Mouse
                         product: Gaming Mouse G502
                         vendor: Logitech
                         physical id: 2
                         bus info: usb@1:4.2.2
                         version: 88.02
                         serial: 187234733237
                         capabilities: usb-2.00
                         configuration: driver=usbhid maxpower=300mA speed=12Mbit/s
              *-usb:1
                   description: Bluetooth wireless interface
                   vendor: Intel Corp.
                   physical id: 7
                   bus info: usb@1:7
                   version: 0.01
                   capabilities: bluetooth usb-2.00
                   configuration: driver=btusb maxpower=100mA speed=12Mbit/s
              *-usb:2
                   description: Video
                   product: Integrated Camera
                   vendor: Azurewave
                   physical id: 8
                   bus info: usb@1:8
                   version: 0.20
                   serial: NULL
                   capabilities: usb-2.00
                   configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
              *-usb:3 UNCLAIMED
                   description: Generic USB device
                   product: VFS7500 Touch Fingerprint Sensor
                   vendor: Validity Sensors, Inc.
                   physical id: 9
                   bus info: usb@1:9
                   version: 1.64
                   serial: 748688d914d0
                   capabilities: usb-2.00
                   configuration: maxpower=100mA speed=12Mbit/s
           *-usbhost:1
                product: xHCI Host Controller
                vendor: Linux 5.2.8-arch1-1-ARCH xhci-hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 5.02
                capabilities: usb-3.00
                configuration: driver=hub slots=6 speed=5000Mbit/s
              *-usb
                   description: USB hub
                   product: USB3.0 Hub
                   vendor: VIA Labs, Inc.
                   physical id: 4
                   bus info: usb@2:4
                   version: 52.85
                   capabilities: usb-3.00
                   configuration: driver=hub slots=4 speed=5000Mbit/s
                 *-usb
                      description: USB hub
                      product: USB3.0 Hub
                      vendor: VIA Labs, Inc.
                      physical id: 1
                      bus info: usb@2:4.1
                      version: 52.81
                      capabilities: usb-3.00
                      configuration: driver=hub slots=4 speed=5000Mbit/s
                    *-usb
                         description: Communication device
                         product: OneLink+ Giga
                         vendor: Lenovo
                         physical id: 3
                         bus info: usb@2:4.1.3
                         version: 30.01
                         serial: 00001F000000
                         capabilities: usb-3.00 ethernet
                         configuration: driver=cdc_ether maxpower=256mA speed=5000Mbit/s
        *-generic:2
             description: Signal processing controller
             product: Sunrise Point-LP Thermal subsystem
             vendor: Intel Corporation
             physical id: 14.2
             bus info: pci@0000:00:14.2
             version: 21
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi cap_list
             configuration: driver=intel_pch_thermal latency=0
             resources: irq:18 memory:f124c000-f124cfff
        *-communication:0
             description: Communication controller
             product: Sunrise Point-LP CSME HECI #1
             vendor: Intel Corporation
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 21
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=mei_me latency=0
             resources: irq:127 memory:f124d000-f124dfff
        *-communication:1
             description: Serial controller
             product: Sunrise Point-LP Active Management Technology - SOL
             vendor: Intel Corporation
             physical id: 16.3
             bus info: pci@0000:00:16.3
             version: 21
             width: 32 bits
             clock: 66MHz
             capabilities: msi pm 16550 cap_list
             configuration: driver=serial latency=0
             resources: irq:19 ioport:e080(size=8) memory:f1251000-f1251fff
        *-storage
             description: SATA controller
             product: Sunrise Point-LP SATA Controller [AHCI mode]
             vendor: Intel Corporation
             physical id: 17
             bus info: pci@0000:00:17.0
             version: 21
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:126 memory:f1248000-f1249fff memory:f1250000-f12500ff ioport:e088(size=8) ioport:e090(size=4) ioport:e060(size=32) memory:f124e000-f124e7ff
        *-pci:0
             description: PCI bridge
             product: Sunrise Point-LP PCI Express Root Port #1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: f1
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:122 memory:f1100000-f11fffff
           *-generic
                description: Unassigned class
                product: RTS525A PCI Express Card Reader
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:02:00.0
                version: 01
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: driver=rtsx_pci latency=0
                resources: irq:124 memory:f1100000-f1100fff
        *-pci:1
             description: PCI bridge
             product: Sunrise Point-LP PCI Express Root Port #3
             vendor: Intel Corporation
             physical id: 1c.2
             bus info: pci@0000:00:1c.2
             version: f1
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:123 memory:f1000000-f10fffff
           *-network
                description: Wireless interface
                product: Wireless 8260
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:04:00.0
                logical name: wlp4s0
                version: 3a
                serial: e4:a7:a0:c6:d2:5c
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=iwlwifi driverversion=5.2.8-arch1-1-ARCH firmware=36.8fd77bb3.0 ip=192.168.1.162 latency=0 link=yes multicast=yes wireless=IEEE 802.11
                resources: irq:129 memory:f1000000-f1001fff
        *-isa
             description: ISA bridge
             product: Sunrise Point-LP LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 21
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master
             configuration: latency=0
        *-memory UNCLAIMED
             description: Memory controller
             product: Sunrise Point-LP PMC
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             version: 21
             width: 32 bits
             clock: 33MHz (30.3ns)
             configuration: latency=0
             resources: memory:f1244000-f1247fff
        *-multimedia
             description: Audio device
             product: Sunrise Point-LP HD Audio
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 21
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=snd_hda_intel latency=64
             resources: irq:131 memory:f1240000-f1243fff memory:f1230000-f123ffff
        *-serial
             description: SMBus
             product: Sunrise Point-LP SMBus
             vendor: Intel Corporation
             physical id: 1f.4
             bus info: pci@0000:00:1f.4
             version: 21
             width: 64 bits
             clock: 33MHz
             configuration: driver=i801_smbus latency=0
             resources: irq:16 memory:f124f000-f124f0ff ioport:efa0(size=32)
        *-network
             description: Ethernet interface
             product: Ethernet Connection I219-LM
             vendor: Intel Corporation
             physical id: 1f.6
             bus info: pci@0000:00:1f.6
             logical name: enp0s31f6
             version: 21
             serial: 54:ee:75:b0:32:79
             capacity: 1Gbit/s
             width: 32 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
             configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-4 latency=0 link=no multicast=yes port=twisted pair
             resources: irq:128 memory:f1200000-f121ffff
  *-battery
       product: 00HW029
       vendor: SMP
       physical id: 1
       slot: Front
       capacity: 52060mWh
       configuration: voltage=15.2V
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: 00:50:b6:d5:58:30
       capabilities: ethernet physical
       configuration: broadcast=yes driver=cdc_ether driverversion=22-Aug-2005 firmware=CDC Ethernet Device link=no multicast=yes


If needed, I could compile from source and try to provide better backtraces and such, but that will have to wait until tonight as I have work!
Comment 2 smokenicotine 2019-08-14 01:36:31 CEST
Can confirm this is also happening to me. Segmentation fault (core dumped) for xfce4-display-settings. Has been like this since 4.14. Problem exists on clean install as well.
Comment 3 stanna 2019-08-14 05:02:41 CEST
i am experiencing the same issue when opening the Display properties. reverting to an older xfce4-settings did not fix the issue nor did a complete reinstall. still persists.
Comment 4 Andre Miranda editbugs 2019-08-14 05:20:29 CEST
(In reply to Christian Herold from comment #0)
> Since the update to 4.14, xfce4-display-settings seg faults on my Archlinux.
I also use Arch, but I can't reproduce this crash. Do you have an external monitor plugged? The crash happens when a single monitor is in use?

> The stack trace is not really helpful
That's because the binary from the repository doesn't have debug symbols.

(In reply to Bryson Reese from comment #1)
> Here is valgrind output from running xfce4-settings-manager, then clicking
> on display, then pressing "update profile"
Can you crash xfce4-display-settings without opening it in Settings Manager?

> If needed, I could compile from source and try to provide better backtraces
> and such, but that will have to wait until tonight as I have work!
Backtraces (gdb) would be helpful, if they are too long, please attach a file.
Comment 5 Christian Herold 2019-08-14 08:12:55 CEST
> I also use Arch, but I can't reproduce this crash. Do you have an external monitor plugged? The crash happens when a single monitor is in use?

Yes there are two external monitors connected.

> Can you crash xfce4-display-settings without opening it in Settings Manager?

When I make a fresh boot and start the display settings using Settings Manager, it works well for the first time.
But when I close the display-settings and try again to open using Settings Manager, then it is not working.

> Backtraces (gdb) would be helpful, if they are too long, please attach a file.

Could I build the display-manager standalone?
Comment 6 Fanfurlio 2019-08-14 09:35:19 CEST
I have the same problem, however it's not xfce4-settings-manager that crashes for me, but the daemon xfsettingsd, and when it segfaults, xfce4-display-settings crashes.

And I managed to find that it segfaults as soon as you connect the THIRD monitor.

It's stable with one or two monitors, and crashes when he detects the third, whichever it is.

I can provide a log from coredumpctl
https://pastebin.com/raw/0h0S4biu

and a log obtained launching 'XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon'
https://pastebin.com/raw/4yJNvGhi
Comment 7 Fanfurlio 2019-08-14 10:33:37 CEST
Managed to compile xfce4-settings with debug symbols on, here is the same coredump
https://pastebin.com/raw/MY5aD0RG

and a gdb trace from the same coredump
https://pastebin.com/raw/2gvssvuL

I will add that this issue is not present on 4.12.4
Comment 8 Simon Steinbeiss editbugs 2019-08-14 22:37:15 CEST
Created attachment 8887 
Very rough patch

Hi, please try if the attached patch fixes the problem for you!
Thanks!
Comment 9 jsch 2019-08-15 11:02:50 CEST
Patch works for more then 2 Displays - thank you.
Comment 10 Fanfurlio 2019-08-16 08:57:14 CEST
Does not work for me, xfsettingsd segfaults with the same coredump as before.

I verified that display-profiles.c is changed before compiling, but for me it still segfaults at line 135, when connecting the third screen.
Comment 11 Andreas Böhler 2019-08-16 23:11:50 CEST
Created attachment 8899 
Add noutput as parameter, remove call to g_strv_length

Since I am affected by the same problem, i tried to debug it. For me, g_strv_length reports inconsistent values, I've seen 4, 9 and 12 while it should be 3. Obviously, this crashes.

This patch makes the number of outputs a parameter to the function call.
Comment 12 Andreas Böhler 2019-08-16 23:35:30 CEST
Hm, thinking about it: g_strv_length requires a NULL-terminated array. Currently, I can't test it, but would it suffice to extend the array with a NULL-element, i.e. adding +1 to the calls to g_new0 when initializing the array?
Comment 13 Simon Steinbeiss editbugs 2019-08-16 23:42:25 CEST
@Andreas: Thanks for helping to debug this!
Unfortunately I'm not close to a real multi-monitor setup which is why it's impossible for me to properly debug the problem (I obviously also can't reproduce it). Your conclusion is very plausible, I guess I would have had to initialize it in a NULL-terminated manner. The old way of freeing the array also has to be replaced with g_strfreev in the functions calling get_profiles and that also requires a NULL-terminated array.

In any case, your current patch does no harm and surely works. Let's see what the testers that still experienced issues (like Fanfurlio) say.
Comment 14 Simon Steinbeiss editbugs 2019-08-18 17:38:12 CEST
Created attachment 8910 
Proper patch, assuring correct null-terminated gchar**

Ok, so here goes a proper patch. As far as I have understood the testing and feedback, this should resolve the bug.
In any case, please test thoroughly! Thanks!
Comment 15 Landry Breuil editbugs 2019-08-18 17:59:27 CEST
Comment on attachment 8910 
Proper patch, assuring correct null-terminated gchar**

Fwiw, i've tested the patch on two laptops (single screen) and a desktop (dual screen) - all with 4.14 on OpenBSD - and that solves the xfce4-display-settings crashes i was seeing.
Comment 16 Daniel Harding 2019-08-18 20:24:01 CEST
Created attachment 8912 
Tweaked version of patch posted by Landry Breuil

This patch is the same as the one posted by Landry Breuil, except that it drops explicitly assigning NULL to the last element of display_infos, as that is already taken care of by g_new0.

On my 3-display system, xfce4-display-settings was failing 100% of the time without the patch, and with this patch, it works fine.
Comment 17 colde1 2019-08-19 06:48:22 CEST
can someone explain how to apply the patch?
Comment 18 Fanfurlio 2019-08-19 09:37:19 CEST
On my 3-screen system (sorry to have kept you waiting, I only have access to it at work) both patches work without a hitch.
Comment 19 Simon Steinbeiss editbugs 2019-08-19 15:25:29 CEST
Created attachment 8922 
Assuring correct null-terminated gchar** and profile matching

When testing the patch a bit more I noticed that now that the array is null-terminated it contains one more element that needs to be subtracted when comparing the amount of displays in a profile and the ones that are currently connected.

Now I have extended the patch in this direction and from my point of view it's ready to merge. Feel free to give it a last try with both saving profiles or just retaining the default settings.
Comment 20 Andreas Böhler 2019-08-19 16:15:40 CEST
For me, noutput correctly contains the number of connected displays, since g_strv_length() does not count the last NULL element. I'm unsure whether subtracting 1 is really necessary here?

If I save a profile with the old patch, it is correctly saved and available in the GUI. If I open xfce4-display-settings with your new patch, the previously saved profile is not available.

If I try to save a profile with your new patch, it asks me if I want to overwrite the existing profile "xxx", however, this profile is not displayed.
Comment 21 Simon Steinbeiss editbugs 2019-08-19 16:20:30 CEST
Interesting. Can you check if after starting your session the profile you saved is correctly enabled too?

(After startup it needs to have the checkmark, otherwise it wasn't matched and activated.)
Comment 22 Simon Steinbeiss editbugs 2019-08-19 17:02:21 CEST
Let me be more precise: I now see the behavior you're describing. I was focusing on xfsettingsd/displays.c, which handles e.g. the session startup.

For some reason I get different amount of displays in the display dialog and xfsettingsd. I'll investigate a little more...
Comment 23 Andreas Böhler 2019-08-19 17:23:01 CEST
Yes, the checkmark is there - good that you were able to reproduce it.

I can also reproduce your point, I'm getting 9 outputs from helper->resources->noutput - that makes perfect sense, since xrandr reports 9 outputs for me, but only 3 of them have connected screens.

xfce4-display-settings reports only 3 outputs, which is just the ones actually having screens connected.
Comment 24 Simon Steinbeiss editbugs 2019-08-19 18:13:37 CEST
Created attachment 8925 
Part1: Assure correct gchar

Ok, so here goes part one again, which fixes the bug that was reported here.
Comment 25 Simon Steinbeiss editbugs 2019-08-19 18:15:51 CEST
Created attachment 8926 
Part2: Fix profile matching in xfsettingsd

The second patch fixes profile matching in xfsettingsd, i.e. when connecting a new display or when starting up the session. (Previously saved profiles were not loaded correctly.)
Comment 26 Andreas Böhler 2019-08-19 18:36:21 CEST
Thanks, this seems to work fine - at least, xfsettingsd correctly restores the screen configuration upon startup and xfce4-display-settings reports the profiles and saving and loading works, applying profiles and settings as well, of course.
Comment 27 Simon Steinbeiss editbugs 2019-08-19 18:48:41 CEST
Great! Thanks for helping with debugging this.
Comment 28 Git Bot editbugs 2019-08-20 00:04:50 CEST
Simon Steinbeiss referenced this bugreport in commit ae8221b23f72f62276bd0a0ffe129329b217a612

display: Assure correct gchar** (Bug #15816)

https://git.xfce.org/xfce/xfce4-settings/commit?id=ae8221b23f72f62276bd0a0ffe129329b217a612
Comment 29 Git Bot editbugs 2019-08-21 12:19:34 CEST
Simon Steinbeiss referenced this bugreport in commit ae8221b23f72f62276bd0a0ffe129329b217a612

display: Assure correct gchar** (Bug #15816)

https://git.xfce.org/xfce/xfce4-settings/commit?id=ae8221b23f72f62276bd0a0ffe129329b217a612

Bug #15816

Reported by:
Christian Herold
Reported on: 2019-08-13
Last modified on: 2019-08-21

People

Assignee:
Simon Steinbeiss
CC List:
15 users

Version

Version:
4.14.0

Attachments

Additional information