Tp-link Archer C60 v2, 19.07.0-rc2-ath79 snapshot. Out of memory

I've installed first "openwrt-19.07.0-rc2-ath79-generic-tplink_archer-c60-v2-squashfs-factory.bin" via tftp, but i experiencing some out of memory.
Then i upgraded to "openwrt-ath79-generic-tplink_archer-c60-v2-squashfs-sysupgrade.bin" from "downloads.openwrt.org/snapshots/targets/ath79/generic/" but seems "out of memory" still here.

Accessing Luci, memory goes down fast. Without using Luci seems that the memory "lasts" a little longer but, after some time, router freeze and i need to restart it.

Omitting these "out of memory", the rest seems to work correctly.

There is something i can do to avoid this or to provide infos to who can solve the situation?

Related:

-> Try disabling 5GHz wifi and report back.


5 GHz is off, 2.4 GHz on
About 7 hours in two routers, there is no problem now on.

First router upgraded from 18.0.4 and switched ar71xx to ath79 with sysupgrade -n -F

Installed second router from oem firmware by ..factory.bin ath79 target.

There is no difference between the two.

There is definitely something wrong with 5Ghz code here =)
Disabling 5Ghz make everything works flawlessy.

I have also "Statistics" installed without have no "out of memory" anymore...

I've noticed that if I change the country code from default to RO (where I live), the interface fails to come up.

I've removed the CT modules and installed no CT via luci opkg. 5Ghz don't work at all =(
I want to try to compile from sources, including no CT directly, and see what happen.

I'm also having the same problem.
The system seems to be stable if there's low traffic, but it goes out of memory after a while.
Do these lines in the system log mean anything?

kern.warn kernel: [    2.017695] This architecture does not have kernel memory protection.

Fri Dec  6 04:31:16 2019 kern.warn kernel: [   10.599751] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
Fri Dec  6 04:31:16 2019 kern.info kernel: [   10.605969] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   10.797490] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:00:00.0.txt failed with error -2
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   10.808402] ath10k_pci 0000:00:00.0: Falling back to user helper
Fri Dec  6 04:31:16 2019 kern.err kernel: [   10.992961] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.005199] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-5.bin failed with error -2
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.016566] ath10k_pci 0000:00:00.0: Falling back to user helper
Fri Dec  6 04:31:16 2019 kern.err kernel: [   11.192463] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.202286] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-2.bin failed with error -2
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.213640] ath10k_pci 0000:00:00.0: Falling back to user helper
Fri Dec  6 04:31:16 2019 kern.err kernel: [   11.388653] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.398499] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-6.bin failed with error -2
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   11.409586] ath10k_pci 0000:00:00.0: Falling back to user helper
Fri Dec  6 04:31:16 2019 kern.err kernel: [   11.584586] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
Fri Dec  6 04:31:16 2019 kern.info kernel: [   12.179479] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
Fri Dec  6 04:31:16 2019 kern.info kernel: [   12.189043] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Fri Dec  6 04:31:16 2019 kern.info kernel: [   12.209020] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-012-0ee2f206 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 9586b726
Fri Dec  6 04:31:16 2019 kern.err kernel: [   12.543169] ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=20 from ath10k/QCA9888/hw2.0/board-2.bin
Fri Dec  6 04:31:16 2019 kern.info kernel: [   12.557251] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:20 crc32 166b55b8
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   14.597980] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
Fri Dec  6 04:31:16 2019 kern.warn kernel: [   14.605765] ath10k_pci 0000:00:00.0: msdu-desc: 2500  skid: 32
Fri Dec  6 04:31:16 2019 kern.info kernel: [   14.635840] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
Fri Dec  6 04:31:16 2019 kern.info kernel: [   14.647196] ath10k_pci 0000:00:00.0: wmi print 'free: 117888 iram: 22644 sram: 26276'
Fri Dec  6 04:31:16 2019 kern.info kernel: [   14.887577] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1

See above and report back.

Before:

              total        used        free      shared  buff/cache   available
Mem:          59560       45696        8576         308        5288           0

and I found a lot of CTRL-EVENT-BEACON-LOSS in wpa_supplicant

