Mailing List Archive

[Bug 514] log slow DNS queries
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #3 from Derrick <derrick.rice@gmail.com> 2008-11-15 22:06:41 ---
Attaching patches.

Wrote wrappers for all the lower level functions used in host.c


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #4 from Derrick <derrick.rice@gmail.com> 2008-11-15 22:07:40 ---
Created an attachment (id=284)
--> (http://bugs.exim.org/attachment.cgi?id=284)
macros.h patch


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #5 from Derrick <derrick.rice@gmail.com> 2008-11-15 22:10:07 ---
Created an attachment (id=285)
--> (http://bugs.exim.org/attachment.cgi?id=285)
globals.c patch


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #6 from Derrick <derrick.rice@gmail.com> 2008-11-15 22:10:35 ---
Created an attachment (id=286)
--> (http://bugs.exim.org/attachment.cgi?id=286)
host.c patch - majority of changes


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #7 from Kjetil Torgrim Homme <kjetilho@ifi.uio.no> 2008-11-16 17:00:41 ---
Please redo patches as unified or context diff, and put them in one file.

I think you should use gettimeofday, 1 second granularity isn't very accurate.
lastly, this will inundate the log, so I think you either need to implement a
hardcoded cutoff (say, 0.5 seconds) or your "host_lookup_time" suggestion,
although I'd call it something like "log_slow_host_lookup".


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #8 from Derrick <derrick.rice@gmail.com> 2008-11-20 00:10:01 ---
I've made changes per the suggestions. I feel that in order to properly test
this, I'd need a nameserver that I can tinker with by making it delay
responses.

Also I cannot properly test all the various ways that host lookups are done,
since most are excluded by preprocessor statements based on the available
functions.

Any ideas for testing?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [Bug 514] log slow DNS queries [ In reply to ]
On Thu, 20 Nov 2008, Derrick wrote:

> I've made changes per the suggestions. I feel that in order to properly test
> this, I'd need a nameserver that I can tinker with by making it delay
> responses.
>
> Also I cannot properly test all the various ways that host lookups are done,
> since most are excluded by preprocessor statements based on the available
> functions.
>
> Any ideas for testing?

If I remember correctly (and I've now been away from Exim for over a
year, so maybe I don't :-), the test suite contains a fake "nameserver"
that can be made to delay and otherwise give non-normal responses. Grep
the Exim code for stuff about testing and take a look at the scripts and
other documentation in the test suite.

--
Philip Hazel

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #9 from Philip Hazel <ph10@hermes.cam.ac.uk> 2008-11-20 09:01:32 ---
On Thu, 20 Nov 2008, Derrick wrote:

> I've made changes per the suggestions. I feel that in order to properly test
> this, I'd need a nameserver that I can tinker with by making it delay
> responses.
>
> Also I cannot properly test all the various ways that host lookups are done,
> since most are excluded by preprocessor statements based on the available
> functions.
>
> Any ideas for testing?

If I remember correctly (and I've now been away from Exim for over a
year, so maybe I don't :-), the test suite contains a fake "nameserver"
that can be made to delay and otherwise give non-normal responses. Grep
the Exim code for stuff about testing and take a look at the scripts and
other documentation in the test suite.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514




--- Comment #10 from Derrick <derrick.rice@gmail.com> 2008-11-21 01:43:05 ---
Unfortunately, the wrappers I wrote are avoided by the test suite. Ideally I
think host.c should be rewritten in some areas with the following goals in
mind:

* do less 'test harness' special casing (the test README mentions test domains
handled in exim that /could/ be handled by fakens... they should be)
* clean up the preprocessor decisions, including...
* have a single function for each get host by name and get host by address.
They should return a common type, independent of how it is implemented on the
available system.

Unfortunately, this effort is beyond my comfort level and available time.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 514] log slow DNS queries [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=514

Derrick <derrick.rice@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #284 is|0 |1
obsolete| |
Attachment #285 is|0 |1
obsolete| |
Attachment #286 is|0 |1
obsolete| |




--- Comment #11 from Derrick <derrick.rice@gmail.com> 2008-11-21 01:45:08 ---
Created an attachment (id=287)
--> (http://bugs.exim.org/attachment.cgi?id=287)
patch

Replacing individual patches with cvs unified patch.

As mentioned, this is not properly tested (due to test suite limitations and my
lack of access to machines with varying gethostby* implementions)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##