You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/11/21 11:36:40 UTC

[Bug 54179] New: Large message improper logging

https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

            Bug ID: 54179
           Summary: Large message improper logging
           Product: Apache httpd-2
           Version: 2.4.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_dumpio
          Assignee: bugs@httpd.apache.org
          Reporter: mieszek2@interia.pl
    Classification: Unclassified

Created attachment 29616
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29616&action=edit
simple patch - to review, not to use

When large message is logged by moddumpio message is divided in parts
(MAX_STRING_LEN / 4 - 80 -> length of a message) and logged by ap_log_cerror()
function. When message is divided its always logged from the beggining so part
of a message is lost, example log(edited):

 mod_dumpio.c(63): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out (data-HEAP):
204 bytes
 mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out (data-HEAP):
HTTP/1.1 200 OK\r\nDate: Tue, 20 Nov 2012 09:49:33 GMT\r\nServer: WebSphere
Application Server/6.1\r\nContent-Type: text/xml;
charset=utf-8\r\nContent-Language: en-US\r\nContent-Length:
25709\r\nConnection: close\r\n\r\n
 mod_dumpio.c(161): [client 9.9.9.5:29835] mod_dumpio: dumpio_out
 mod_dumpio.c(63): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): 1163 bytes
 mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message>part
 mod_dumpio.c(63): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): 4044 bytes
 mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><bigmessage>message
part 1 .... </bigmessage
 mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><bigmessage>message
part 1 .... </bigmessage
 mod_dumpio.c(103): [client 9.9.9.5:29835] mod_dumpio:  dumpio_out
(data-TRANSIENT): //www.w3.org/2001/XMLSchema-instance"><bigmessage>message
part 1 .... </bigmessage


message part 1 was logged 3 times, no message part 2 and 3 will be logged.

Probable cause:
ap_log_cerror call in dumpit function shouldn't be made with &buf as a
parameter because it will allways result in a message log made from the
beggining of a message. Pointer to message passed to ap_log_cerror must be
incremented by the value of previously logged message length. 

Im attaching patch which is working for us but it was not written by C
proggramer so it shoutldn't be used :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Improper logging of large messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Large message improper logging

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29616|0                           |1
           is patch|                            |
  Attachment #29616|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Improper logging of large messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

--- Comment #3 from Stefan Fritsch <sf...@sfritsch.de> ---
fixed in 2.4.4

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Improper logging of large messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #1 from Christophe JAILLET <ch...@wanadoo.fr> ---
Thanks for the report.

Fixed in trunk, with a slightly different patch.
http://svn.apache.org/viewvc?view=revision&sortby=date&revision=1412278

The idea is obviously the same, but I put the '+ logbytes' outside of the
#if/#else/#endif because the issue is the same on the other branch.
I also made some small cosmetic changes.


I'll propose it for backport to 2.4.x in 1 week or so if nobody complains.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Improper logging of large messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

--- Comment #2 from Marek Wianecki <mi...@interia.pl> ---
thx, patch works for me :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54179] Improper logging of large messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54179

Marek Wianecki <mi...@interia.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Large message improper      |Improper logging of large
                   |logging                     |messages

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org