Package: nginx-extras
Version: 1.2.0-1
Severity: important
Tags: patch

I've been experiencing an issue with worker processes crashing when using lua-resty-mysql (which uses cosocket) in an access_by_lua block, returning with ngx.exit().

This issue has been reported here --
https://github.com/chaoslawful/lua-nginx-module/issues/110
and fixed here --
https://github.com/chaoslawful/lua-nginx-module/commit/d00976d807c64c50cd6e6d5895d17c95d9b1baef

I've confirmed that rebuilding the package with an updated lua-nginx-module fixes this issue.

For reference, here's the config in question:

server {
        listen 80;

        error_page 401 403 /back-to-portal.html;
        location = /back-to-portal.html {
                internal;
                root /usr/local/share/www;
        }

        location / {
                access_by_lua '
                        local mysql = require "resty.mysql"
                        local db = mysql:new()
                        db:set_timeout(1000)
                        local ok, err, errno, sqlstate =
                                db:connect{
                                        path = "/run/mysqld/mysqld.sock",
                                        database = "testdb",
                                        user = "testuser",
                                        password = "password" }
                        ngx.exit(403)
                ';
        }
}

Log snippet:

2012/05/27 20:51:23 [debug] 2179#0: *11 http chunk: 10
2012/05/27 20:51:23 [debug] 2179#0: *11 http chunk: 210
2012/05/27 20:51:23 [debug] 2179#0: *11 write old buf t:1 f:0 09B0D8F8, pos 09B0D8F8, size: 185 file: 0, size: 0 2012/05/27 20:51:23 [debug] 2179#0: *11 write new buf t:1 f:0 09B0DC4C, pos 09B0DC4C, size: 4 file: 0, size: 0 2012/05/27 20:51:23 [debug] 2179#0: *11 write new buf t:0 f:0 00000000, pos 0815D564, size: 10 file: 0, size: 0 2012/05/27 20:51:23 [debug] 2179#0: *11 write new buf t:1 f:0 09BC0D40, pos 09BC0D40, size: 210 file: 0, size: 0 2012/05/27 20:51:23 [debug] 2179#0: *11 write new buf t:0 f:0 00000000, pos 081299CC, size: 7 file: 0, size: 0
2012/05/27 20:51:23 [debug] 2179#0: *11 http write filter: l:1 f:1 s:416
2012/05/27 20:51:23 [debug] 2179#0: *11 http write filter limit 0
2012/05/27 20:51:23 [debug] 2179#0: *11 writev: 416
2012/05/27 20:51:23 [debug] 2179#0: *11 http write filter 00000000
2012/05/27 20:51:23 [debug] 2179#0: *11 http copy filter: 0 "/back-to-portal.html?" 2012/05/27 20:51:23 [debug] 2179#0: *11 http finalize request: 0, "/back-to-portal.html?" a:1, c:2
2012/05/27 20:51:23 [debug] 2179#0: *11 http request count:2 blk:0
2012/05/27 20:51:23 [debug] 2179#0: *11 http finalize request: -4, "/back-to-portal.html?" a:1, c:1
2012/05/27 20:51:23 [debug] 2179#0: *11 set http keepalive handler
2012/05/27 20:51:23 [debug] 2179#0: *11 http close request
2012/05/27 20:51:23 [debug] 2179#0: *11 cleanup lua socket upstream request: "/back-to-portal.html"
2012/05/27 20:51:23 [debug] 2179#0: *11 lua finalize socket
2012/05/27 20:51:23 [alert] 2172#0: worker process 2179 exited on signal 11
2012/05/27 20:51:23 [debug] 2177#0: epoll add event: fd:6 op:1 ev:00000001


All the best!




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to