OLSWS 1.3.3 Bugs

76 views
Skip to first unread message

George Alin

unread,
Jul 9, 2014, 3:03:24 AM7/9/14
to openlitespee...@googlegroups.com
The cache module was configured using this guide.
And another minor thing: "Open Litespeed Web Server Open 1.3.3". Call me perfectionist but I think the last "Open" is redundant. :D

I am posting future bugs here as I get to test the 1.3.3 version.
cache_module_fail.JPG

lsmichael

unread,
Jul 9, 2014, 10:12:05 AM7/9/14
to openlitespee...@googlegroups.com
It is redundant... And who knows how long it's been there...

Thanks for pointing things out. We really appreciate it.

Cheers,

Michael

David

unread,
Jul 9, 2014, 5:36:46 PM7/9/14
to George Alin, openlitespee...@googlegroups.com
Thank you for your bug report, and the below is the patch to fix it and will be in the next release.
diff --git src/http/httpsession.cpp src/http/httpsession.cpp
index ee2eca6..5455713 100644
--- src/http/httpsession.cpp
+++ src/http/httpsession.cpp
@@ -2322,6 +2322,7 @@ int HttpSession::setupGzipBuf()
                         "[%s] setupGzipBuf() begin GZIP stream.\n",
                         getLogId() ));
                 m_response.addGzipEncodingHeader();
+                m_request.orGzip( UPSTREAM_GZIP );
                 return 0;
             }
             else


diff --git src/lsiapi/lsiapilib.cpp src/lsiapi/lsiapilib.cpp
index af3a717..fb2a879 100644
--- src/lsiapi/lsiapilib.cpp
+++ src/lsiapi/lsiapilib.cpp
@@ -1050,7 +1050,7 @@ static int is_resp_buffer_gzippped(lsi_session_t *session)
     if (pSession == NULL)
         return -1;
    
-    if (pSession->getGzipBuf())
+    if (pSession->getReq()->gzipAcceptable() & ( UPSTREAM_GZIP | UPSTREAM_DEFLATE ))
         return 1;
     else
         return 0;


Please let us know if there is any problem.

Thanks.
David
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
To post to this group, send email to openlitespee...@googlegroups.com.
Visit this group at http://groups.google.com/group/openlitespeed-development.
For more options, visit https://groups.google.com/d/optout.

George Alin

unread,
Jul 10, 2014, 12:49:52 AM7/10/14
to openlitespee...@googlegroups.com
Thank you for patching it so fast :D
The cache module works now.

Just another simple question: If using the OLSWS cache module one must disable varnish, opcache, apcu?

George Wang

unread,
Jul 10, 2014, 9:07:10 AM7/10/14
to openlitespee...@googlegroups.com
OLSWS cache has the same function as varnish, opcache and apc are PHP opcode cache, which is different to page cache, should be kept.

Best regards,
George Wang

George Alin

unread,
Jul 20, 2014, 7:11:33 AM7/20/14
to openlitespee...@googlegroups.com
What is that bak_core created in /tmp ?
I have mounted /tmp noexec, noatime, nosuid, nodiratime, nobarrier and implemented a script that scans /tmp every minute for .so bynaries, perl, sh etc. and tars it automatically along with sending an email regarding the action done by my script.
I see a core.so created everytime in bak_core. What's the purpose of it?
How can I disable the auto creation of any .so file by olsws?

George Wang

unread,
Jul 20, 2014, 12:05:00 PM7/20/14
to openlitespee...@googlegroups.com
Hi George,

It is more likely a core dump due to openlitespeed crash, not sure why
is it called core.so, usually have name "core" or "core.<pid>".

please install gdb on that server, then inspect the core file with
command like

gdb /usr/local/lsws/bin/lshttpd /tmp/lshttpd/bak_core/core.so
bt

send us the stack backtrace.

Best regards,
George Wang

George Alin

unread,
Jul 22, 2014, 5:59:58 AM7/22/14
to openlitespee...@googlegroups.com
I sent you a pm.

George Wang

unread,
Jul 22, 2014, 5:24:07 PM7/22/14
to openlitespee...@googlegroups.com
What type of pm? seem I did not get it.

On 7/22/2014 5:59 AM, 'George Alin' via OpenLiteSpeed Development wrote:
> I sent you a pm.
>

George Alin

unread,
Aug 1, 2014, 7:14:34 AM8/1/14
to openlitespee...@googlegroups.com
I sent you a second pm but still haven't heared an answer from you so I'm posting this publicly.

Every half hour OLSWS is generating a "core" file.
(I don't know if this is helping or not but I'm running php 5.5.15.)
bak_core.zip

George Wang

unread,
Aug 1, 2014, 9:37:56 AM8/1/14
to openlitespee...@googlegroups.com
Hi,

I did not get your pm, was it sent to my email address directly?
What is your OS? centos? untuntu? 64bit? 32bit?
It wont be easy to create a matching system to exam the core file.
Can you please capture the stack back trace from the core file,

install gdb, run gdb with command like

gdb /usr/local/lsws/bin/openlitespeed /tmp/lshttpd/bak_core/core.xxxx
bt

you can send the backtrace to b...@litespeedtech.com

Best regards,
George Wang

George Alin

unread,
Aug 1, 2014, 10:59:13 AM8/1/14
to openlitespee...@googlegroups.com
I'm using debian 7 x86.
Here it is the stack backtrace. 
stack.txt

George Wang

unread,
Aug 1, 2014, 11:13:14 AM8/1/14
to openlitespee...@googlegroups.com
Please type "bt" command in gdb to get the full backtrace.

On 8/1/2014 10:59 AM, 'George Alin' via OpenLiteSpeed Development wrote:
I'm using debian 7 x86.
Here it is the stack backtrace. 

George Alin

unread,
Aug 1, 2014, 11:23:36 AM8/1/14
to openlitespee...@googlegroups.com
I did.
It's saying 

(gdb) bt
#0  0xb7237aa6 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#1  0x081ae0a8 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

George Wang

unread,
Aug 1, 2014, 11:39:01 AM8/1/14
to openlitespee...@googlegroups.com
Is the core file size pretty big?
The stack might be corrupted due to an infinite recursive bug.
Is the server busy? if not that busy, we can try valgrind trick see if we can caught something.

install valgrind
stop LSWS from command line.
start LSWS from valgrind with command

valgrind /path/to/openlitespeed -d

you may want use a shell script for that if you cannot monitor the server, when it crash, the server will be down.
I have something like, save it in /usr/local/lsws/bin/

#!/bin/sh
while [ 1 -eq 1 ]; do

    valgrind --log-file=./vg_log_`date "+%d_%H_%M_%S"` ./openlitespeed -d

done

send us the vg_log_*

Thanks,
George Wang

George Alin

unread,
Aug 1, 2014, 12:08:15 PM8/1/14
to openlitespee...@googlegroups.com
Here it is. :)
vg_log_01_19_04_10.txt

George Wang

unread,
Aug 1, 2014, 12:19:13 PM8/1/14
to openlitespee...@googlegroups.com
The server is running, no crash yet.
Once it crash, a new valgrind log will be created for the new process,
send this file to us again, it should have more content.

Thanks,
George

George Alin

unread,
Aug 3, 2014, 6:35:00 AM8/3/14
to openlitespee...@googlegroups.com
Here it is.
vg_log_02_17_35_51.zip

David

unread,
Aug 4, 2014, 10:45:53 AM8/4/14
to George Alin, openlitespee...@googlegroups.com
Thanks George,

You may have a "storagepath" for the cache module at the Vhost but the path is in the $SERVER_ROOT and does not exist, and cache module try to create it but fail, so that it causes an error, actually this is a bug and we will fix it in the next release.
If you are in such case, right now, you may want to fix it with this way, "try to create the path by hand and chown to worker user and group" and see if the error happens again or not.
If You still have any problem, please fell free to contact us.
Anyway we will fix the bug in the next release.

Thanks.
David


On 8/3/2014 6:34 AM, 'George Alin' via OpenLiteSpeed Development wrote:
Here it is.

George Alin

unread,
Aug 4, 2014, 1:38:43 PM8/4/14
to openlitespee...@googlegroups.com
I disabled the cache module and I'm looking forward to see the next release. :)

David

unread,
Aug 4, 2014, 5:08:28 PM8/4/14
to George Alin, openlitespee...@googlegroups.com
Hi George,

We just found out the bug and this should be the reason of the core dump.

diff --git src/lsiapi/lsiapihooks.h src/lsiapi/lsiapihooks.h
index 589a61f..3e868a4 100644
--- src/lsiapi/lsiapihooks.h
+++ src/lsiapi/lsiapihooks.h
@@ -221,6 +221,7 @@ public:

void inherit( const SessionHooks<base, size> * parent )
{
+ reset();
if (parent)
memcpy(m_pHookPoints, parent->m_pHookPoints,
sizeof(m_pHookPoints));
}

If get a chance, please patch to the code and re-build the binary.
Any question, please feel free to contact us.

Thanks for your feedback.
David

George Alin

unread,
Aug 5, 2014, 1:53:18 AM8/5/14
to openlitespee...@googlegroups.com, staff...@yahoo.com
I patched the code, recompiled the binary and waiting to see if it's all good news :D

George Alin

unread,
Aug 12, 2014, 11:38:39 PM8/12/14
to openlitespee...@googlegroups.com
So far no crash without the cache module and with your patch.

David

unread,
Aug 13, 2014, 9:14:24 AM8/13/14
to George Alin, openlitespee...@googlegroups.com
Thanks.

George Wang

unread,
Aug 13, 2014, 9:17:21 AM8/13/14
to openlitespee...@googlegroups.com
Please try it with cache module on, the bug is triggered by the cache
module.

Thanks,
George Wang

George Alin

unread,
Aug 13, 2014, 3:15:28 PM8/13/14
to openlitespee...@googlegroups.com
To be honest, I can't find any notable performance bonus when using cache module. Hoping that pagespeed module is going to make some noise around :D

lsmichael

unread,
Aug 13, 2014, 3:22:58 PM8/13/14
to openlitespee...@googlegroups.com
What kinds of sites were you using the cache module with?

Cheers,

Michael

George Alin

unread,
Aug 13, 2014, 4:01:25 PM8/13/14
to openlitespee...@googlegroups.com
Mainly forum sites.
I think the cache module works best with static pages.

lsmichael

unread,
Aug 13, 2014, 4:24:10 PM8/13/14
to openlitespee...@googlegroups.com
Hi George,

The cache module shouldn't be used for static pages. That defeats the purpose of page caching. :)

Page caching caches dynamic content as static content so it can be served quickly by the cache. Caching a static page would just adds an unnecessary layer and little to no speed benefit. The problem with page caching, of course, is deciding which dynamic pages can be cached.

What forum applications are you using? We have guides for vBulletin and IP Board: http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:cache

XenForo also offers a LiteSpeed Cache Plugin, though I think I remember that it does not work with OpenLiteSpeed...

Michael

George Alin

unread,
Aug 13, 2014, 4:46:11 PM8/13/14
to openlitespee...@googlegroups.com

Thank you for your suggestions.
I know that plugin for xenforo but unfortunately it can't be used with openlitespeed.
Maybe you can do something to fix that in future versions of olsws.

lsmichael

unread,
Aug 13, 2014, 5:09:05 PM8/13/14
to openlitespee...@googlegroups.com
I believe Slavik's suggestion that the plugin doesn't work with OpenLiteSpeed was before OpenLiteSpeed got the page caching module. I don't know of anyone who's tried the plugin with OpenLiteSpeed's page caching, but a quick Skype to Slavik confirmed that there's not really any reason they shouldn't work together. (That was his answer off the top of his head. Again, I don't know anyone who's tested them.)

Cheers,

Michael

George Alin

unread,
Aug 13, 2014, 5:29:22 PM8/13/14
to openlitespee...@googlegroups.com
It's true that most of the traffic of any site comes from visitors.
At the moment I'm using the internal xen file cache system.
A tutorial regarding how to configure the cache module for xenforo would be great and much appreciated by many of us :D

lsmichael

unread,
Aug 13, 2014, 5:44:23 PM8/13/14
to openlitespee...@googlegroups.com
I'm putting it on the list of OpenLiteSpeed wikis to write. Slavik's XF Plugin guide should work, though. It should just be a matter of adding the rewrite rules to your vhost configs in OpenLiteSpeed instead of an .htaccess file: http://xenforo.com/community/resources/xenforo-litespeed-cache.2704/

Cheers,

Michael
Reply all
Reply to author
Forward
0 new messages