al177 / esp8089

Linux kernel module driver for the ESP8089 WiFi chip
GNU General Public License v2.0
184 stars 114 forks source link

Driver crash under significant load #24

Closed pkhanin closed 6 years ago

pkhanin commented 6 years ago

Linux 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

           ***** EAGLE DRIVER VER:bdf5087c3deb*****

[ 4.735612] ESP8089 reset via GPIO 0 [ 4.953698] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110 [ 5.435826] mmc1: card 0001 removed [ 5.526507] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 5.533909] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 5.543321] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 5.545903] mmc1: queuing unknown CIS tuple 0x80 (1 bytes) [ 5.546101] mmc1: new high speed SDIO card at address 0001 [ 5.546556] esp_sdio_dummy_probe enter [ 5.683737] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 5.761396] esp_sdio_init power up OK [ 6.068760] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS [ 6.307483] esp_host:bdf5087c3deb esp_target: e826c2b3c9fd 57 18202

[ 6.307553] esp_readwrite_file: file /system/lib/modules/test_results filp_open error [ 6.307690] first normal exit [ 6.307909] esp_sdio_remove enter [ 6.421552] eagle_sdio: probe of mmc1:0001:1 failed with error -110 [ 6.551788] mmc1: card 0001 removed [ 6.567778] random: crng init done [ 6.646136] sdio_read_cis: 2 callbacks suppressed [ 6.646144] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 6.653515] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 6.656730] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 6.659296] mmc1: queuing unknown CIS tuple 0x80 (1 bytes) [ 6.659378] mmc1: queuing unknown CIS tuple 0x81 (1 bytes) [ 6.659460] mmc1: queuing unknown CIS tuple 0x82 (1 bytes) [ 6.659507] mmc1: new high speed SDIO card at address 0001 [ 7.055892] esp_host:bdf5087c3deb esp_target: e826c2b3c9fd 57 18202

