Received: (qmail 7037 invoked by uid 2012); 23 Sep 1999 09:32:39 -0000 Message-Id: <19990923093239.7035.qmail@hyperreal.org> Date: 23 Sep 1999 09:32:39 -0000 From: Sefera Armond Reply-To: sefer@hotmail.com To: apbugs@hyperreal.org Subject: User track generates flawed records. X-Send-Pr-Version: 3.2 >Number: 5060 >Category: mod_usertrack >Synopsis: User track generates flawed records. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Sep 23 02:40:00 PDT 1999 >Last-Modified: Mon Sep 27 01:20:01 PDT 1999 >Originator: sefer@hotmail.com >Organization: >Release: 1.3.6 >Environment: dec/alpha - ofs1 v4.0, compiler gcc. >Description: We have enabled the user-track module using cookies. And since we have made this change, the logs generated by the apache began showing invalid entries in roughly 8% of the log entries. Instead of showing "210.80.20.55.374637468346" we get only "-" or sometimes "378463478463" in around 8% of the entries. We couldn't figure out why this is happenning and assumed (since we couldn't find anything explaining this) that this must be some kind of a bug. We get high amount of pageviews a day, so this may not be noticeable on a lower number of pageviews. If you can explain/solve/bug-fix this we'll be extermly glad. >How-To-Repeat: >Fix: >Audit-Trail: Category-Changed-From-To: general-mod_usertrack Category-Changed-By: coar Category-Changed-When: Thu Sep 23 07:12:15 PDT 1999 From: Dirk-Willem van Gulik To: Sefera Armond Cc: apbugs@hyperreal.org Subject: Re: general/5060: User track generates flawed records. Date: Mon, 27 Sep 1999 10:14:49 +0200 (CEST) On 23 Sep 1999, Sefera Armond wrote: > We have enabled the user-track module using cookies. And since we have made this change, the logs generated by the apache began showing invalid entries in roughly 8% of the log entries. > Instead of showing "210.80.20.55.374637468346" we get only "-" or sometimes "378463478463" in around 8% of the entries. We couldn't figure out why this is happenning and assumed (since we couldn't find anything explaining this) that this must be some k ind of a bug. > We get high amount of pageviews a day, so this may not be noticeable on a lower number of pageviews. > If you can explain/solve/bug-fix this we'll be extermly glad. Well, the way the write to the log file is done, it is not entirely atomic or mutexed to make it serialized as far as I recall. We just do (or did) an fputs() followed by a fputc() or a newline and a fflush(). And I do not think that this was ever fixed, or is going to be fixed prior to 2.0. So this might be the culprit. What you could try is just make a log of _only_ the cookies. Using CustomLog and see if that gives the same corruption. By coincidence I have a customer with reasonably high volume site (mmaped_static/freebsd/PII/400 and 25-40 hits/sec) where we are logging to a (shared) SQL database, which has atomic (well serialized) writes. From that I am fairly sure that mod_usertrack emits something sound. And that it is sound by the time it arrives at mod_custom_log. Another option could be that some custom module is zapping r->notes somehow. That has happened before. Anything special in the setup ? Dw >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]