apache / incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
http://ngxpagespeed.com/
Apache License 2.0
4.37k stars 362 forks source link

third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 #489

Open ck-on opened 11 years ago

ck-on commented 11 years ago

Trying ngx_pagespeed 1.6.29.5 beta on Nginx 1.4.2 in Centos 64bit with GCC 4.7.2 Throws segfault on every web page load, errors loop like this:

2013/08/20 07:44:39 [notice] 20855#0: signal 17 (SIGCHLD) received
2013/08/20 07:44:39 [alert] 20855#0: worker process 20856 exited on signal 11
Aug 20 07:44:39 ns5001733 kernel: nginx[20856]: segfault at ffffffffffffffe8 ip 00000000005c80b9 sp 00007fff26d35620 error 4 in nginx[400000+85b000]
2013/08/20 07:44:39 [notice] 20855#0: start worker process 20906
2013/08/20 07:44:39 [notice] 20855#0: signal 29 (SIGIO) received
2013/08/20 07:44:39 [info] 20906#0: [ngx_pagespeed 1.6.29.5-3346] Reusing shared memory for path: /var/cache/pagespeed.
third_party/re2/src/re2/re2.cc:113: Unknown encoding 0
third_party/re2/src/re2/re2.cc:113: Unknown encoding 0
jeffkaufman commented 11 years ago

Is there anything unusual about your pagespeed or nginx configurations?

Would you be able to compile with --with-debug to get more detailed log messages?

Can you get a backtrace?

jeffkaufman commented 11 years ago

(Looking at the re2 code, the "Unknown encoding 0" error means that re2 doesn't recognize the encoding and is treating it as utf8. I think this is probably an unrelated issue.)

luctory commented 10 years ago

Passing on content handling for non-pagespeed resource 'http://www.lxxx.com/' "^(.+?.php)(/.+)$" does not match "/index.php", client: 125.39.84.89, server: www.lxxx.com, request: "GET / HTTP/1.1", host: "www.lxxx.com" 2014/04/20 14:33:37 [debug] 14901#0: *21 Passing on content handling for non-pagespeed resource 'http://www.lxxx.com/' 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(523)] Attaching RewriteDriver 0x1c43b90 to HtmlRewriter 0x1c472a0 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(568)] Parse successfully started. 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(941)] Fetch result:1 http://www.lxxx.com/ : 200 2014/04/20 14:33:37 [notice] 14787#0: signal 17 (SIGCHLD) received 2014/04/20 14:33:37 [alert] 14787#0: worker process 14901 exited on signal 11 2014/04/20 14:33:37 [notice] 14787#0: start worker process 14909 2014/04/20 14:33:37 [notice] 14787#0: signal 29 (SIGIO) received 2014/04/20 14:33:37 [info] 14909#0: [ngx_pagespeed 1.7.30.4-3847] Reusing shared memory for path: /home/www/ngx_pagespeed_cache.

luctory commented 10 years ago

Passing on content handling for non-pagespeed resource 'http://www.lxxx.com/' "^(.+?.php)(/.+)$" does not match "/index.php", client: 125.39.84.89, server: www.lxxx.com, request: "GET / HTTP/1.1", host: "www.lxxx.com" 2014/04/20 14:33:37 [debug] 14901#0: *21 Passing on content handling for non-pagespeed resource 'http://www.lxxx.com/' 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(523)] Attaching RewriteDriver 0x1c43b90 to HtmlRewriter 0x1c472a0 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(568)] Parse successfully started. 2014/04/20 14:33:37 [debug] 14901#0: [ngx_pagespeed 1.7.30.4-3847] [0420/143337:VERBOSE1:proxy_fetch.cc(941)] Fetch result:1 http://www.lxxx.com/ : 200 2014/04/20 14:33:37 [notice] 14787#0: signal 17 (SIGCHLD) received 2014/04/20 14:33:37 [alert] 14787#0: worker process 14901 exited on signal 11 2014/04/20 14:33:37 [notice] 14787#0: start worker process 14909 2014/04/20 14:33:37 [notice] 14787#0: signal 29 (SIGIO) received 2014/04/20 14:33:37 [info] 14909#0: [ngx_pagespeed 1.7.30.4-3847] Reusing shared memory for path: /home/www/ngx_pagespeed_cache.

oschaaf commented 10 years ago

@luctory Could you add this to the http{} block in your nginx.conf file?: pagespeed InstallCrashHandler on;?

Hopefully, a backtrace of the segmentation fault will be logged - if you can capture and post that backtrace of this that would be great .

luctory commented 10 years ago

thanks @oschaaf I did it,and got the next logs.

2014/04/20 20:32:34 [debug] 1684#0: *414 Passing on content handling for non-pagespeed resource

'http://www.lxxx.com/' 2014/04/20 20:32:34 [notice] 1684#0: *414 "^(.+?.php)(/.+)$" does not match "/index.php", client: 125.39.84.89, server:

www.lxxx.com, request: "GET / HTTP/1.1", host: "www.lxxx.com" 2014/04/20 20:32:34 [debug] 1684#0: *414 Passing on content handling for non-pagespeed resource

'http://www.lxxx.com/' 2014/04/20 20:32:34 [debug] 1684#0: [ngx_pagespeed 1.7.30.4-3847] [0420/203234:VERBOSE1:proxy_fetch.cc(523)]

Attaching RewriteDriver 0x292db60 to HtmlRewriter 0x29335c0 2014/04/20 20:32:34 [debug] 1684#0: [ngx_pagespeed 1.7.30.4-3847] [0420/203234:VERBOSE1:proxy_fetch.cc(568)]

Parse successfully started. 2014/04/20 20:32:34 [debug] 1684#0: [ngx_pagespeed 1.7.30.4-3847] [0420/203234:VERBOSE1:proxy_fetch.cc(941)]

Fetch result:1 http://www.lxxx.com/ : 200 2014/04/20 20:32:34 [alert] 1684#0: Trapped signal [11] Backtrace: nginx: worker process() [0x48fb3a] nginx: worker process() [0x5bbb11] nginx: worker process() [0x47a4cb] /lib64/libc.so.6(+0x329a0) [0x7f76854269a0] nginx: worker process() [0x5a12a7] nginx: worker process() [0x5a141e] nginx: worker process() [0x592ffe] nginx: worker process() [0x767f33] nginx: worker process() [0x4efd0b] nginx: worker process() [0x72fc11] nginx: worker process() [0x4c7d91] nginx: worker process() [0x5e5fe0] nginx: worker process() [0x4cb26b] nginx: worker process() [0x4b6952] nginx: worker process() [0x5b1a82] nginx: worker process() [0x62670c] nginx: worker process() [0x5b1a82] nginx: worker process() [0x62b1b6] nginx: worker process() [0x62cff8] /lib64/libpthread.so.0(+0x79d1) [0x7f76870049d1] /lib64/libc.so.6(clone+0x6d) [0x7f76854dcb6d]

2014/04/20 20:32:34 [notice] 1370#0: signal 17 (SIGCHLD) received 2014/04/20 20:32:34 [alert] 1370#0: worker process 1684 exited on signal 9 2014/04/20 20:32:34 [notice] 1370#0: start worker process 1696 2014/04/20 20:32:34 [notice] 1370#0: signal 29 (SIGIO) received 2014/04/20 20:32:34 [info] 1696#0: [ngx_pagespeed 1.7.30.4-3847] Reusing shared memory for path:

/home/cache/ngx_pagespeed_cache2. third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 third_party/re2/src/re2/re2.cc:113: Unknown encoding 0 third_party/re2/src/re2/re2.cc:113: Unknown encoding 0

luctory commented 10 years ago

website is in centos,hhvm+nginx

luctory commented 10 years ago

the next is another tips

In file included from /home/ngx_pagespeed-1.7.30.4-beta/psol/include/third_party/chromium/src/base/logging.h:14:0, from /home/ngx_pagespeed-1.7.30.4-beta/src/log_message_handler.cc:30: /home/ngx_pagespeed-1.7.30.4-beta/psol/include/third_party/chromium/src/base/basictypes.h: in function‘Dest bit_cast(const Source&)’中: /home/ngx_pagespeed-1.7.30.4-beta/psol/include/third_party/chromium/src/base/basictypes.h:318:16: error:typedef ‘VerifySizesAreEqual’ locally defined but not used [-Werror=unused-local-typedefs] typedef char VerifySizesAreEqual [sizeof(Dest) == sizeof(Source) ? 1 : -1];

oschaaf commented 10 years ago

@luctory It would help if you could you recompile --with-debug and set the error logging level to debug in nginx, and post another capture of the crash, up to and including a few lines before crash. If that isn't possible, your exact nginx version would also be good to know

oschaaf commented 10 years ago

@luctory -- sorry, I see you already have compiled --with-debug. It's hard for me to translate the addresses in the backtrace to line numbers in the source code on my system. Could you post the output of this on your system (you might need to set the -e flag to the correct path to the nginx binary)? This should translate the addresses to line numbers in the source code, and hopefully that gives something easier to work with:

addr2line -e /usr/local/nginx/sbin/nginx 0x804d5ce 0x5bbb11 0x47a4cb 0x5a12a7 0x5a141e 0x592ffe 0x767f33 0x4efd0b 0x72fc11 0x4c7d91 0x5e5fe0 0x4cb26b 0x4b6952 0x5b1a82 0x62670c 0x5b1a82 0x62670c 0x5b1a82 0x62b1b6 0x62cff8