Bugs item #1850772, was opened at 2007-12-14 14:28
Message generated for change (Comment added) made by stmane
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1850772&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/runtime
Group: Pathfinder 0.22
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jan Flokstra (jflokstra)
>Assigned to: Jan Rittinger (tsheyar)
Summary: XQ: [preceding and following]-sibling:: bug
Initial Comment:
Im posting this bug on behalf of a student of ours,
[EMAIL PROTECTED] . I had a quick look at the problem and it looks like a real
bug to me.
Attached is a file "xmark01.xml" which is a small (33K)XMARK document. When we
run the query:
count(doc("xmark01.xml")//*/following-sibling::regions)
the system reponds with:
MAPI = [EMAIL PROTECTED]:50000
QUERY = count(doc("xmark01.xml")//*/following-sibling::regions)
ERROR = !ERROR: BATfetchjoin(tmp_746,1000000000_rid_prop) does not hit always
(|bn|=245 != 246=|l|) => can't use fetchjoin.
!ERROR: CMDleftfetchjoin: operation failed.
!ERROR: interpret_params: leftjoin(param 1): evaluation error.
!ERROR: interpret_params: hmark(param 1): evaluation error.
It does so in the Stable- (on Windows) and the Current (on Suse10.0) branch.
Furthermore we get an error with the preceding-sibling. But this is the same
problem I suppose.
I will not be there the coming 2 weeks so if somebody fixes this it would be
nice to inform
[EMAIL PROTECTED] the problem is fixed,
Thanx, Jan Flokstra.
----------------------------------------------------------------------
>Comment By: Stefan Manegold (stmane)
Date: 2008-02-22 18:07
Message:
Logged In: YES
user_id=572415
Originator: NO
Added Jan's tests in
pathfinder/tests/BugTracker/Tests/preceding_following-sibling_bug.SF-1850772-2.*
Jan,
could you please verify the stable output, and close this bug report in
case it is correct?
Thanks!
Stefan
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-02-21 23:26
Message:
Logged In: YES
user_id=572415
Originator: NO
fixed in CVS:
The "unique iters" / "unique items" optimization
must NOT be done at all in case we have end_ctx nodes,
i.e., in case we "mis-use" a limited child-step
to evaluate preceding-sibling(ctx) as child(parent(ctx))!
... test(s) will be added, once it/they have been adapted to the Stable
version of Pathfinder ...
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-02-21 21:31
Message:
Logged In: YES
user_id=572415
Originator: NO
How can I (successfully) load the document?
========
$ wget http://www.cafeconleche.org/examples/shakespeare/r_and_j.xml
http://www.cafeconleche.org/examples/shakespeare/play.dtd
--21:28:27--
http://www.cafeconleche.org/examples/shakespeare/r_and_j.xml
=> `r_and_j.xml.1'
Resolving www.cafeconleche.org... 152.46.7.81
Connecting to www.cafeconleche.org|152.46.7.81|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 218,508 (213K) [text/xml]
100%[===========================================================================================================================================================================================================>]
218,508 306.08K/s
21:28:28 (305.10 KB/s) - `r_and_j.xml.1' saved [218508/218508]
--21:28:28-- http://www.cafeconleche.org/examples/shakespeare/play.dtd
=> `play.dtd.1'
Reusing existing connection to www.cafeconleche.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1,188 (1.2K) [text/html]
100%[===========================================================================================================================================================================================================>]
1,188 --.--K/s
21:28:28 (130.83 MB/s) - `play.dtd.1' saved [1188/1188]
FINISHED --21:28:28--
Downloaded: 219,696 bytes in 2 files
$ perl -i -p -e 's|"play.dtd"|"/tmp/play.dtd"|' /tmp/r_and_j.xml
$ grep play.dtd /tmp/r_and_j.xml
<!DOCTYPE PLAY SYSTEM "/tmp/play.dtd">
$ l /tmp/r_and_j.xml /tmp/play.dtd
-rw-r----- 1 manegold ins 1188 1999-08-16 21:00 /tmp/play.dtd
-rw-r----- 1 manegold ins 218513 2008-02-21 21:29 /tmp/r_and_j.xml
$ echo 'pf:add-doc("/tmp/r_and_j.xml","r_and_j.xml")' | mclient -lx
MAPI = [EMAIL PROTECTED]:50000
QUERY = pf:add-doc("/tmp/r_and_j.xml","r_and_j.xml")
ERROR = !ERROR: xmlParseEntityRef: no name
!ERROR: Entity 'amp' failed to parse
!ERROR: [shred_url]: 1 times inserted nil due to errors at tuples
[EMAIL PROTECTED]
!ERROR: [shred_url]: first error was:
!ERROR: fail to install ENTITY("amp")
!ERROR: shredder_parse: XML input not well-formed.
!ERROR: CMDshred_url: operation failed.
$ grep amp /tmp/r_and_j.xml /tmp/play.dtd
/tmp/r_and_j.xml:<LINE>We waste our lights in vain, like lamps by
day.</LINE>
/tmp/r_and_j.xml:<LINE>As daylight doth a lamp; her eyes in heaven</LINE>
/tmp/r_and_j.xml:<LINE>Two such opposed kings encamp them still</LINE>
/tmp/r_and_j.xml:<STAGEDIR>Enter Citizens, &c</STAGEDIR>
/tmp/r_and_j.xml:mattock, &c</STAGEDIR>
/tmp/play.dtd:<!ENTITY amp "&">
========
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2008-02-21 21:28
Message:
Logged In: YES
user_id=993208
Originator: NO
Attached you find the query -- I compiled with the HEAD version.
File Added: romeo.mxq
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-02-21 21:21
Message:
Logged In: YES
user_id=572415
Originator: NO
Jan,
do you also happen to have the respective XQuery query?
Stefan
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2008-02-21 21:17
Message:
Logged In: YES
user_id=993208
Originator: NO
The preceding-sibling axis is still broken.
The attached query working on the Romeo and Juliet play at
http://www.cafeconleche.org/examples/shakespeare/r_and_j.xml fails with
latest stable version 0.22 in
loop_lifted_preceding_sibling_step_with_nsloc_test():
!ERROR: PFll_child: end_ctx must be head-aligned with iter_bat & ctx_bat,
i.e., have equal head seqbases and length.
!ERROR: PFll_child: operation failed.
File Added: romeo.delta.mil
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-02-11 10:00
Message:
Logged In: YES
user_id=572415
Originator: NO
Fixed in CVS (XQuery_0-22 branch):
Fixed off-by-one error in ll_following.
(Test already available)
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2008-02-10 14:14
Message:
Logged In: YES
user_id=572415
Originator: NO
tagged as "XQ" in subject
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-12-17 11:06
Message:
Logged In: YES
user_id=572415
Originator: NO
The preceding-sibling bug has been fixed in CVS, cf.,
[ 1841747 ] preceding-sibling failure
http://sourceforge.net/tracker/index.php?func=detail&aid=1841747&group_id=56967&atid=482468
Note, though, that there has not yet been a bug-fix release since this
fix; hence, it is only available in CVS and in nightly built source
tarballs.
(We are busy with extending our nigtly build & testing system with the
ability to build Windows installers, but this exercise is not finished,
yet.)
----------------------------------------------------------------------
Comment By: Gerben Broenink (broenink)
Date: 2007-12-17 10:48
Message:
Logged In: YES
user_id=1960510
Originator: NO
The problem occurs every time I run the query. Even when I reinstall
monetDB, and have a new database. However, the preceding-sibling error
gives another error message the the following-sibling error:
xquery>pf:add-doc("D:\XML-DATA\Xmark\xmark0.1.xml", "xmark01.xml")
more>^Z
xquery>count(doc("xmark01.xml")//*/following-sibling::regions)
more>^Z
MAPI = [EMAIL PROTECTED]:50000
QUERY = count(doc("xmark01.xml")//*/following-sibling::regions)
ERROR = !ERROR: BATfetchjoin(tmp_426,1000000000_rid_prop) does not hit
always (|
bn|=245 != 246=|l|) => can't use fetchjoin.
!ERROR: CMDleftfetchjoin: operation failed.
!ERROR: interpret_params: leftjoin(param 1): evaluation error.
!ERROR: interpret_params: hmark(param 1): evaluation error.
xquery>count(doc("xmark01.xml")//*/preceding-sibling::regions)
more>^Z
MAPI = [EMAIL PROTECTED]:50000
QUERY = count(doc("xmark01.xml")//*/preceding-sibling::regions)
ERROR = !ERROR: BATmalleftfetchjoin: Cannot perform leftfetchjoin: right
head is
no dense OID column.
!ERROR: CMDleftfetchjoin: operation failed.
!ERROR: interpret_params: chk_order(param 1): evaluation error.
xquery>
As you can see, I load the document explicitly, however when I try to load
it implicitly, I got the same error.
Gerben
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-12-16 16:49
Message:
Logged In: YES
user_id=572415
Originator: NO
Nightly Testing seems to confirm the bug for following-sibling, but not
for preceding sibling:
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTests103/GNU.64.64.d-Fedora6/tests_BugTracker/preceding_following-sibling_bug.SF-1850772.out.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTests103/GNU.64.64.d-Fedora6/tests_BugTracker/preceding_following-sibling_bug.SF-1850772.err.00.html
"By hand" I was not (yet?) able to reproduce the bug consistently to
investigate it. In fact, I saw it only once after a fresh virgin re-build
on a virgin database (dbfarm). After restarting Mserver, everything seems
to work fine, both on the previous database, on a new virgin database and
even after removing `monetdb4-config --localstatedir` (i.e., <prefix>/var)
completely.
Gerben,
does the problem occur for you consistently *every* time you run the given
query (with following- & preceding-sibling), both within the same Mserver
session and after restarting Mserver?
How do/did you load the document? Explicitly via pf:add-doc() or
implicitly via fn:doc() ?
----------------------------------------------------------------------
Comment By: Gerben Broenink (broenink)
Date: 2007-12-15 11:22
Message:
Logged In: YES
user_id=1960510
Originator: NO
I'm the student Jan spoke about,
I'm using windows XP, and Thursday I downloaded the latest monetDB/xquery
installer for windows. (32bit):
http://prdownloads.sourceforge.net/monetdb/MonetDB4-XQuery-Installer-i386-20071017.msi
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-12-14 21:57
Message:
Logged In: YES
user_id=572415
Originator: NO
Added test in
pathfinder/tests/BugTracker/Tests/preceding_following-sibling_bug.SF-1850772.*
Works fine for me with both the latest Stable and the latest Current
sources from CVS.
Testing will tell us more about other platforms tomorrow.
----------------------------------------------------------------------
Comment By: Jan Flokstra (jflokstra)
Date: 2007-12-14 16:54
Message:
Logged In: YES
user_id=1054297
Originator: YES
Hi Stefan,
I used a pretty up-to-date head version but to be sure I recompiled on my
own SuSe9.3 notebook and used the Current of today (14 dec 16:15). The bug
was still there. I'm using a 32 bit Pentium (with 32 bit oid:-) running
SuSe9.3 and gcc 3.3.5. I do not know which Windows and Pathfinder version
the student, who's first name is Gerben (sorry), is running. He has no SF
account and I only showed him how to follow this discussion. This will
probably be my last e-mail on this issue the coming 2 weeks.
Jan.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-12-14 16:14
Message:
Logged In: YES
user_id=572415
Originator: NO
With a Current checkout of Wednesday Dec 12 2007, configure with
--enable-debug, compiled with gcc 4.1.2 on 64-bit Fedora Core 6 on an
Athlon 64 X2, it seems to work for me --- provided the expected result is
"0":
========
$ Mserver --dbinit='module(pathfinder);'
# MonetDB Server v4.21.0
# based on GDK v1.21.0
# Copyright (c) 1993-2007, CWI. All rights reserved.
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically
linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.3.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.21.0 loaded
# XRPC administrative console at http://localhost:50001/admin
MonetDB>
========
$ ls -l /tmp/xmark01.xml
-rw-r--r-- 1 manegold ins 33928 Dec 14 16:03 /tmp/xmark01.xml
========
$ mclient -lx
xquery>count(doc("/tmp/xmark01.xml")//*/following-sibling::regions)
more><>
0
xquery>
========
Hence, which "Current" version did/do you use?
(I currently don't have a running Stable available, and no time to
build/install one ...)
(In case JanF is not available for discussions/feedback, it would be handy
if "[EMAIL PROTECTED]" (sorry, Jan did not reveal your name)
could follow/join the discussion, here.)
----------------------------------------------------------------------
Comment By: Jan Flokstra (jflokstra)
Date: 2007-12-14 15:52
Message:
Logged In: YES
user_id=1054297
Originator: YES
Yep, I tried -d10 and the result was exactly the same. There were no
warnings in the server window:
[EMAIL PROTECTED]:~/scripts> Mserver -d10
--config=/usr/local/flokstra/etc/MonetDB.conf --dbname test
# MonetDB Server v4.21.0
# based on GDK v1.21.0
# Copyright (c) 1993-2007, CWI. All rights reserved.
# Compiled for i686-suse-linux/32bit with 32bit OIDs; dynamically linked.
# Visit http://monetdb.cwi.nl/ for further information.
MonetDB>module(pathfinder);
# PF/Tijah module v0.3.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.21.0 loaded
# XRPC administrative console at http://localhost:50001/admin
MonetDB>
And the log of the client window was:
[EMAIL PROTECTED]:~/scripts> mclient -lx
xquery>count(doc("xmark01.xml")//*/following-sibling::regions)
more>MAPI = [EMAIL PROTECTED]:50000
QUERY = count(doc("xmark01.xml")//*/following-sibling::regions)
ERROR = !ERROR: BATfetchjoin(tmp_565,1000000000_rid_prop) does not hit
always (|bn|=245 != 246=|l|) => can't use fetchjoin.
!ERROR: CMDleftfetchjoin: operation failed.
!ERROR: interpret_params: leftjoin(param 1): evaluation error.
!ERROR: interpret_params: hmark(param 1): evaluation error.
xquery>
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-12-14 15:33
Message:
Logged In: YES
user_id=572415
Originator: NO
Did/could you try with `Mserver -d10 ...`?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1850772&group_id=56967
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs