New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS resource fetch failed followed by another error #202

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 12 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

What steps will reproduce the problem?
1. Unknown, most likely when the cache is not yet available and served by 
Pagespeed.

What is the expected output? What do you see instead?
I expect to see the webpage.
Instead I get this:
Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.15.3-404

On what operating system?
Centos 5.5 x86
Which version of Apache?
httpd-2.2.3


This are the errors from the logs:
[Sun Jan 30 15:08:30 2011] [warn] [mod_pagespeed 0.9.15.3-404] 
http://www.fencingchamps.com/:8: CSS resource fetch failed: 
http://www.fencingchamps.com/wp-content/themes/infocus/lib/scripts/prettyPhoto/c
ss/prettyPhoto.css
[Sun Jan 30 15:08:30 2011] [warn] [mod_pagespeed 0.9.15.3-404] 
http://www.fencingchamps.com/:9: CSS resource fetch failed: 
http://www.fencingchamps.com/wp-content/themes/infocus/style.css
[Sun Jan 30 15:08:30 2011] [alert] [mod_pagespeed 0.9.15.3-404] 
[0130/150830:FATAL:./net/instaweb/rewriter/public/resource.h(62)] Check failed: 
got_contents. Resource contents read before 
loading\nBacktrace:\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a32e4a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a228fa]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a33abf]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738b0f9db]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738b0fc21]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a400ad]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a401c7]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a403a3]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a2370a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b7738a26ea8]\n\t/usr/sbin/httpd(ap_process_request+0x57) 
[0x2b772d7077e7]\n\t/usr/sbin/httpd 
[0x2b772d704b70]\n\t/usr/sbin/httpd(ap_run_process_connection+0x72) 
[0x2b772d700cd2]\n\t/usr/sbin/httpd [0x2b772d70b789]\n\t/usr/sbin/httpd 
[0x2b772d70ba1a]\n\t/usr/sbin/httpd(ap_mpm_run+0x78d) 
[0x2b772d70c27d]\n\t/usr/sbin/httpd(main+0x7e8) 
[0x2b772d6e6e48]\n\t/lib64/libc.so.6(__libc_start_main+0xf4) 
[0x2b772f611994]\n\t/usr/sbin/httpd [0x2b772d6e6199]
[Sun Jan 30 15:08:32 2011] [notice] child pid 28595 exit signal Aborted (6)

The page would load fine after a refresh with the css & js combined.

Original issue reported on code.google.com by ionut.ne...@gmail.com on 30 Jan 2011 at 6:15

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Thanks for the report. We'll look into this right away.

Original comment by sligocki@google.com on 31 Jan 2011 at 4:41

  • Changed state: Accepted
  • Added labels: Priority-High
  • Removed labels: Priority-Medium
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

I'm seeing a very similar problem.



[Thu Feb 03 00:40:01 2011] [error] [mod_pagespeed 0.9.15.3-404] Minification 
failed.  Preserving old code.
[Thu Feb 03 00:40:01 2011] [alert] [mod_pagespeed 0.9.15.3-404] 
[0203/004001:FATAL:./net/instaweb/rewriter/public/resource.h(62)] Check failed: 
got_contents. Resource contents read before 
loading\nBacktrace:\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed44de4a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed43d8fa]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed44eabf]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed52a9db]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed52ac21]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed45b0ad]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed45b1c7]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed45b3a3]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed43e70a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b01ed441ea8]\n\t/etc/httpd/modules/libphp5.so 
[0x2b01ee146a5c]\n\t/usr/sbin/httpd(ap_run_handler+0x7a) 
[0x2b01e2b79a0a]\n\t/usr/sbin/httpd(ap_invoke_handler+0x78) 
[0x2b01e2b7ce98]\n\t/usr/sbin/httpd(ap_process_request+0x1a8) 
[0x2b01e2b87938]\n\t/usr/sbin/httpd 
[0x2b01e2b84b70]\n\t/usr/sbin/httpd(ap_run_process_connection+0x72) 
[0x2b01e2b80c92]\n\t/usr/sbin/httpd [0x2b01e2b8b7e9]\n\t/usr/sbin/httpd 
[0x2b01e2b8ba7a]\n\t/usr/sbin/httpd(ap_mpm_run+0x78d) 
[0x2b01e2b8c2dd]\n\t/usr/sbin/httpd(main+0x7e8) 
[0x2b01e2b66e48]\n\t/lib64/libc.so.6(__libc_start_main+0xf4) 
[0x2b01e4a94994]\n\t/usr/sbin/httpd [0x2b01e2b66199]
[Thu Feb 03 00:40:02 2011] [notice] child pid 26064 exit signal Aborted (6)

Original comment by o...@op-design.com on 3 Feb 2011 at 6:05

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Hi... It would help us understand the log information better if you could tell 
us what address mod_pagespeed.so is loaded at. To get that information:
1) use ps ax|grep httpd to get a list of all apache instances. Pick any line 
that's not the first, and note the number in the first column. That should be 
the PID of one of the worker processes.
2) cat /proc/maps/(put the pid here) | grep mod_pagespeed.so
3) Paste the output here

Original comment by morlov...@google.com on 3 Feb 2011 at 3:19

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Fresh new error & maps output:

[Thu Feb 03 11:05:29 2011] [warn] [mod_pagespeed 0.9.15.3-404] 
http://www.hookedonfencing.org/:9: CSS resource fetch failed: 
http://www.hookedonfencing.org/sites/default/files/css/css_282ed1af0b1217e921441
217138bed20.css
[Thu Feb 03 11:05:29 2011] [warn] [mod_pagespeed 0.9.15.3-404] 
http://www.hookedonfencing.org/:9: CSS resource fetch failed: 
http://www.hookedonfencing.org/sites/default/files/css/css_282ed1af0b1217e921441
217138bed20.css
[Thu Feb 03 11:07:52 2011] [alert] [mod_pagespeed 0.9.15.3-404] 
[0203/110752:FATAL:./net/instaweb/rewriter/public/resource.h(62)] Check failed: 
got_contents. Resource contents read before 
loading\nBacktrace:\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b013ce4a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b012c8fa]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b013dabf]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b02199db]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b0219c21]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b014a0ad]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b014a1c7]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b014a3a3]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b012d70a]\n\t/usr/lib64/httpd/modules/mod_pagespeed.so 
[0x2b36b0130ea8]\n\t/etc/httpd/modules/libphp5.so 
[0x2b36b0e63266]\n\t/usr/sbin/httpd(ap_run_handler+0x7a) 
[0x2b36a76e8a4a]\n\t/usr/sbin/httpd(ap_invoke_handler+0x78) 
[0x2b36a76ebed8]\n\t/usr/sbin/httpd(ap_process_request+0x1a8) 
[0x2b36a76f6938]\n\t/usr/sbin/httpd 
[0x2b36a76f3b70]\n\t/usr/sbin/httpd(ap_run_process_connection+0x72) 
[0x2b36a76efcd2]\n\t/usr/sbin/httpd [0x2b36a76fa789]\n\t/usr/sbin/httpd 
[0x2b36a76faa1a]\n\t/usr/sbin/httpd(ap_mpm_run+0x78d) 
[0x2b36a76fb27d]\n\t/usr/sbin/httpd(main+0x7e8) 
[0x2b36a76d5e48]\n\t/lib64/libc.so.6(__libc_start_main+0xf4) 
[0x2b36a9600994]\n\t/usr/sbin/httpd [0x2b36a76d5199]
[Thu Feb 03 11:07:52 2011] [notice] child pid 12695 exit signal Aborted (6)

2b36b010e000-2b36b02a3000 r-xp 00000000 08:02 15975310                   
/usr/lib64/httpd/modules/mod_pagespeed.so
2b36b02a3000-2b36b04a3000 ---p 00195000 08:02 15975310                   
/usr/lib64/httpd/modules/mod_pagespeed.so
2b36b04a3000-2b36b04b2000 rw-p 00195000 08:02 15975310                   
/usr/lib64/httpd/modules/mod_pagespeed.so

Not sure if related but a test at http://loadimpact.com pretty much killed the 
server at 40 concurrent clients, stopped before it hit 50 clients. A test that 
I successfully done with a load average less then 1.00 without modpagespeed.
This on a server with 1 website on it, 2 amd cpu's, 8gigs ram, intel ssd x25-m 
& modpagespeed cache served from ram.

Without modpagespeed:
http://loadimpact.com/result/www.hookedonfencing.org-e24ce9878532a204fe135e698f4
9494e
With modpagespeed:
http://loadimpact.com/result/www.hookedonfencing.org-f7ac41535c3b201a5bad1a29764
4af7c

Original comment by ionut.ne...@gmail.com on 3 Feb 2011 at 4:28

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Let's figure out the crashing issue first --- in my experience stress tests 
with crashing versions tend to go rather... oddly. Thanks to your information, 
I think I recovered enough of the backtrace to have an idea of what may be 
going wrong. 
If it would be at all possible, it may help if you did one more test run: just 
collect the log output with apache LogLevel bumped up to Info. That's usually 
undesirable with mod_pagespeed (we are rather... talkative) but it can help 
figure out things when something is going wrong. There are basically 2 issues 
here:
1) On your sites we are having problems loading resources.
2) The error information we get when the loading fails gets us really confused 
and we abort.

Fixing #1 should hopefully be enough to get things working (and is quite likely 
doable via the config file) and may explain a few details of #2 which I can't 
figure out based on the backtrace. 

Below is more detailed code information that might not be of interest to you, 
but which I want to record permanently for discussion with my colleagues:

The relevant part of bt is this:

/usr/lib64/httpd/modules/mod_pagespeed.so net_instaweb::Resource::contents() 
const
/usr/lib64/httpd/modules/mod_pagespeed.so 
net_instaweb::JavascriptFilter::EndElementImpl(net_instaweb::HtmlElement*)

Looking at this backtrace as well as the two warnings gives a consistent 
picture: 
we get a resource from ReadIfCached() that's non-NULL but has ContentsValid() 
== false and aborting contents() (HttpValue without a body)? The difference in 
behavior is because the CSS filter checks ContentsValid and JS filter doesn't 
(and looks like I need to fix the new code in RewriteSingleResourceFilter to 
check ContentsValid as well; I can't think of a way of hitting that case 
though); unfortunately I can't 
quite figure out when that case can happen; would appreciate feedback from 
people who 
know HttpValue code better than me.

Original comment by morlov...@google.com on 3 Feb 2011 at 7:00

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

I changed the loglevel to info. Here is the apache log that lead to 2 crashes.

Original comment by ionut.ne...@gmail.com on 4 Feb 2011 at 2:48

Attachments:

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Thanks. I believe I've identified one bug that can cause this failure, but I am 
not certain if it's the bug that's causing the trouble for you. One question in 
that regard: do the failures happen 100% of the time, or for some intermittent 
periods?

Original comment by morlov...@google.com on 4 Feb 2011 at 3:20

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

It's intermittent, but then again I don't get a lot of traffic.

Original comment by ionut.ne...@gmail.com on 4 Feb 2011 at 4:07

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 4 Feb 2011 at 8:34

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

This should be fixed by r428; a settings workaround would be to disable the 
rewrite_javascript filter.

Original comment by morlov...@google.com on 4 Feb 2011 at 9:40

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

When is there going to be a new release with this fix in it? I'd love to 
re-enable mod_pagespeed!

Original comment by o...@op-design.com on 24 Feb 2011 at 8:04

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 24 Feb 2011 at 9:46

  • Added labels: release-note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment