ironbee/ironbee — Issue #12: Include PID should be included in IronBee debug output
Author: wmetcalf
Created: 2011-10-17 12:39:10+00:00
State: open

We should add the pid to the IronBee debug output. This way if/when we segv/abort we can associate the core dump to the request.... If we make it that far before core dump happens of course... :). Example of where this would be useful below..

[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxStarted ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventRequestStarted ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataIn[2]: GET /sRJATKpp.dtd HTTP/1.0\r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataIn[3]: Connection: Keep-Alive\r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataIn[3]: User-Agent: Mozilla/4.75 (Nikto/2.03 )\r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataIn[3]: Host: localhost\r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataIn[3]: \r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: Adding request_headers fields
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: ERROR - Failed to create request uri parameters: 0
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventRequestHeaders ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventHandleContextTx ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: No signatures for phase=0 ctx=0x7f0a8c837e10
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventHandleRequestHeaders ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request line is a field type: 4
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request Line cvalue: 0x7f0a8cae17c8
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - REQUEST_LINE=GET /sRJATKpp.dtd HTTP/1.0
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Lower case request line is a field type: 4
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Lower case Request Line value: get /srjatkpp.dtd http/1.0
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request Line value: GET /sRJATKpp.dtd HTTP/1.0
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request Headers is a field type: 5
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - REQUEST_HEADERS.Host=localhost
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - REQUEST_HEADERS.User-Agent=Mozilla/4.75 (Nikto/2.03 )
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - REQUEST_HEADERS.Connection=Keep-Alive
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - HTTP Host Header is a field type: 4
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - HTTP REQUEST_HEADERS.HOST=localhost
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request ARGS is a field type: 5
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - Request Line does not match: (?i:foo)
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: Executing 1 signatures for phase=1 ctx=0x7f0a8c837e10
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: PocSig: Matching "bar" against field "request_line"
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: PocSig NOMATCH
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: Matching AGAINST AC tree 8c833ff3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventRequestBody ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventHandleRequest ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: No signatures for phase=2 ctx=0x7f0a8c837e10
[Sun Oct 16 09:20:43 2011] [error] [client 127.0.0.1] File does not exist: /var/www/sRJATKpp.dtd
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventConnDataOut: HTTP/1.1 404 Not Found\r\nDate: Sun, 16 Oct 2011 14:20:43 GMT\r\nServer: Apache/2.2.14 (Ubuntu)\r\nVary: Accept-Encoding\r\nContent-Length: 285\r\nKeep-Alive: timeout=15, max=100\r\nConnection: Keep-Alive\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventResponseStarted ib=0x7f0a8c81d1d0 tx=4e9ae83b-4c2d-4e97-8fff-680779a11cc3
[Sun Oct 16 09:20:43 2011] [debug] mod_ironbee.c(173): IronBee: LuaFFI - example.onEventTxDataOut[type=2]: HTTP/1.1 404 Not Found
[Sun Oct 16 09:20:43 2011] [notice] child pid 26629 exit signal Aborted (6), possible coredump in /tmp
[Sun Oct 16 09:20:43 2011] [notice] child pid 26630 exit signal Aborted (6), possible coredump in /tmp
[Sun Oct 16 09:20:43 2011] [notice] child pid 26632 exit signal Aborted (6), possible coredump in /tmp