Bug 5306 - MISSING_HB_SEP on all messages using WIN32 and Cygwin
Summary: MISSING_HB_SEP on all messages using WIN32 and Cygwin
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other Windows XP
: P5 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 14:27 UTC by Fred T
Modified: 2007-01-25 07:28 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Sample message with issue text/plain None Fred T [HasCLA]
Debug of message channel text/plain None Fred T [HasCLA]
Second sample message text/plain None Fred T [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Fred T 2007-01-24 14:27:44 UTC
Starting recently I am seeing all messages scanned under Windows XP hitting
MISSING_HB_SEP.

Details below:
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 33 registered patches, see perl -V for more detail)

SpamAssassin version 3.2.0-pre1-r499012
  running on Perl version 5.8.8

I'll attach a sample if needed.  This problem happens under cygwin running the
same revision as above with perl 5.8.7.
Comment 1 Theo Van Dinter 2007-01-24 14:56:05 UTC
We would definitely need a sample.
Comment 2 Fred T 2007-01-24 15:00:22 UTC
Created attachment 3839 [details]
Sample message with issue
Comment 3 Fred T 2007-01-24 15:02:08 UTC
Created attachment 3840 [details]
Debug of message channel

Here's a debug of the channel "message" when I run -t -Dmessage on this
message, it's showing a problem with Message/Node.pm

[3908] warn: seek() on closed filehandle $tmpfile at
C:\Perl\site\lib/Mail/SpamA
ssassin/Message/Node.pm line 273.
Comment 4 Fred T 2007-01-24 15:04:49 UTC
Created attachment 3841 [details]
Second sample message
Comment 5 Theo Van Dinter 2007-01-24 15:11:31 UTC
Hrm.  I can't reproduce the missing separator bit, but the seek/read errors are
from parts which 3.2 tries storing in temp files.  Does Windows auto-close file
handles which are open to files that get deleted?  ie:

open(FOO, "+>foo");
unlink "foo";

is "*FOO" now refering to a closed file?  If so, we'll have to tack in a "am I
running on windows" check in Message::parse_normal() and skip this behavior.
Comment 6 Justin Mason 2007-01-24 16:11:24 UTC
(In reply to comment #5)
> Hrm.  I can't reproduce the missing separator bit, but the seek/read errors are
> from parts which 3.2 tries storing in temp files.  Does Windows auto-close file
> handles which are open to files that get deleted?  ie:
> 
> open(FOO, "+>foo");
> unlink "foo";
> 
> is "*FOO" now refering to a closed file?  If so, we'll have to tack in a "am I
> running on windows" check in Message::parse_normal() and skip this behavior.

Looking at "perldoc perlport", it might do:

       Some platforms can't delete or rename files held open by the system, this
       limitation may also apply to changing filesystem metainformation like file
       permissions or owners.  Remember to "close" files when you are done with
       them.  Don't "unlink" or "rename" an open file.  Don't "tie" or "open" a
       file already tied or opened; "untie" or "close" it first.

the source of File::Temp says:

# internal routine to determine whether unlink works on this
# platform for files that are currently open.
# Returns true if we can, false otherwise.

# Currently WinNT, OS/2 and VMS can not unlink an opened file
# On VMS this is because the O_EXCL flag is used to open the
# temporary file. Currently I do not know enough about the issues
# on VMS to decide whether O_EXCL is a requirement.

sub _can_unlink_opened_file {

  if ($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'VMS' || $^O eq 'dos' || $^O eq 'Ma
cOS') {
    return 0;
  } else {
    return 1;
  }

}

Fred, could you try current SVN trunk? r499012 may help.
Comment 7 Fred T 2007-01-25 07:28:52 UTC
That was it!  The MISSING_HB_SEP is no longer hitting on the samples I submitted.