After:

              total        used        free      shared  buff/cache   available
Mem:          59560       18412       30124         300       11024       24092

I'll keep it monitored.
Thanks.

I've compiled from source " LuCI Master (git-19.338.61618-71d370a) / OpenWrt SNAPSHOT r11625-a512123a4b" including "ath10k-firmware-qca9888-ct-htt" instead simply "-ct"... just as a test (i never compiled OpenWrt before).
All goes fine but "out of memory" reappear if i enable 5Ghz (which is working now, unlike the previous attempt made installing no "ct" using opkg).
I have a "first impression" according to which 2.4Ghz performance are much better than before (but it could just be an impression ... obviously).
if I have time i will do a compilation test including the non "ct" ... but i'm undecided because now the 2.4Ghz seems to work really well =)

This is the memory status before enabling 5Ghz

and this just after enabling 5Ghz

I've tested CT, CT-HTT and "original".
The "out of memory" with 5Ghz enabled is always the same.
Performace seems to be poor with normal one and better using CT-HTT.

It is because ath10k-ct is used that consumes a lot of RAM. It worked for me in version 1 of the Archer C60.

So far, no more problems with memory with 5Ghz disabled, but a lot of

daemon.notice wpa_supplicant[1589]: wlan1: CTRL-EVENT-BEACON-LOSS

If I switch back to ar71xx, will I be able to use 5Ghz again as I was with 18.06?

I switched from ar71xx to ath79 in the hope to solve memory trobles... but had no lucky.
I guess should be the same for you...

I had been using 18.06 for a year with 5GHz turned on and I never had an out of memory problem. It was up without reboot for more than a month. It's true that I'm using it as a wi-fi extender so that only some smartphones connect to it, but now the problem appears after a couple of hours.
What I notice now that I have a lot of messages in the log, like the CTRL-EVENT-BEACON-LOSS.

I confirm that the router goes out of memory easily if 5GHz is turned on. Is it possible to install the same driver it was used with 18.06? Thanks.

I also noticed that on radio 0 interface LuCI shows "Qualcomm Atheros QCA9886 802.11nac". Shouldn't it be Qualcomm Atheros QCA9882 as reported here?
https://openwrt.org/toh/tp-link/tp-link_archer_c60_v2

Check dmesg or the early logs to see what chip is being detected.

18.06 typically installed the ath10k driver and firmware, not the ath10k-ct version. They can be installed with opkg after removing the ath10k-ct versions.

I will try what you suggest. Meanwhile, this is the dmesg log for ath10k. I see only 9888 here

[   10.582783] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x56.
[   10.599439] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   10.797997] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:00:00.0.txt failed with error -2
[   10.808909] ath10k_pci 0000:00:00.0: Falling back to user helper
[   10.991541] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
[   11.003794] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-5.bin failed with error -2
[   11.015155] ath10k_pci 0000:00:00.0: Falling back to user helper
[   11.194827] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   11.204650] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-2.bin failed with error -2
[   11.216003] ath10k_pci 0000:00:00.0: Falling back to user helper
[   11.392368] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   11.402217] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-6.bin failed with error -2
[   11.413303] ath10k_pci 0000:00:00.0: Falling back to user helper
[   11.589056] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   12.181321] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[   12.190880] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   12.210852] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-012-0ee2f206 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 9586b726
[   12.545167] ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=20 from ath10k/QCA9888/hw2.0/board-2.bin
[   12.559230] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:20 crc32 166b55b8
[   14.600256] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   14.608042] ath10k_pci 0000:00:00.0: msdu-desc: 2500  skid: 32
[   14.638073] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
[   14.649425] ath10k_pci 0000:00:00.0: wmi print 'free: 117888 iram: 22644 sram: 26276'
[   14.889914] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1

Thanks for your help

I do not recommend uninstalling and installing on the same installation image as it does not completely remove the previous driver. I prefer to compile with the necessary driver with ImageBuilder.
In your case you should remove ath10k-firmware-qca9888-ct and kmod-ath10k-ct to install ath10k-firmware-qca9888 and kmod-ath10k.