TP-Link WR841ND -> Reboot on High CPU Load

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
ivenae
DD-WRT Novice


Joined: 08 May 2023
Posts: 1

PostPosted: Mon May 08, 2023 12:35    Post subject: TP-Link WR841ND -> Reboot on High CPU Load Reply with quote
I have multiple WR841-ND Devices, from Rev. 9 to 11.

On all those devices the hostapd Service will crash after a 20 to 150 hours.
You can detect this crash because the power consumption goes up and the load average rise to 1.00.

The time after which the service-crash occurs has something to do with the hardware and is no problem of software or power supply. Some devices do not even survive a day, some survive up to 5 days.

A daily reboot (reboot after 86400 seconds) will help out normally, but on some devices even this period of time is too short.
I would normally recommend to sort out those devices who begin to crash once a day, but maybe there is a reason for you to do not.

Question was: Can i detect the crashed hostapd service somehow and reboot automagically.

Answer is: Yes, you can.

If the load average is equal to '1.00' for the last 15 min, the service obviously crashed.

Put the following script to the end of the startup config:

Code:
while [ "$(cut -d ' ' -f 3 /proc/loadavg)" != "1.00" ]; do sleep 600 ; done; reboot


If you already fixed your switch config (Per Default you can use only one switchport at the same time with this device) you have to put it behind the switch port solution, because it is an endless loop until reboot and code after this won't be executed.

My complete config is:

Code:
swconfig dev switch0 set reset 1
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 set apply
while [ "$(cut -d ' ' -f 3 /proc/loadavg)" != "1.00" ]; do sleep 600 ; done; reboot
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2975
Location: Germany

PostPosted: Mon May 08, 2023 12:51    Post subject: Reply with quote
In newer builds, VLANs can be configured easily via "switch config tab".

No idea what the commands are supposed to be good for.
They delete any port configuration of the switch and enable VLAN support.

Looks like a misconfiguration to me. (without configured ports)
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12884
Location: Netherlands

PostPosted: Mon May 08, 2023 12:58    Post subject: Reply with quote
What build are you running?

Latest and recommended build 52459 Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1935

PostPosted: Mon May 08, 2023 15:56    Post subject: Reply with quote
Startup commands that have been required for certain Atheros devices for quite some time:

#3736 reopened BUG: LAN port isolation issue on builds ≥ 23919 (Atheros - AR71xx)
#4877 closed (duplicate) D-Link DIR615 - E3 - LAN/Switchport DHCP/Communication Issues
#5663 closed (duplicate) embedded switch not switching on TL-WR841NDv10

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2975
Location: Germany

PostPosted: Mon May 08, 2023 16:11    Post subject: Reply with quote
VLAN support (enable_vlan 1) can be activated in the GUI.
Also the command "swconfig dev switch0 set reset" deletes the complete switch configuration, how should VLAN work if no ports are assigned?
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1935

PostPosted: Mon May 08, 2023 16:52    Post subject: Reply with quote
Acquire any one of the affected hardware and investigate for yourself. There is no connectivity between LAN ports without the startup script, which varies by device, or did. Unfortunately, no affected devices present at current location to "explain". Maybe this could be another thing you could champion a fix for a long-standing issue? OR, maybe we could investigate in this thread with OP's hardware to see if the script is still required? All we know here is that at 52330, the script is still required and all LAN ports work as they should.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6437
Location: UK, London, just across the river..

PostPosted: Tue May 09, 2023 7:12    Post subject: Reply with quote
Yep time ago, i had my hands on one WR841ND with the same necessity..and it was acting odd with stock firmware too, wifi would ve jam in a day of use, tried the last stock firmware available by that time, with same issues...than moved to DDWRT LAN ports ware not working...put that script there, happy days, but....wifi was acting the same, well...a touch better as it could survive more than a day...
Checked PSU it was fine..than I concluded those are just a bad batch, as ive found others, that have the same complains...it was similar experience with one WR941ND i had as well...so, I decided to stay away from cheap TP-link 8 or 9 series...
well i have an old 740v1 and had 740v4 rock solid as 1043v2's are...no need of lan script

I haven't tried Switch tab on 740v1, yet but doubt swconfig is compiled in the 4MB firmware...and BS removed switch tab on those that don't have it...shame i haven't notice it, as i don't play with it too often and its been rock solid as a WAP..
On one of my 1043v2 i ve x4 VLAN via CLI and haven't tried switch tab yet too..shame on me..but..what i also know if 1043v2 goes low on working RAM, wifi jams immediately, so no chance to run VPN and pbr, adblock and x4 vlan's at the same time...all ports working as they should..
So, LAN script is needed only on some 8-9 series you can check what switch they are build in...and it could be the breaking point..i guess..

p.s. i can see CONFIG_SWCONFIG=y is present on some 7-8-9 series units, but not sure of the full configuration capabilities of those in order to achieve full port segmentation..to work as it should..as well all those units have 32MB of working ran, that FREE ram always stays on very low side...so stability on a high loads is uncertain...
740v1 checked updated to 52459, swtchtab yes Razz

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1935

PostPosted: Tue May 09, 2023 16:24    Post subject: Reply with quote
Interesting that you report the TL-WR7***** series are (now) unaffected. It must be a switch model specific bug.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum