Netgear r8000: Config pages intermittantly fail to load

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
Hapi12021
DD-WRT User


Joined: 22 Jul 2021
Posts: 84

PostPosted: Mon Sep 26, 2022 15:47    Post subject: Reply with quote
dale_gribble39 wrote:
It has always been random. No definite chronic specific circumstantial variables involved. I'm somewhat confident that maybe once all of the .css / webUI code tweaks are done, it may settle out. We'll see. <wink>


A while back I traced similar problems back to thread exceptions in HTTPd, and farther into uClibc. This is really a combination BusyBox / uClibc / ARM soft float issue and uClibc really needs to be compiled with options more lenient (safer and less performant) for this hardware. What you end up seeing is thread exceptions during concurrency and the aborted http requests are the threads that aborted.

Also, older versions of GCC emit questionable compiled output for ARMv7 and up, and this is also seen across OpenWRT / Entware / Optware. A change to a real libC would be of benefit for platforms that have ample space.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Sep 26, 2022 15:54    Post subject: Reply with quote
Almost all routers use glibc and are compiled with gcc10 or higher.
_________________
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
Hapi12021
DD-WRT User


Joined: 22 Jul 2021
Posts: 84

PostPosted: Mon Sep 26, 2022 16:04    Post subject: Reply with quote
egc wrote:
Almost all routers use glibc and are compiled with gcc10 or higher.


The debugging I did was not on DD, but showed that compilation adjustments were necessary for uClibc concurrency to perform properly under older GCC builds.

What I’m getting at is that there are probably concurrency bugs that still remain and less-aggressive compilation flags may benefit DD, even if using a complete libc, simply because of ARM soft float and unaddressed ARM ABI bugs in GCC.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Sep 26, 2022 16:14    Post subject: Reply with quote
It is certainly possible that there are thread exceptions due to compiler optimization.

I am not an expert in optimizations my knowledge stops at setting O2 or Os Smile

I actually compile with O2 and see very little problems but maybe I should look more carefully.

_________________
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
Hapi12021
DD-WRT User


Joined: 22 Jul 2021
Posts: 84

PostPosted: Tue Sep 27, 2022 3:37    Post subject: Reply with quote
egc wrote:
It is certainly possible that there are thread exceptions due to compiler optimization.

I am not an expert in optimizations my knowledge stops at setting O2 or Os Smile

I actually compile with O2 and see very little problems but maybe I should look more carefully.


I would habitually be cautious of -Os on platforms where GCC has to insert its own math code because the ABI doesn’t include support for float or double precision math. You literally tell the compiler to insert extra code to emulate an FPU, and in the next pass tell it to strip out as much as it can (for size) without knowing how much overlap (if any) exists between the two and practical limitations to how that stripping affects soft-FPU routines.

Of course compiler designers are supposed to take these corner cases into account, but my suggestion is to leave optimization at -O or enable -Werror to flush out subtle warnings as build-stopping errors. If size is still too large, then reconsider why uClibc exists for embedded projects in the first place.

Another, more extreme, suggestion for compilation auditing is to compile in both GCC and CLANG and verify warnings across both tools, as each will detect and lint code with different tables. For ARM this gets a little harder as the soft-FPU code is not the same across the tools.

Bad memories of early GCC and SUN Forte compiling on Sparc prior to US-II…however, I caught a lot of bugs in GCC running it up against a commercial compiler.
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum