Bugs item #1852327, was opened at 2007-12-17 15:27
Message generated for change (Comment added) made by boncz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1852327&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tests
Group: MonetDB4 CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefan Manegold (stmane)
Assigned to: Sjoerd Mullender (sjoerd)
>Summary: remap in src/modules/plain/Tests/bat.py fails on Win64
Initial Comment:
Test MonetDB4/src/modules/plain/Tests/bat.py fails on 64-bit Windows:
var b4 := mmap_int.remap(map,false);
!ERROR: MT_mmap: CreateFile('bat\46.tail', -2147483648, 1, &sa, 4, 268435456,
NULL) failed
!OS: Permission denied
!ERROR: CMDremap: operation failed.
Cf:
http://monetdb.cwi.nl/testing/projects/monetdb/Current/MonetDB4/.mTests103/Int.64.64.d-Windows5.2/src_modules_plain/bat.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Current/MonetDB4/.mTests103/Mic.64.64.d-Windows5.2/src_modules_plain/bat.out.00.html
(See also
[ 1640197 ] tests bat & bat2 in src/modules/plain/Tests/ fail on 32-bit
https://sourceforge.net/tracker/index.php?func=detail&aid=1640197&group_id=56967&atid=482468
)
----------------------------------------------------------------------
>Comment By: Peter Boncz (boncz)
Date: 2007-12-20 18:13
Message:
Logged In: YES
user_id=591107
Originator: NO
Hi Sjoerd,
I have asked a question about this on the
microsoft.public.win32.programmer.kernel newsgroup. Hopefully a Microsoft
kernel guru can shed light on this.
watch this thread:
http://msdn.microsoft.com/newsgroups/managed/default.aspx?query=boncz&dg=microsoft.public.win32.programmer.kernel
One thing that could be tried is what would happen if we, rather than
doing CreateFile() twice, would re-use the file handle. Would
CreateFileMapping() or MapViewofFile() then fail?
It is really hard to imagine that mapping a file twice would be forbidden,
because copy-on-write maps are almost designed for that use pattern.
Massaging our code to retain file handles for re-use could be done,
although it is ugly. Actually, in Linux with the VMtrim thread we already
do a thing like that (to be able to call posix_fadvise on the handle), but
we only do it for huge memory maps, so it does not increase the number of
open file handles by that much, there.
Peter
PS I removed the M4 tag, because it is a MonetDB (aka GDK) issue, not M4
specific.
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-12-20 17:24
Message:
Logged In: YES
user_id=43607
Originator: NO
I added some debug prints and this is the result of a failing run. It
doesn't make a difference whether we run a 32-bit binary (compiled on a
32-bit system where the binary works fine) or a 64-bit binary on the 64-bit
system. The failure is the same. Also, up to the failing call, the calls
are also the same on a 32-bit system, but then the call does not fail and
the programs just continues on.
MonetDB>var b4 := mmap_int.remap(map,false);
#CreateFile("bat\46.buns", 391, 3, SA, 4, 2415919104, 0) -> 264
#CreateFileMapping(264, A, 4, 0, 1048576, "(null)") -> 260
#CloseHandle(264) -> 1
#MapViewOfFileEx(260, 2, 0, 0, 1048576, 0) -> 8bc0000
#CloseHandle(260) -> 1
#CreateFile("bat\46.buns", 129, 1, SA, 4, 268435456, 0) ->
ffffffffffffffff
#ERROR 32: The process cannot access the file because it is being used by
another process.
!ERROR: MT_mmap: CreateFile('bat\46.buns', 129, 1, &sa, 4, 268435456,
NULL) failed
!OS: The process cannot access the file because it is being used by
another process.
!ERROR: CMDremap: operation failed.
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-12-19 15:09
Message:
Logged In: YES
user_id=43607
Originator: NO
The "strange" mode0 value is 0x80000000L which fits fine in a DWORD
(unsigned long). The problem is the printing of the value which uses %d
(since fixed).
But the less ambitious flags don't seem to help on XP64. The test still
fails.
----------------------------------------------------------------------
Comment By: Peter Boncz (boncz)
Date: 2007-12-18 17:34
Message:
Logged In: YES
user_id=591107
Originator: NO
On Vista 64-bits I have seen that the CreateFile this.
this is the bug that went away when Mserver.exe is run 'as administrator'
on Vista
but looking again, the value passed on mode0 (second param of CreateFile)
is strange, so I have now tried with a less ambitious falg setting. It may
be that windows64 adds some strange flags to GENERIC_READ/WRITE that do not
fit in an integer and/or are likely to fail on windows64.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1852327&group_id=56967
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs