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

Incorrect Date header on 32 bit #913

Closed
mqudsi opened this Issue Feb 15, 2015 · 14 comments

Comments

Projects
None yet
3 participants
@mqudsi
Copy link

mqudsi commented Feb 15, 2015

This issue is possibly related to #577 and #604/#605

With ngx_pagespeed, the Date header is being output incorrectly.

curl -I http://squdsi.com/
HTTP/1.1 200 OK
Server: nginx/1.7.9
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Date: Wed, 28 Jan 1970 10:26:51 GMT
X-Page-Speed: 1.9.32.3-4448
Cache-Control: max-age=0, no-cache

vs with ngx_pagespeed disabled:

curl -I "http://squdsi.com/?ModPagespeed=off&ModPagespeedFilters=add_instrumentation"
HTTP/1.1 200 OK
Server: nginx/1.7.9
Date: Sun, 15 Feb 2015 12:51:04 GMT
Content-Type: text/html
Content-Length: 2577
Last-Modified: Sat, 26 May 2012 15:22:52 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "4fc0f54c-a11"
Vary: Accept-Encoding
Accept-Ranges: bytes

I've had to turn off ngx_pagespeed for the moment until I figure out why it's segfaulting with every other request (I'll report if it's not my mistake), but I'll try and provide as much debug info as I can.

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 15, 2015

@mqudsi It would be great of you could recompile --with-debug, and add pagespeed InstallCrashHandler on; to nginx.conf. This probably would get a backtrace in error.log for the segfault, which in turn hopefully helps a lot figuring out why that happens.

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 15, 2015

@mqudsi About the wrong date header: I'll look into it.

@mqudsi

This comment has been minimized.

Copy link

mqudsi commented Feb 15, 2015

This is probably not going to be of much help.

nginx: worker process() [0x8075f0d]
nginx: worker process() [0x806c17e]
nginx: worker process() [0x8073cae]
nginx: worker process() [0x80724f8]
nginx: worker process() [0x8074c44]
nginx: worker process() [0x8054d7e]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x3ad4d3]
nginx: worker process() [0x8053aa1]

That's with --with-debug. I was planning on enabling core dumps and running under gdb, unless you have a better way?

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 15, 2015

@mqudsi "That's with --with-debug. I was planning on enabling core dumps and running under gdb, unless you have a better way?"

That sounds great, thanks!

@mqudsi

This comment has been minimized.

Copy link

mqudsi commented Feb 15, 2015

OK, I got the backtrace via gdb. Didn't do a core dump just yet as I think there just might be enough info here to pin the problem. Uploaded to pastebin, as much as I hate doing that, because github won't let you attach logs: http://pastebin.com/qwY5JjaT

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 15, 2015

@mqudsi Looks like you are hitting the same issue as #887.
You could either switch to trunk-tracking, or configure the workaround provided over there.

@mqudsi

This comment has been minimized.

Copy link

mqudsi commented Feb 15, 2015

@oschaaf Thanks. However, if the workaround you're referring to is pagespeed EnableCachePurge on, I already have that configured. Although it is in the server scope, not global, come to think of it.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Feb 15, 2015

I do see the Date: problem:

$ curl -s -D- http://squdsi.com/ -o/dev/null | grep Date:
Date: Wed, 28 Jan 1970 14:19:07 GMT
$ curl -s -D- http://squdsi.com/?PageSpeed=off -o/dev/null | grep Date:
Date: Sun, 15 Feb 2015 16:42:07 GMT

Checking some other ngx_pagespeed sites, jefftk.com and ngxpagespeed.com, I don't see Date: issues.

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 15, 2015

@mqudsi Could you PM me your (anonymized) nginx configuration file(s)? I'd like to see if I can reproduce it.

@mqudsi

This comment has been minimized.

Copy link

mqudsi commented Feb 16, 2015

@oschaaf I emailed you the nginx config. The segfault was indeed resolved by setting EnableCachePurge for all sites, it was requests to a much smaller virtual host that were triggering a segfault each and every cache miss without it.

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 16, 2015

This was discussed some more at #910 and looks like a bug that would occur on 32 bits platforms.

oschaaf added a commit that referenced this issue Feb 17, 2015

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 17, 2015

@mqudsi #916 should fix the date issue

@oschaaf oschaaf closed this in #916 Feb 17, 2015

@mqudsi

This comment has been minimized.

Copy link

mqudsi commented Feb 17, 2015

@oschaaf Confirmed fixed. Thank you.

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 17, 2015

@mqudsi great to hear it's working, thanks for confirming!

oschaaf added a commit that referenced this issue May 13, 2015

@jeffkaufman jeffkaufman changed the title Regression: Pagespeed sets invalid/incorrect Date header Incorrect Date header on 32 bit Jul 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment