Hi, Marco,

I tried to replay the bug you found. But I didn't see any error message. It
works pretty well...
I'm sure that I followed all the steps listed in your previous email.

Could you provide more information?

btw, My platform is Ubuntu 10.04.

-- Tianyin




On Fri, Feb 24, 2012 at 4:19 AM, Marco van Tol <ma...@tols.org> wrote:

> Goodday,
>
> I have tried to make a setup using mod_lua using version 2.4.1 of the
> apache httpd server and noticed that requests involving lua render a
> segfault message in the error log like this one:
>
> [Fri Feb 24 11:42:41.410706 2012] [core:notice] [pid 64609:tid
> 34397516800] AH00052: child pid 64612 exit signal Segmentation fault (11)
>
>
> This is very easy to replicate by following these steps:
> - download the httpd-2.4.1.tar.gz from
>  http://httpd.apache.org/download.cgi#apache24
> - create a directory, in my case I created /apache24 and changed
>  ownership to myself
> - extract the tarball
> - execute:
>  ./configure --prefix /apache24 --enable-lua
> - run 'make' and 'make install'
> - modify /apache24/conf/httpd.conf and make the following changes:
>  Listen 8080 # (Instead of 80)
>  LoadModule lua_module modules/mod_lua.so
>  LuaHookAccessChecker /apache24/lua/luatest.lua access_hook
> - Create /apache24/lua/luatest.lua with the following contents  (Other
>  contents render a segfault as well)
>  -----
>  require 'apache2'
>
>  function access_hook(r)
>    r:puts("---- access_hook\n")
>    return apache2.DECLINE
>  end
>  -----
> - start the server using a simple '/apache24/bin/httpd'
> - Keep a tail open on the error log
> - Do something like: curl -D - -s 'http://localhost:8080/'
> - You will see expected output, i.e. "---- access_hook" and the "It
>  works!" text.
> - The error log will log a segfault from the child that handled the
>  request, like the one I paste above.
>
> This can be fixed by the attached patch, which is really crude and
> doesn't consider whether it opens up a memory leak or not.
>
> Is there something I'm doing wrong, or is this a bug in the 2.4.1
> mod_lua?
>
> This happens both on FreeBSD 9.0-RELEASE as well as
> linux 2.6.27.59 and 3.0.20.
>
> Thanks in advance,
>
> Marco van Tol
>
> --
> Marco van Tol
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>



-- 
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Reply via email to