Bugs item #1771532, was opened at 2007-08-10 12:35
Message generated for change (Comment added) made by mvankeulen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1771532&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: PF/compiler
Group: Pathfinder CVS Head
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Maurice van Keulen (mvankeulen)
Assigned to: Maurice van Keulen (mvankeulen)
Summary: MIL-optimizer fails sometimes for big queries
Initial Comment:
When running big queries, i.e., queries with many lines of XQuery code
(possibly due to import of modules), you sometimes run into MonetDB error
messages like
ERROR = !ERROR: BATfetchjoin(tmp_5102,tmp_5122) does not hit always (|bn|=2 !=
4=|l|) => can't use fetchjoin.
!ERROR: CMDleftfetchjoin: operation failed.
The problem is not in the mps generating faulty code, but in the MIL-optimizer
(mil_opt.c) running out of bounds. Switching off the MIL-optimizer by changing
line 697 of mil_opt.c from "* if (!(o->optimize)) {" into "if (1) {" avoids the
bug.
The attached query runs into the bug. Switching off the MIL-optimizer results
in it running into another bug:
ERROR = !ERROR: interpret: no matching MIL operator to 'append(BAT[oid,oid],
BAT[oid,void])'.
!MAYBE YOU MEAN:
! append(BAT[any::1,BAT], any) : BAT[any::1,BAT]
! append(BAT[void,any::1], any::1, bit) : BAT[void,any::1]
! append(BAT[void,any::1], any::1) : BAT[void,any::1]
! append(BAT[oid,any::1], any::1, bit) : BAT[oid,any::1]
! append(BAT[oid,any::1], any::1) : BAT[oid,any::1]
! append(BAT[void,any::1], BAT[oid,any::1], bit) :
BAT[void,any::1]
! append(BAT[void,any::1], BAT[oid,any::1]) : BAT[void,any::1]
! append(BAT[void,any::1], BAT[void,any::1], bit) :
BAT[void,any::1]
! append(BAT[void,any::1], BAT[void,any::1]) : BAT[void,any::1]
! append(BAT[oid,any::1], BAT[oid,any::1], bit) : BAT[oid,any::1]
! append(BAT[oid,any::1], BAT[oid,any::1]) : BAT[oid,any::1]
Apparently, there is a missing assignment to "pos" somewhere in mps, because if
I add "pos:[EMAIL PROTECTED];" to line 11641 in milprint_summer.c (function
PFudfMIL), the code runs fine.
Sorry to report two bugs in one bug-report.
----------------------------------------------------------------------
>Comment By: Maurice van Keulen (mvankeulen)
Date: 2007-09-11 14:00
Message:
Logged In: YES
user_id=654674
Originator: YES
Fixes seem to have solved the bug. It runs my queries fine even when they
import large modules. Sorry for waiting so long to check and close this
one.
----------------------------------------------------------------------
Comment By: Martin Kersten (mlkersten)
Date: 2007-09-09 10:57
Message:
Logged In: YES
user_id=490798
Originator: NO
Maurice, please confirm status
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-08-12 17:50
Message:
Logged In: YES
user_id=572415
Originator: NO
added test for part 2 (`pf -O0` produces wrong MIL)
in
pathfinder/tests/BugTracker/Tests/pf-O0_produces_wrong_MIL.SF-1771532.*
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-08-10 17:40
Message:
Logged In: YES
user_id=572415
Originator: NO
With the fix of part 2 (initially generated MIL code was wrong),
also part 1 (potential MIL code optimizer BUG) does not seem to be
reproducible any more.
Maurice, could you please check and report whether it works for you, too?
Unfortunately, we cannot (yet?) add the attached query as test to CVS,
as it requires "probxml", which is by default disabled, and can
only be enabled by a configure switch at compile-time.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-08-10 17:29
Message:
Logged In: YES
user_id=572415
Originator: NO
Part 2 fixed in CVS:
With MIL code optimization (mil_opt.[hc]) disabled (`pf -O0`)
not only the attached query, but also 9 more tests
tests/BugTracker/Tests/complex-XQuery-batbat_lng_add_inplace-error-OK.SF-1562868.xq
tests/BugTracker/Tests/complex-XQuery-batbat_lng_add_inplace-error-KO.SF-1562868.xq
tests/BugTracker/Tests/complex-XQuery-batbat_lng_add_inplace-error-KO2.SF-1562868.xq
tests/BugTracker/Tests/posjoin_null_BAT_2nd_run.SF-1678948.xq
tests/BugsViaSourgeforce/Tests/ID.1652527.xq
tests/W3C_use_cases/XQ/R/Tests/Q12.xq
tests/W3C_use_cases/XQ/R/Tests/Q12x.xq
tests/W3C_use_cases/XQ/STRING/Tests/Q2.xq
tests/XQuery/Tests/orderby2.xq
failed with the reported "append" error message.
The reason was (IMHO) that used-defined functions did not return the
"pos";
making used-defined functions return the "pos" seems to solve the problem
without causing any other harm.
Test will follow, once I manage to create one that does not require
probxml.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-08-10 12:48
Message:
Logged In: YES
user_id=572415
Originator: NO
next time, *please*
(1) use one report per bug
(2) state clearly that your are using/requiring that PF is configured with
"--enable-probxml"
Would save us a lot of precious time and make us lives much easier!
aTdHvAaNnKcSe!
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-08-10 12:44
Message:
Logged In: YES
user_id=572415
Originator: NO
$ pf /tmp/bug12.xq
bad usage of XML namespaces: at (46,53-46,78): unknown namespace in
qualified function name pxmlsup:deep-equal
# halted in
/ufs/manegold/_/scratch0/Monet/Testing/Current/source/pathfinder/compiler/semantics/ns.c
(ns_resolve), line 851
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1771532&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