You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2008/01/01 23:35:18 UTC
[Bug 5762] New: CLOCK_REALTIME warnings
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
Summary: CLOCK_REALTIME warnings
Product: Spamassassin
Version: 3.2.4
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Building & Packaging
AssignedTo: dev@spamassassin.apache.org
ReportedBy: selsky@columbia.edu
During "make test", there are a lot of warnings about CLOCK_REALTIME not being exported.
"CLOCK_REALTIME" is not exported by the Time::HiRes module at
../blib/lib/Mail/SpamAssassin/AsyncLoop.pm line 50
I have perl5.6.1 with Time::HiRes 01.20.
The docs don't mention any version requirements.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From jm@jmason.org 2008-01-03 13:34 -------
(In reply to comment #7)
> I'll prepare an alternative patch.
thanks!
> Sigh. The original reporter is using a 9 year old version!
*that* is crazy. are we supporting a platform that old? wow.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|CLOCK_REALTIME warnings |CLOCK_REALTIME warnings from
| |Time::HiRes use
Target Milestone|Undefined |3.2.5
------- Additional Comments From jm@jmason.org 2008-01-02 02:49 -------
sure enough there is a reference to CLOCK_REALTIME at that line.
perhaps we need to conditionalize it to a specific version range
of Time::HiRes...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From Mark.Martinec@ijs.si 2008-01-03 13:26 -------
> where did you get the figure 1.77 from? a guess?
>From 'Changes' file in the current version of Time::HiRes
(and I tested with 1.48, which is the only version I could find
older than 1.77).
> I'd prefer to use something like
> Time::HiRes->can("clock_getres") && Time::HiRes->can("CLOCK_REALTIME")
> as the condition, to insulate against other versions, if so. (although
> for some reason that doesn't work, since CLOCK_REALTIME isn't a function,
> it seems. but you get the idea)
The CLOCK_REALTIME probably came together with a function clock_getres
(because this is a constant needed as an argument to that function),
so I think it would be safe to only test for can("clock_getres").
Worst case, we'd fall back to a 1 second resolution.
I'll prepare an alternative patch.
> (Unfortunately, 3-year-old modules tend to be reasonably common due to
> slow distribution packagers.)
Sigh. The original reporter is using a 9 year old version!
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From jm@jmason.org 2008-01-03 14:19 -------
+1
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From Mark.Martinec@ijs.si 2008-01-03 15:29 -------
$ svn -m 'AsyncLoop: call clock_getres only
if Time::HiRes makes it available' ci
Sending lib/Mail/SpamAssassin/AsyncLoop.pm
Transmitting file data .
Committed revision 608672.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|3.2.5 |3.2.4
------- Additional Comments From jm@jmason.org 2008-01-05 13:05 -------
(In reply to comment #13)
> $ svn -m 'AsyncLoop: call clock_getres only
> if Time::HiRes makes it available' ci
> Sending lib/Mail/SpamAssassin/AsyncLoop.pm
> Transmitting file data .
> Committed revision 608672.
looks like this was to 3.2.x; I didn't realise. closing bug.
Mark, if this isn't also applied to trunk, it needs to be...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From selsky@columbia.edu 2008-01-03 13:40 -------
It's the original Time::HiRes from perl 5.6.1. :-)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From sidney@sidney.com 2008-01-03 12:24 -------
(reply to comment #3)
I was going to say that this is not serious enough to go through the trouble of
recutting and testing a 3.2.4 candidate unless Justin as Release manager for
3.2.4 thinks otherwise, but looking at the details for this bug I see that it is
new code for 3.2.4 (introduced for bug 5589) which means that we would be
releasing 3.2.4 with a new undocumented version dependency on Time::Hies that
could break an unknown number of existing installations.
Because of that, I am in favour of getting this into 3.2.4 if Justin thinks that
is still possible.
(reply to comment #3)
+1 for applying the patch to the 3.2 branch to go into 3.2.4 or 3.2.5 as the
case may be (even though we haven't called for votes yet).
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From sidney@sidney.com 2008-01-05 13:25 -------
(in reply to comment #15)
Yes, he committed it as rev 608648 to trunk when he posted the patch.
I was wondering why you had not cut the new release yet :-) I see you are in the
process of doing that now.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
Mark.Martinec@ijs.si changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|CLOCK_REALTIME warnings from|[review] CLOCK_REALTIME
|Time::HiRes use |warnings from Time::HiRes
| |use
------- Additional Comments From Mark.Martinec@ijs.si 2008-01-03 12:41 -------
> releasing 3.2.4 with a new undocumented version dependency on Time::HiRes
> that could break an unknown number of existing installations.
> Because of that, I am in favour of getting this into 3.2.4
> if Justin thinks that is still possible.
I'd be in favour of including this into 3.2.4 as well
(my patch-implied +1 is already there).
The current code is not really breaking old installations,
but is producing unsightly warnings, and unnecessarily
rounds time intervals to a full second, which loses
part of the advantage of a new code in bug 5589 - for those
who do have a Time::HiRes, but is more than three years old.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From Mark.Martinec@ijs.si 2008-01-03 09:50 -------
Created an attachment (id=4229)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4229&action=view)
don't call Time::HiRes::clock_getres if Time::HiRes < 1.77
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From jm@jmason.org 2008-01-03 13:08 -------
where did you get the figure 1.77 from? a guess? I'd prefer to use
something like
Time::HiRes->can("clock_getres") && Time::HiRes->can("CLOCK_REALTIME")
as the condition, to insulate against other versions, if so. (although
for some reason that doesn't work, since CLOCK_REALTIME isn't a function,
it seems. but you get the idea)
If 1.77 really *is* the exact version that introduces CLOCK_REALTIME,
though, then +1.
(Unfortunately, 3-year-old modules tend to be reasonably common due to
slow distribution packagers.)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From sidney@sidney.com 2008-01-03 13:35 -------
(reply to comment #6 and comment #7)
>From http://search.cpan.org/src/JHI/Time-HiRes-1.9711/Changes
"1.77 [2005-11-03]
- add support for the POSIX clock_gettime() and clock_getres(),
if available, either as library calls or as syscalls"
So it looks like an exact correct version number. There's a mention of
CLOCK_REALTIME constant in the changes just two days later in version 1.81, and
it would not make sense to have the clock_getres() function without it, so I
would assume that it is defined in 1.77.
I don't see a strong reason to test for clock_getres() instead of version number
in this case, but since it looks like Mark will post an alternative patch soon
and it will protect against the possibility of some strange variant with the
wrong version number, I'll vote +1 for it when he posts it.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
Mark.Martinec@ijs.si changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #4229 is|0 |1
obsolete| |
------- Additional Comments From Mark.Martinec@ijs.si 2008-01-03 14:03 -------
Created an attachment (id=4230)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4230&action=view)
test for Time::HiRes->can("clock_getres") instead of testing for a version
number
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From selsky@columbia.edu 2008-01-03 10:45 -------
Tests now pass on my machine. Any chance of getting this into 3.2.4?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5762] [review] CLOCK_REALTIME warnings from Time::HiRes use
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5762
------- Additional Comments From sidney@sidney.com 2008-01-03 15:56 -------
Just so there's no question about my +1 that preceded the posting of patch 4230,
yes, I vote +1 on it :-)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.