Re: CPU hog bug with https?

"Sebastian Geerken" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Hi Jorge,

On Di, Mai 17, 2016, Jorge Arellano Cid wrote:
> On Sun, May 01, 2016 at 09:58:53PM +0200, Sebastian Geerken wrote:
> > On So, Mai 01, 2016, Jorge Arellano Cid wrote:
> > > Hi,
> > > 
> > >   If I start current dillo with [1], an https dialog springs
> > > (untrusted certificate). Answering "continue" gets into a CPU hog,
> > > answering "cancel" allows reading the page with no problems.
> > > 
> > >   FWIW, I've done that lots of times with other sites, and this is the
> > > first CPU hog I get accross.
> > > 
> > > 
> > > [1] https://linux.slashdot.org/comments.pl?sid=5852295&cid=48188823
> > 
> > I can reproduce this. However, profiling shows rather problems in the
> > rendering code (dw::core::Widget::queueResize etc.), so the problem is
> > probably not related to HTTPS.
> > 
> > Also, mirroring this page ("wget -pkH") and displaying it locally
> > shows the same symptoms.
> > 
> > Looks that this belongs rather on my todo list.
> 
>   Good news on this one.
> 
>   Patch committed!

Thanks for the good work! It also seems to fix the problems with
netzpolitik.org and nachdenkseiten.de. (Others please check this,
too.)

I've one case in my list, which is already analyzed. More on this
later.
 
>   I'd like to comment a bit on this bugfix for those that would like to
> help making patches for dillo. You can check the patch and verbose
> log with: "hg log -vp|less".
> 
>   It was hard to find, sometimes backtraces gave near 85 or more nested calls,
> full of different functions. There was no CPU lock because it finally solved
> the page (after more than two minutes in my machine).
> 
>   It took a few days of work, by reducing the testcase (a slashdot page) by:
>      * removing the scripting
>      * removing one stylesheet completely (no bug without CSS).
>      * removing sections of the HTML code
>   while checking the bug was still reproducible. And checking the backtrace
> stack from gdb from time to time. gprof may have served also, but as there
> where so many functions I decided to keep reducing the case.
> 
>   This is a trial&error iteration process.
> 
>   At some point I could clean the testcase enough to run tidy on it, and
> no, it wasn't a tag soup corner case.
> 
>   Back to reducing the testcase. It started to solve in less time, but still
> hogging my CPU for near 20 secs..
> 
>   Then suddenly at some point, gdb's backtrace was still near the hundred
> in depth, but a few functions remained. Studying the code in the involved
> functions made me finally spot the hiding bug. Trivial to fix, but very
> hard to find.
> 
>   For this case, what took more than 2 minutes to render, now takes near 1/8
> second. ;-)

Yes, this is the usual way I track down bugs, too. This is much
simpler for rendering bugs, which can be preserved while simplifying
the page. This kind of bug is much more difficult since the effect
(taking too much time) vanishes the more the simpler the page gets.

Sebastian

_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJXPNmzAAoJEAw7+YHB+ZL6k9cIAKI2P6zWjhdEn2E6gGvpYAj8
R4LdVhbOJ6Bb9MW3liIMuMCXa2+1Bpqo6Vta9iVcRTWTxUeZwYO361T8KW9n5oX+
GaNXrcE3gBYqzVdqkNI5jFh0WYXy1iK9+zE/owCJi4jrHM6qsVF4EN/g1JVikmlY
n0jdV4wZy8uzMCRNY4F90lO9kugjYObsbKnCrcI6UX7+j+DVn5KD/+636k2fOc27
COfxSbgSlQ+gwXNUM88zPfZykYIoipdZcmRPaBx3iaonUga+pApcCjH8vTlJoRrG
XncHifM3+74oauMRMzLZP2AuBTqFyz7Apm65wxDMwFEaVI+vgYXvI5cmOA5W2rA=
=OX72
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.