Received: (qmail 88990 invoked by uid 501); 21 Nov 2001 11:53:25 -0000 Message-Id: <20011121115325.88989.qmail@apache.org> Date: 21 Nov 2001 11:53:25 -0000 From: satish kilaru Reply-To: iam_kilaru@yahoo.com To: submit@bugz.apache.org Subject: If time zone is changed while apache is running, it doesn't reflect in access log properly X-Send-Pr-Version: 3.110 >Number: 8824 >Category: mod_log-any >Synopsis: If time zone is changed while apache is running, it doesn't reflect in access log properly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Nov 21 04:00:00 PST 2001 >Closed-Date: Wed Nov 21 08:25:27 PST 2001 >Last-Modified: Fri Nov 23 17:40:00 PST 2001 >Originator: iam_kilaru@yahoo.com >Release: 1.3.22 >Organization: >Environment: redhat 7.2 kernel 2.4.12 (linux) >Description: I am running httpd. current time zone is IST downloaded a page. checked the access log. It shows sorrect time zone(IST) Now I modified the zone to GMT and downloaded another page. Checked the access log. It shows sorrect time zone( GMT) Now I reverted it to IST. and downloaded another page. Checked the access log. It shows sorrect time zone( IST) Now again I change it to GMT and downloaded another page. Checked the access log. It still shows IST. Aftter this what ever is the zone I set to it shows IST only. If I restart it follows the changes in zone 2 times. Then it doesn't follow. >How-To-Repeat: start httpd. say current time zone is IST Download a page. check the access log. It shows sorrect time zone(IST) Now I modify the zone to GMT and downloaded another page. Check the access log. It shows sorrect time zone( GMT) Now I revert it to IST and download another page. Check the access log. It shows sorrect time zone( IST) Now again change it to GMT and download another page. Check the access log. It still shows IST. Aftter this what ever is the zone you set to, it shows IST only. >Fix: I have no clue. But I know how time zone is maintained in linux. While a process is running, if time zone changes it will not know abt the changes unless it monitors /etc/localtime or /etc/sysconfig/clock files. But I am very interested in fixing this problem. If somebody can tell me how apache is taking currently handling this I will fix this. U can least point me to corresponding file/func. I looked at ap_get_gmtoff. This function gives correct value first 2 times and after that it gives wrong value. It doesn't do much except calling localtime and gmtime. >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Wed Nov 21 08:25:27 PST 2001 State-Changed-Why: As you say, the Apache time funtions do not do much beyond calling your system time functions. We can not explain why they behave the way they do. Perhaps they only cache the timezone information after it has been used enough times to make it worthwhile. Perhaps you are getting tricked by the fact that the time library in each child process could have its own cache of such things, so it may be on a per child process basis. Regardless, changing the time zone on a running unix system is not something that it is reasonable to expect to take effect immediately in running processes, and I see no reason why this is a "bug" in Apache that should be fixed. From: satish chandra kilaru To: marc@apache.org Cc: apbugs@Apache.Org Subject: Re: mod_log-any/8824: If time zone is changed while apache is running, it doesn't reflect in access log properly Date: Wed, 21 Nov 2001 20:18:18 -0800 (PST) Thanks marc I just have one doubt left. I wrote a test program to see if it catches the changes in time zone. It doesn't. What is apache doing? If possible please tell me. Or at least point me to some source. I am sorry if I am wasting ur time. Thanks Kilaru --- marc@apache.org wrote: > [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! ] > > > Synopsis: If time zone is changed while apache is > running, it doesn't reflect in access log properly > > State-Changed-From-To: open-closed > State-Changed-By: marc > State-Changed-When: Wed Nov 21 08:25:27 PST 2001 > State-Changed-Why: > As you say, the Apache time funtions do not do much > beyond calling your system time functions. We can > not explain why they behave the way they do. > Perhaps they only cache the timezone information > after it has been used enough times to make it > worthwhile. Perhaps you are getting tricked by the > fact that the time library in each child process > could have its own cache of such things, so it may > be on a per child process basis. > > Regardless, changing the time zone on a running unix > system is not something that it is reasonable to > expect to take effect immediately in running > processes, and I see no reason why this is a "bug" > in Apache that should be fixed. > __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 From: Marc Slemko To: satish chandra kilaru Cc: Apache bugs database Subject: Re: mod_log-any/8824: If time zone is changed while apache is running, it doesn't reflect in access log properly Date: Fri, 23 Nov 2001 17:40:00 -0800 (PST) On Wed, 21 Nov 2001, satish chandra kilaru wrote: > Thanks marc > > I just have one doubt left. I wrote a test program to > see if it catches the changes in time zone. It > doesn't. > What is apache doing? If possible please tell me. Or > at least point me to some source. apache is doing the same thing that any simplistic test program would do. It doesn't do anything with time zones. It doesn't catch the changes inside a running process, however as new child processes are created they may or may not get updated time zones. I can't tell you the precise details of how things happen to interact on the particular platform you are running on; there are a variety of legitimate behaviours by the system libraries that can produce different results, but still all be legal. > > I am sorry if I am wasting ur time. > > Thanks > > Kilaru > > > --- marc@apache.org wrote: > > [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! ] > > > > > > Synopsis: If time zone is changed while apache is > > running, it doesn't reflect in access log properly > > > > State-Changed-From-To: open-closed > > State-Changed-By: marc > > State-Changed-When: Wed Nov 21 08:25:27 PST 2001 > > State-Changed-Why: > > As you say, the Apache time funtions do not do much > > beyond calling your system time functions. We can > > not explain why they behave the way they do. > > Perhaps they only cache the timezone information > > after it has been used enough times to make it > > worthwhile. Perhaps you are getting tricked by the > > fact that the time library in each child process > > could have its own cache of such things, so it may > > be on a per child process basis. > > > > Regardless, changing the time zone on a running unix > > system is not something that it is reasonable to > > expect to take effect immediately in running > > processes, and I see no reason why this is a "bug" > > in Apache that should be fixed. > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 > >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! ]