Kernel panic when using rtlwifi since 4.8.0-1025 on RasPi 2

Bug #1667160 reported by Markus Birth
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
High
Paolo Pisati
linux-meta-raspi2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have a Raspberry Pi 2 running Ubuntu 16.10 without problems. I use wicd to let it connect to my WiFi with a RTL8188CUS USB dongle. And there's a RTL2838 DVB-T USB stick attached to monitor airplane positions for Flightradar24.

After updateing the kernel from 4.8.0-1024, which runs flawlessly, to -1025, there's a kernel panic happening 10-20 seconds after booting up to the login prompt. I thought the -1026 fixed that, but it's still no worky. The trace is scrolling so fast I can't read anything but the last page:

[<808c76c8>] (sock_sendmsg) from...
[<808c7778>] (sock_write_iter) from...
[<802c39c8>] (new_sync_write) from...
[<802c3a4c>] (__vfs_write) from...
[<802c48d8>] (vfs_write) from...
[<802c5ab4>] (SyS_write) from...
Code: e5922004 e0033002 e3530000 0a00000a (e5902034)
---[ end trace 0f53d17efe0c6ba ]---
Kernel panic - not syncing: Fatal exception in interrupt
CPU2: stopping
CPU: 2 PID: 21 Comm: migration/2 Tainted: G D 4.8.0-1026-raspi2 #29-Ubuntu
Hardware name: BCM2709
[<801120ac>] (unwind_backtrace) from ...
[<8010d2dc>] (show_stack) from ...
[<8059c38c>] (handle_IPI) from ...
[<80101564>] (bcm2836_arm_irqchip_handle_irq) from [<80a49f3c>] (__irq_svc+0x5c/0x7c)
Exception stack(0xbb99de68 to 0xbb99deb0)
de60: 00000000 00000004 00000000 00000001 bac05de0 00000001
de80: bac05dcc 00000000 a00e0013 00000000 bac05d6c bb99dedc bb99dee0 bb99deb8
dea0: 801d367c 801d35f4 600e0013 ffffffff
[<80a49f3c>] (__irq_svc) from ...
[<801d35f4>] (multi_cpu_stop) from ...
[<801d38ec>] (cpu_stopper_thread) from ...
[<8014b71c>] (smpboot_thread_fn) from ...
[<80147770>] (kthread) from [<80108e28>] (ret_from_fork+0x14/0x2c)

And then this block repeats with CPU3 and CPU0.

Going back to 4.8.0-1024 makes everything work again.

Affected packages:

linux-image-4.8.0-1025-raspi2:armhf (4.8.0-1025.28)
linux-image-4.8.0-1026-raspi2:armhf (4.8.0-1026.29)
---
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Jul 25 2016 seq
 crw-rw---- 1 root audio 116, 33 Jul 25 2016 timer
AlsaVersion: Advanced Linux Sound Architecture Driver Version k4.8.0-1024-raspi2.
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: armhf
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
DistroRelease: Ubuntu 16.10
Lsusb:
 Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
 Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
 Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
 Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Package: linux (not installed)
PciMultimedia:

ProcFB: 0 BCM2708 FB
ProcKernelCmdLine: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0xecd3f749 smsc95xx.macaddr=B8:27:EB:D3:F7:49 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000 net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
ProcVersionSignature: Ubuntu 4.8.0-1024.27-raspi2 4.8.16
RelatedPackageVersions:
 linux-restricted-modules-4.8.0-1024-raspi2 N/A
 linux-backports-modules-4.8.0-1024-raspi2 N/A
 linux-firmware 1.161.1
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: yakkety
Uname: Linux 4.8.0-1024-raspi2 armv7l
UnreportableReason: The report belongs to a package that is not installed.
UpgradeStatus: Upgraded to yakkety on 2016-10-24 (122 days ago)
UserGroups: adm audio cdrom dialout floppy fuse netdev plugdev sudo users video www-data
_MarkForUpload: False

Revision history for this message
Markus Birth (mbirth) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1667160

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Markus Birth (mbirth) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected yakkety
description: updated
Revision history for this message
Markus Birth (mbirth) wrote : IwConfig.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : JournalErrors.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : ProcEnviron.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : ProcModules.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : UdevDb.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : WifiSyslog.txt

apport information

Revision history for this message
Markus Birth (mbirth) wrote : Re: Kernel panic with 4.8.0-1025 and -1026 on RasPi 2

NOTE: The apport I sent was created with the WORKING 1024 kernel. IT IS NOT from the here mentioned -1025 or -1026 kernel as there I can barely login until the kernel panics.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → High
tags: added: kernel-da-key
Paolo Pisati (p-pisati)
Changed in linux (Ubuntu):
assignee: nobody → Paolo Pisati (p-pisati)
Revision history for this message
Markus Birth (mbirth) wrote :

Tested today with the -1028 kernel. The problem IS STILL THERE.

This time, I made a video of the problem:

https://www.youtube.com/watch?v=H_PxSXsgVQU

The error part starts with:

Unable to handle kernel NULL pointer dereference at virtual address 00000034
pgd = afcfc000
[00000034] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: ccm appletalk ipx p8023 p8022 psnap llc ....

CPU: 1 PID: 1719 Comm: dhclient Not tainted 4.8.0-1028-raspi2 #31-Ubuntu
Hardware name: BCM2709
task: b9796740 task.stack: afc6e000
PC is at rtl_lps_leave+0x38/0x6c [rtlwifi]
LR is at setup_arp_tx+0x60/0x74 [rtlwifi]
...

Looks like it's a problem with the Realtek WiFi module? Or dhclient?

Revision history for this message
Markus Birth (mbirth) wrote :
Markus Birth (mbirth)
summary: - Kernel panic with 4.8.0-1025 and -1026 on RasPi 2
+ Kernel panic with 4.8.0-1025, -1026 and -1028 on RasPi 2
Revision history for this message
Michael Dye (dye.michael) wrote : Re: Kernel panic with 4.8.0-1025, -1026 and -1028 on RasPi 2

I encounter a similar panic w/ a pi2, kernel 4.4.0-1046-raspi2, and an edimax wifi adapter (ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] using module rtl8192cu). See attached panic output.

Revision history for this message
Michael Dye (dye.michael) wrote :
Revision history for this message
Michael Dye (dye.michael) wrote :

We have another confirmed encounter with a an EDUP wifi adapter http://edupwireless.com/product-1-2-6-wireless-11n-usb-adapter-en/137263 . See attached panic output generated during boot.

Markus Birth (mbirth)
Changed in linux-meta-raspi2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Markus Birth (mbirth) wrote :

I just got the update to kernel 4.8.0-1031.35 ... will test later today.

Revision history for this message
Markus Birth (mbirth) wrote :

Still no worky with kernel 4.8.0-1031.

summary: - Kernel panic with 4.8.0-1025, -1026 and -1028 on RasPi 2
+ Kernel panic with 4.8.0-1025 through -1031 on RasPi 2
Revision history for this message
Markus Birth (mbirth) wrote : Re: Kernel panic with 4.8.0-1025 through -1031 on RasPi 2

Same problem with 4.8.0-1032.

summary: - Kernel panic with 4.8.0-1025 through -1031 on RasPi 2
+ Kernel panic since 4.8.0-1025 on RasPi 2
Revision history for this message
Markus Birth (mbirth) wrote : Re: Kernel panic since 4.8.0-1025 on RasPi 2

A workaround seems to be using https://github.com/dz0ny/rt8192cu instead of the rtlwifi driver.

Bug also reported for the Orange Pi here: https://github.com/orangepi-xunlong/orangepi_h3_linux/pull/1

Also related: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1666421

summary: - Kernel panic since 4.8.0-1025 on RasPi 2
+ Kernel panic when using rtlwifi since 4.8.0-1025 on RasPi 2
Revision history for this message
Markus Birth (mbirth) wrote :

Problem still exists with 4.8.0-1033.37.

Revision history for this message
Markus Birth (mbirth) wrote :

Did anybody check the current kernel from zesty? I'm thinking about upgrading, but don't want to render the thing unbootable because there's no working kernel left.

Revision history for this message
Markus Birth (mbirth) wrote :

4.8.0-1035 seems to fix the problem. (Didn't check -1034.) Thank you!

Revision history for this message
Markus Birth (mbirth) wrote :

For the record: I upgraded to zesty and with kernel 4.10.0-1004 everything works fine, too.

Revision history for this message
bluescreen (s-drei) wrote :

Having similar issues (kernel panic, not being able to connect to wireless networks both from network manager and nmtui) with RTL8188CUS wifi adapter on Ubuntu Mate 16.04 and now on 17.04.

Following the instructions here solved the problem:
https://sites.google.com/site/easylinuxtipsproject/reserve-7#TOC-Realtek-RTL8188CUS-and-RTL8192CU-chipsets-0bda:8176-and-0bda:8178-

Revision history for this message
Paolo Pisati (p-pisati) wrote :

I'm unable to reproduce this bug:

$ lsusb
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
...

$ uname -a
Linux raspi3 4.8.0-1033-raspi2 #36 SMP Tue Jun 13 11:24:42 UTC 2017 armv7l armv7l armv7l GNU/Linux

probably due to the slightly different chipset (CUS vs EUS).
Nonetheless, people have mentioned that the latest kernel fixed the panic for them, can anyone confirm this?

At the moment of this writing, this is the latest Yakkety raspi2 kernel:

linux-image-4.8.0-1038-raspi2

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Changed in linux-meta-raspi2 (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.