[Wayland-bugs] [Bug 103298] infinite loop when lid events are repeated - list item points to itself

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 16 16:46:15 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103298

            Bug ID: 103298
           Summary: infinite loop when lid events are repeated - list item
                    points to itself
           Product: Wayland
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: libinput
          Assignee: wayland-bugs at lists.freedesktop.org
          Reporter: prahal at yahoo.com

Created attachment 134867
  --> https://bugs.freedesktop.org/attachment.cgi?id=134867&action=edit
lid close-open evemu record

steps: when closing and opening lid do so more than once before suspend and
resume complete

then gnome-shell consume 100% cpu and no in


- libinput 1.8.3-1 from debian sid
- wayland gnome-shell 3.26.1-2 x86_64
- /dev/input/event5:    Lid Switch

udevadm info /sys/class/input/event5
P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input8/event5
N: input/event5
E: DEVNAME=/dev/input/event5
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input8/event5
E: ID_INPUT=1
E: ID_INPUT_SWITCH=1
E: ID_PATH=acpi-PNP0C0D:00
E: ID_PATH_TAG=acpi-PNP0C0D_00
E: LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=reliable
E: LIBINPUT_DEVICE_GROUP=19/0/5/0:PNP0C0D/button
E: MAJOR=13
E: MINOR=69
E: SUBSYSTEM=input
E: TAGS=:power-switch:
E: USEC_INITIALIZED=39835474




gdb backtrace:
(gdb) bt
#0  0x00007fb99722f06e in lid_switch_keyboard_event (time=<optimized out>,
event=<optimized out>, data=0x560b543f10f0) at evdev-lid.c:98
#1  0x00007fb997225bfd in post_device_event
(device=device at entry=0x560b5e87a800, time=time at entry=698204515849,
type=type at entry=LIBINPUT_EVENT_KEYBOARD_KEY, event=0x560b5cf64720) at
libinput.c:2113
#2  0x00007fb997226f3f in keyboard_notify_key
(device=device at entry=0x560b5e87a800, time=time at entry=698204515849,
key=<optimized out>, state=<optimized out>) at libinput.c:2212
#3  0x00007fb997229987 in fallback_keyboard_notify_key
(device=device at entry=0x560b5e87a800, time=time at entry=698204515849,
key=<optimized out>, state=<optimized out>, dispatch=<optimized out>) at
evdev.c:169
#4  0x00007fb99722c4de in fallback_process_key (e=0x7ffde9a12f70,
e=0x7ffde9a12f70, time=698204515849, device=0x560b5e87a800, dispatch=<optimized
out>) at evdev.c:857
#5  0x00007fb99722c4de in fallback_process (evdev_dispatch=<optimized out>,
device=0x560b5e87a800, event=0x7ffde9a12f70, time=698204515849) at evdev.c:1168
#6  0x00007fb997229f19 in evdev_process_event (e=0x7ffde9a12f70,
device=0x560b5e87a800) at evdev.c:1904
#7  0x00007fb997229f19 in evdev_device_dispatch_one (ev=0x7ffde9a12f70,
device=0x560b5e87a800) at evdev.c:1912
#8  0x00007fb997229f19 in evdev_device_dispatch (data=0x560b5e87a800) at
evdev.c:1971
#9  0x00007fb997225cef in libinput_dispatch (libinput=0x560b54202aa0) at
libinput.c:1996
#10 0x00007fb9a15f2e9c in  () at
/usr/lib/x86_64-linux-gnu/mutter/libmutter-clutter-1.so
#11 0x00007fb9a2976f67 in g_main_dispatch (context=0x560b541f70d0) at
../../../../glib/gmain.c:3148
#12 0x00007fb9a2976f67 in g_main_context_dispatch
(context=context at entry=0x560b541f70d0) at ../../../../glib/gmain.c:3813
#13 0x00007fb9a29771a0 in g_main_context_iterate (context=0x560b541f70d0,
block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at
../../../../glib/gmain.c:3886
#14 0x00007fb9a29774b2 in g_main_loop_run (loop=0x560b544af720) at
../../../../glib/gmain.c:4082
#15 0x00007fb9a0eac93c in meta_run () at
/usr/lib/x86_64-linux-gnu/libmutter-1.so.0
#16 0x0000560b52aed287 in main (argc=<optimized out>, argv=<optimized out>) at
../src/main.c:462
(gdb) up
#1  0x00007fb997225bfd in post_device_event
(device=device at entry=0x560b5e87a800, time=time at entry=698204515849,
type=type at entry=LIBINPUT_EVENT_KEYBOARD_KEY, event=0x560b5cf64720) at
libinput.c:2113
2113                    listener->notify_func(time, event,
listener->notify_func_data);
(gdb) p &device->event_listeners
$12 = (struct list *) 0x560b5e87a820
(gdb) p device->event_listeners
$13 = {prev = 0x560b54459218, next = 0x560b543f1140}
(gdb) p device->event_listeners->next
$14 = (struct list *) 0x560b543f1140
(gdb) p *device->event_listeners->next
$15 = {prev = 0x560b543f1140, next = 0x560b543f1140}
(gdb) p device->event_listeners->prev
$16 = (struct list *) 0x560b54459218
(gdb) p *device->event_listeners->prev
$17 = {prev = 0x560b543f1140, next = 0x560b5e87a820}



Workaround :
(gdb) p device->event_listeners->next->next = 0x560b54459218
$11 = (struct list *) 0x560b54459218
(gdb) c

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20171016/d9d3f718/attachment.html>


More information about the wayland-bugs mailing list