FS#39660 - [linux] Input devices randomly not working

Attached to Project: Arch Linux
Opened by Nicola Mori (snack) - Friday, 28 March 2014, 08:30 GMT
Last edited by Tobias Powalowski (tpowa) - Monday, 14 July 2014, 12:15 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
Booting into KDM randomly leads to frozen keyboard and mouse/touchpad on my laptop. This is happening since the upgrade to linux 3.13 (both stock and ck-core2) and systemd 209, about 1 time every 2 or 3 boots. Pushing the power button correctly starts the shutdown procedure. After the shutdown of KDM the system switches to console, and if I press some keys before the shutdown messages begin to be printed I can see that they actually appear on the screen. So the keyboard seems to be working in tty but not in KDM. USB keyboard and mouse give the same result.
When the boot fails I notice this error on journald:

mar 28 09:07:08 elric kernel: BUG: unable to handle kernel NULL pointer dereference at (null)
mar 28 09:07:08 elric kernel: IP: [<ffffffffa0bfb317>] mousedev_open_device+0x77/0x100 [mousedev]
mar 28 09:07:08 elric kernel: PGD 138d3d067 PUD 138d3e067 PMD 0
mar 28 09:07:08 elric kernel: Oops: 0000 [#1] PREEMPT SMP
mar 28 09:07:08 elric kernel: Modules linked in: mousedev(+) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev media microcode(+) arc4 pcspkr i2c_i801 iwldvm mac8
mar 28 09:07:08 elric kernel: CPU: 1 PID: 221 Comm: acpid Tainted: P O 3.13.7-1-ARCH #1
mar 28 09:07:08 elric kernel: Hardware name: Sony Corporation VGN-SR21M_S/VAIO, BIOS R1110Y1 08/14/2008
mar 28 09:07:08 elric kernel: task: ffff8800b7333600 ti: ffff8800b7388000 task.ti: ffff8800b7388000
mar 28 09:07:08 elric kernel: RIP: 0010:[<ffffffffa0bfb317>] [<ffffffffa0bfb317>] mousedev_open_device+0x77/0x100 [mousedev]
mar 28 09:07:08 elric kernel: RSP: 0018:ffff8800b7389c10 EFLAGS: 00010202
mar 28 09:07:08 elric kernel: RAX: 0000000000000000 RBX: ffff880137052800 RCX: ffff880137052868
mar 28 09:07:08 elric kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000246
mar 28 09:07:08 elric kernel: RBP: ffff8800b7389c28 R08: 0000000000000000 R09: ffff88013b001600
mar 28 09:07:08 elric kernel: R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000000
mar 28 09:07:08 elric kernel: R13: ffff880137052880 R14: ffff8800b620a518 R15: ffff880037d74100
mar 28 09:07:08 elric kernel: FS: 00007fc96f4f3700(0000) GS:ffff88013fc80000(0000) knlGS:0000000000000000
mar 28 09:07:08 elric kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
mar 28 09:07:08 elric kernel: CR2: 0000000000000000 CR3: 00000000b7377000 CR4: 00000000000007e0
mar 28 09:07:08 elric kernel: Stack:
mar 28 09:07:08 elric kernel: ffff8800b98efa00 ffff880137052800 ffff880137052878 ffff8800b7389c60
mar 28 09:07:08 elric kernel: ffffffffa0bfc0cc ffff880137052b48 ffff8800b620a518 ffff880037d74100
mar 28 09:07:08 elric kernel: ffffffffa0bfce80 ffff880037d74110 ffff8800b7389c98 ffffffff811a843f
mar 28 09:07:08 elric kernel: Call Trace:
mar 28 09:07:08 elric kernel: [<ffffffffa0bfc0cc>] mousedev_open+0xcc/0x150 [mousedev]
mar 28 09:07:08 elric kernel: [<ffffffff811a843f>] chrdev_open+0x9f/0x1d0
mar 28 09:07:08 elric kernel: [<ffffffff811a1ad7>] do_dentry_open+0x1b7/0x2c0
mar 28 09:07:08 elric kernel: [<ffffffff811aeeb1>] ? __inode_permission+0x41/0xb0
mar 28 09:07:08 elric kernel: [<ffffffff811a83a0>] ? cdev_put+0x30/0x30
mar 28 09:07:08 elric kernel: [<ffffffff811a1ef1>] finish_open+0x31/0x40
mar 28 09:07:08 elric kernel: [<ffffffff811b1ce2>] do_last+0x572/0xe90
mar 28 09:07:08 elric kernel: [<ffffffff811af1a6>] ? link_path_walk+0x236/0x8d0
mar 28 09:07:08 elric kernel: [<ffffffff811b26bb>] path_openat+0xbb/0x6b0
mar 28 09:07:08 elric kernel: [<ffffffff811b3dca>] do_filp_open+0x3a/0x90
mar 28 09:07:08 elric kernel: [<ffffffff811c0677>] ? __alloc_fd+0xa7/0x130
mar 28 09:07:08 elric kernel: [<ffffffff811a30c4>] do_sys_open+0x124/0x220
mar 28 09:07:08 elric kernel: [<ffffffff811a31de>] SyS_open+0x1e/0x20
mar 28 09:07:08 elric kernel: [<ffffffff81521b6d>] system_call_fastpath+0x1a/0x1f
mar 28 09:07:08 elric kernel: Code: e0 d5 91 e0 5b 44 89 e0 41 5c 41 5d 5d c3 66 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 c2 d5 91 e0 eb e0 48 8b 15 c9 21 00 00 <8b> 02 8d 48 0
mar 28 09:07:08 elric kernel: RIP [<ffffffffa0bfb317>] mousedev_open_device+0x77/0x100 [mousedev]
mar 28 09:07:08 elric kernel: RSP <ffff8800b7389c10>
mar 28 09:07:08 elric kernel: CR2: 0000000000000000
mar 28 09:07:08 elric kernel: ---[ end trace 6843dc90a49442d5 ]---

which is not present on successful boots. I attach the full output of journald -b <id of the failed boot>.

I don't really know which package is responsible for this, so sorry if the [linux,systemd] tag is wrong.

Additional info:
* package version(s)
linux 3.13.7-1
linux-ck-core2 3.13.7-1
systemd 211-1

* config and/or log files etc.
Log for failed boot and subsequent shutdown
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Monday, 14 July 2014, 12:15 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.15.1
Comment by Thomas Bächler (brain0) - Saturday, 29 March 2014, 07:56 GMT
Your kernel is tainted with proprietary and out-of-tree modules (due to fglrx). Can you reproduce this backtrace with an untainted kernel and post another backtrace?
Comment by ... (spider007) - Saturday, 29 March 2014, 13:22 GMT
I think this is the same issue. Happens on boot; but doesn't seem to have any effect except for delaying the boottime

[ +0.025167] BUG: unable to handle kernel NULL pointer dereference at (null)
[ +0.000005] IP: [<ffffffffa0633317>] mousedev_open_device+0x77/0x100 [mousedev]
[ +0.000002] PGD 1666b9067 PUD 169067067 PMD 0
[ +0.000002] Oops: 0000 [#1] PREEMPT SMP
[ +0.000039] Modules linked in: mousedev(+) mmc_core(+) rfkill pcmcia pcmcia_core bcm5974 usbhid nls_cp437 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp vfat fat kvm
[ +0.000006] sd_mod crc32c_intel ahci libahci libata ehci_pci uhci_hcd scsi_mod ehci_hcd usbcore usb_common
[ +0.000003] CPU: 3 PID: 249 Comm: acpid Not tainted 3.13.7-1-ARCH #1
[ +0.000000] Hardware name: Apple Inc. MacBookAir4,2/Mac-742912EFDBEE19B3, BIOS MBA41.88Z.0077.B0F.1201241549 01/24/2012
[ +0.000002] task: ffff880168b77500 ti: ffff880088e06000 task.ti: ffff880088e06000
[ +0.000003] RIP: 0010:[<ffffffffa0633317>] [<ffffffffa0633317>] mousedev_open_device+0x77/0x100 [mousedev]
[ +0.000001] RSP: 0018:ffff880088e07c10 EFLAGS: 00010202
[ +0.000001] RAX: 0000000000000000 RBX: ffff880088dc4800 RCX: ffff880088dc4868
[ +0.000001] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000246
[ +0.000001] RBP: ffff880088e07c28 R08: 0000000000000000 R09: ffff88016b003600
[ +0.000000] R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000000
[ +0.000001] R13: ffff880088dc4880 R14: ffff880088fc7778 R15: ffff880169466000
[ +0.000002] FS: 00007f5c1b2ad700(0000) GS:ffff88016fac0000(0000) knlGS:0000000000000000
[ +0.000001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000001] CR2: 0000000000000000 CR3: 0000000088e68000 CR4: 00000000000407e0
[ +0.000000] Stack:
[ +0.000002] ffff880037d02400 ffff880088dc4800 ffff880088dc4878 ffff880088e07c60
[ +0.000002] ffffffffa06340cc ffff880088dc4b48 ffff880088fc7778 ffff880169466000
[ +0.000001] ffffffffa0634e80 ffff880169466010 ffff880088e07c98 ffffffff811a843f
[ +0.000000] Call Trace:
[ +0.000005] [<ffffffffa06340cc>] mousedev_open+0xcc/0x150 [mousedev]
[ +0.000004] [<ffffffff811a843f>] chrdev_open+0x9f/0x1d0
[ +0.000003] [<ffffffff811a1ad7>] do_dentry_open+0x1b7/0x2c0
[ +0.000002] [<ffffffff811aeeb1>] ? __inode_permission+0x41/0xb0
[ +0.000002] [<ffffffff811a83a0>] ? cdev_put+0x30/0x30
[ +0.000002] [<ffffffff811a1ef1>] finish_open+0x31/0x40
[ +0.000001] [<ffffffff811b1ce2>] do_last+0x572/0xe90
[ +0.000002] [<ffffffff811af1a6>] ? link_path_walk+0x236/0x8d0
[ +0.000002] [<ffffffff811b26bb>] path_openat+0xbb/0x6b0
[ +0.000002] [<ffffffff811b3dca>] do_filp_open+0x3a/0x90
[ +0.000002] [<ffffffff811c0677>] ? __alloc_fd+0xa7/0x130
[ +0.000003] [<ffffffff811a30c4>] do_sys_open+0x124/0x220
[ +0.000002] [<ffffffff811a31de>] SyS_open+0x1e/0x20
[ +0.000003] [<ffffffff81521b6d>] system_call_fastpath+0x1a/0x1f
[ +0.000014] Code: e0 55 ee e0 5b 44 89 e0 41 5c 41 5d 5d c3 66 0f 1f 44 00 00 4c 89 ef 41 bc ed ff ff ff e8 c2 55 ee e0 eb e0 48 8b 15 c9 21 00 00 <8b> 02 8d 48 01 85 c0 89 0a
[ +0.000003] RIP [<ffffffffa0633317>] mousedev_open_device+0x77/0x100 [mousedev]
[ +0.000001] RSP <ffff880088e07c10>
[ +0.000000] CR2: 0000000000000000
[ +0.000002] ---[ end trace e43b48566555e7cc ]---
Comment by Nicola Mori (snack) - Saturday, 29 March 2014, 13:56 GMT
I replaced fglrx with radeon, and now I can't reproduce the problem. I booted ~ 15 times without any issue. Could the problem be due to fglrx itself and/or the out-of-tree modules?
Comment by Thomas Bächler (brain0) - Saturday, 29 March 2014, 14:35 GMT
I don't know if it is possible that fglrx causes it, but upstream will surely reject any bug report with a "P" or "O" tainted kernel.
Comment by Nicola Mori (snack) - Saturday, 29 March 2014, 14:54 GMT
Well, it seems that the culprit is fglrx (or the out-of-tree modules it pulls in). I installed catalyst again and the problem appeared again, so I guess that the kernel is fine and that it is a catalyst issue (for the record, I'm using catalyst legacy 13.1-19 from Vi0l0's [catalyst-hd234k] repository). Sjon, are you also using catalyst?

Comment by ... (spider007) - Saturday, 29 March 2014, 14:58 GMT
@snack; I'm using completely different hardware; which is why I think the problem is not related to the gpu. My Macbook that exhibits this issue uses an i915 gpu
Comment by Nicola Mori (snack) - Saturday, 29 March 2014, 15:05 GMT
@Sjon: understood. I'm going to dump catalyst and go with radeon (with linux 3.14 it seems that dpm for my RV620 is in much better shape). If the freeze happens again I will report it here.

@Thomas: is there anything else that I can do to help tracking this issue? Maybe force the loading of the out-of-tree modules pulled by fglrx you mentioned in your first reply?
Comment by Alessandro Rosetti (paradox) - Thursday, 03 April 2014, 07:05 GMT
I had the same problem on intel gpu (nvidia hopefully disabled) with GDM. I don't think it's related to the gpu.
I thought it had been fixed with the last 3.13.x but sometimes reappears.
When I boot the mouse freezes for a couple of minutes and restarts to work correctly.
The dmesg shows the same null pointer dereference of the bug report.
Comment by Romain Riviere (Le_Coyote) - Friday, 04 April 2014, 05:45 GMT
Possibly related to  FS#39738  and therefore to https://bugzilla.kernel.org/show_bug.cgi?id=71551
Comment by Romain Riviere (Le_Coyote) - Monday, 14 July 2014, 11:08 GMT
FWIW, I haven't had a single problem since the upgrade to linux 3.15.1-1.

Loading...