[ 7.413859] esp_op_add_interface STA [ 7.414016] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 8.633558] wlan0: authenticate with fc:f5:28:4b:fa:f6 [ 8.633774] wlan0: send auth to fc:f5:28:4b:fa:f6 (try 1/3) [ 8.640811] wlan0: authenticated [ 8.641429] wlan0: associate with fc:f5:28:4b:fa:f6 (try 1/3) [ 8.646420] wlan0: RX AssocResp from fc:f5:28:4b:fa:f6 (capab=0x11 status=0 aid=7) [ 8.646514] wlan0: associated [ 9.181937] esp_op_ampdu_action RX START fc:f5:28:4b:fa:f6 tid 0 3714 [ 9.372877] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 11.738586] start tx ba session,addr:fc:f5:28:4b:fa:f6,tid:0 [ 11.791395] esp_op_ampdu_action TX START, addr:fc:f5:28:4b:fa:f6,tid:0,state:1 [ 11.793688] esp_op_ampdu_action TX OPERATION, addr:fc:f5:28:4b:fa:f6,tid:0,state:2 [ 15.743887] esp_op_ampdu_action RX START fc:f5:28:4b:fa:f6 tid 6 44 [ 17.389369] esp_op_ampdu_action RX START fc:f5:28:4b:fa:f6 tid 2 1 [ 23.314979] start tx ba session,addr:fc:f5:28:4b:fa:f6,tid:5 [ 23.351693] esp_op_ampdu_action TX START, addr:fc:f5:28:4b:fa:f6,tid:5,state:1 [ 23.356201] esp_op_ampdu_action TX OPERATION, addr:fc:f5:28:4b:fa:f6,tid:5,state:2 [ 142.003595] func sip_write_pkts err!!!!!!!!!: -84 [ 142.003752] func sip_write_pkts err!!!!!!!!!: -110 [ 142.003874] func sip_write_pkts err!!!!!!!!!: -110 [ 142.003976] func sip_write_pkts err!!!!!!!!!: -110 [ 142.004077] func sip_write_pkts err!!!!!!!!!: -110 [ 142.004187] func sip_write_pkts err!!!!!!!!!: -110 [ 142.004298] func sip_write_pkts err!!!!!!!!!: -110 [ 142.310220] esp_sdio_remove enter [ 142.311254] sif_disable_irq release irq failed [ 142.419987] wlan0: deauthenticating from fc:f5:28:4b:fa:f6 by local choice (Reason: 3=DEAUTH_LEAVING) [ 142.481011] esp_op_ampdu_action RX STOP fc:f5:28:4b:fa:f6 tid 0 [ 142.481028] esp_op_ampdu_action RX STOP fc:f5:28:4b:fa:f6 tid 2 [ 142.481076] esp_op_ampdu_action RX STOP fc:f5:28:4b:fa:f6 tid 6 [ 142.722277] mmc1: card 0001 removed [ 142.815686] mmc1: queuing unknown CIS tuple 0x01 (3 bytes) [ 142.823333] mmc1: queuing unknown CIS tuple 0x1a (5 bytes) [ 142.826507] mmc1: queuing unknown CIS tuple 0x1b (8 bytes) [ 142.828518] mmc1: queuing unknown CIS tuple 0x80 (1 bytes) [ 142.828575] mmc1: queuing unknown CIS tuple 0x81 (1 bytes) [ 142.828625] mmc1: queuing unknown CIS tuple 0x82 (1 bytes) [ 142.828653] mmc1: new high speed SDIO card at address 0001 [ 142.828956] Unable to handle kernel NULL pointer dereference at virtual address 00000004 [ 142.833040] pgd = 80004000 [ 142.837087] [00000004] *pgd=00000000 [ 142.841162] Internal error: Oops: 17 [#1] SMP ARM [ 142.845026] Modules linked in: ctr aes_arm_bs crypto_simd cryptd ccm arc4 evdev esp8089(O) mac80211 cfg80211 rfkill sndbcm2835(C) snd pcm snd_timer snd fixed uio_pdrv_genirq uio ip_tables x_tables ipv6 [ 142.849207] CPU: 1 PID: 30 Comm: kworker/1:1 Tainted: G C O 4.14.34-v7+ #1110 [ 142.853424] Hardware name: BCM2835 [ 142.857619] Workqueue: events_freezable mmc_rescan [ 142.861503] task: b6a50000 task.stack: b6a3e000 [ 142.865418] PC is at esp_sdio_probe+0x58/0x40c [esp8089] [ 142.869255] LR is at sdio_bus_probe+0x110/0x128 [ 142.873129] pc : [<7f2c4438>] lr : [<80622f38>] psr: 20000013 [ 142.877013] sp : b6a3fd08 ip : b6a3fd40 fp : b6a3fd3c [ 142.880878] r10: 0000001a r9 : 7f2cd1a0 r8 : 7f2cd1a0 [ 142.884702] r7 : 7f2d1078 r6 : b4176400 r5 : 7f2fd744 r4 : 00000000 [ 142.888579] r3 : b4176408 r2 : 00000003 r1 : 00000000 r0 : b4176400 [ 142.892486] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 142.896442] Control: 10c5383d Table: 32da006a DAC: 00000055 [ 142.900305] Process kworker/1:1 (pid: 30, stack limit = 0xb6a3e210) [ 142.904257] Stack: (0xb6a3fd08 to 0xb6a40000) [ 142.908189] fd00: 80616890 8054dc94 ada1b000 b4176408 00000000 b4176400 [ 142.912217] fd20: 7f2d10dc 7f2cd1a0 7f2d10dc 0000001a b6a3fd64 b6a3fd40 80622f38 7f2c43ec [ 142.916282] fd40: 80622e28 b4176408 80d1a064 80d1a068 00000000 00000000 b6a3fd94 b6a3fd68 [ 142.920344] fd60: 80542318 80622e34 00000000 7f2d10dc b6a3fde0 b4176408 00000001 80d1a040 [ 142.924481] fd80: 00000000 00000000 b6a3fdb4 b6a3fd98 80542580 805420d8 b6a0716c 00000000 [ 142.928653] fda0: b6a3fde0 805424dc b6a3fddc b6a3fdb8 80540400 805424e8 b6a0716c b2daebb8 [ 142.932807] fdc0: b4176408 b4176408 b417643c 80c787d0 b6a3fe04 b6a3fde0 80541f84 80540398 [ 142.936973] fde0: b4176408 00000001 b4176410 b4176408 80c787d0 00000000 b6a3fe14 b6a3fe08 [ 142.941187] fe00: 805425b4 80541ed0 b6a3fe34 b6a3fe18 80541474 805425a4 b77679e0 b4176410 [ 142.945422] fe20: b4176408 ada1b008 b6a3fe74 b6a3fe38 8053f498 805413ec b6a3fe74 b6a3fe48 [ 142.949629] fe40: 80618578 8064d3e8 8053ce34 b4176400 b4176408 b6280000 ada1b344 ada1b000 [ 142.953832] fe60: 00000001 ada1b000 b6a3fe8c b6a3fe78 806232d0 8053f0b0 00000001 00000001 [ 142.958079] fe80: b6a3fed4 b6a3fe90 80622520 80623270 00000000 b6a3fea3 00000000 00000000 [ 142.962359] fea0: 00000000 10ffff00 00000000 b6280230 00061a80 b6280000 80847e58 80847e64 [ 142.966599] fec0: 00000008 00000000 b6a3fefc b6a3fed8 80619204 806222c8 80618ef8 b698a180 [ 142.970837] fee0: b6280230 b6fd8940 b6fdbc00 00000000 b6a3ff34 b6a3ff00 80137490 80618f04 [ 142.975133] ff00: b6fd8958 80c02d00 00000008 b6fd8940 b698a198 b6fd8940 b6fd8958 80c02d00 [ 142.979438] ff20: 00000008 b698a180 b6a3ff7c b6a3ff38 801377f0 80137344 b6a3ff5c b6a3e000 [ 142.983741] ff40: 00000000 80c02d00 80c88122 b6a3e038 b698309c b6983080 00000000 b6983040 [ 142.988117] ff60: b698a180 8013778c b698309c b6939e90 b6a3ffac b6a3ff80 8013d860 80137798 [ 142.992512] ff80: 80102d94 b6983040 8013d724 00000000 00000000 00000000 00000000 00000000 [ 142.996943] ffa0: 00000000 b6a3ffb0 8010810c 8013d730 00000000 00000000 00000000 00000000 [ 143.001291] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 143.005664] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 143.010043] [<7f2c4438>] (esp_sdio_probe [esp8089]) from [<80622f38>] (sdio_bus_probe+0x110/0x128) [ 143.014446] [<80622f38>] (sdio_bus_probe) from [<80542318>] (driver_probe_device+0x24c/0x308) [ 143.018859] [<80542318>] (driver_probe_device) from [<80542580>] (device_attach_driver+0xa4/0xbc) [ 143.023355] [<80542580>] (device_attach_driver) from [<80540400>] (bus_for_each_drv+0x74/0xa8) [ 143.027914] [<80540400>] (bus_for_each_drv) from [<80541f84>] (__device_attach+0xc0/0x120) [ 143.032464] [<80541f84>] (__device_attach) from [<805425b4>] (device_initial_probe+0x1c/0x20) [ 143.036983] [<805425b4>] (device_initial_probe) from [<80541474>] (bus_probe_device+0x94/0x9c) [ 143.041578] [<80541474>] (bus_probe_device) from [<8053f498>] (device_add+0x3f4/0x57c) [ 143.046190] [<8053f498>] (device_add) from [<806232d0>] (sdio_add_func+0x6c/0x80) [ 143.050789] [<806232d0>] (sdio_add_func) from [<80622520>] (mmc_attach_sdio+0x264/0x358) [ 143.055484] [<80622520>] (mmc_attach_sdio) from [<80619204>] (mmc_rescan+0x30c/0x394) [ 143.060210] [<80619204>] (mmc_rescan) from [<80137490>] (process_one_work+0x158/0x454) [ 143.064974] [<80137490>] (process_one_work) from [<801377f0>] (worker_thread+0x64/0x5b8) [ 143.069700] [<801377f0>] (worker_thread) from [<8013d860>] (kthread+0x13c/0x16c) [ 143.074491] [<8013d860>] (kthread) from [<8010810c>] (ret_from_fork+0x14/0x28) [ 143.079292] Code: e5954018 e3a01000 e5851018 e2863008 (e5948004) [ 143.084166] ---[ end trace 99c7c8ccce0684c9 ]---

al177 commented 6 years ago

What hardware are you using?

From the mmc driver messages it seems like the ESP took a reset and dropped off the SDIO bus. This driver crashes if the device disappears from the bus before unloading.

pkhanin commented 6 years ago

I'm using raspberry pi 3 b. Can too long wires (about 10-15 cm) cause a problem?

al177 commented 6 years ago

10-15cm is too long for 50MHz SDIO without impedance controlled cabling. You'll need to scope the signals at both ends of the bus to see if this is actually the issue.

Your error looks more like the ESP was reset unexpectedly. The ESP8266 is power hungry. If the power supply isn't solid at the input of the module, then you could get unexpected resets. Try adding caps between power and ground as close as possible to the module (10-100uF) and scope it while under load.

pkhanin commented 6 years ago

Okay, I will try to it. Glad to not hear, I found a problem in the driver. Thank you!

al177 commented 6 years ago

Keep this issue open until you confirm whether or not it's a hardware issue.

CRImier commented 6 years ago

@pkhanin How are you loading the hardware? I have hardware that's known to be stable to me, and I can try doing the same thing you're doing.

pkhanin commented 6 years ago

@CRImier I'm using custom Web server that is working fine with Ethernet connections. Unfortunately I have no time now to fix my hardware. I will definitely do it and write about the result.