Bugs item #1637825, was opened at 2007-01-17 16:53
Message generated for change (Comment added) made by tsheyar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1637825&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/tests
Group: Pathfinder CVS Head
>Status: Closed
>Resolution: Fixed
Priority: 8
Private: No
Submitted By: Stefan Manegold (stmane)
Assigned to: Jan Rittinger (tsheyar)
Summary: PF: XRPC tests fails

Initial Comment:
While working fine until Tuesday Jan 9 2007, all XRPC tests fail since (at 
least) Friday Jan 12 2007 (there were no pathfinder testing results in between 
these dates), i.e., after checkins on Tuesday Jan 9 2007 through Thursday Jan 
11 2007 (which include propagations of changes from the XQuery_0-14 branch that 
were originally applied there between Friday Jan 05 2007 and Thursday Jan 11 
2007).

fatal error: The Pathfinder compiler experienced 
an internal problem in the MIL code generation.
You may want to report this problem to the Pathfinder 
development team ([EMAIL PROTECTED]).

When reporting problems, please attach your XQuery input,
as well as the following information:
could not lookup variable '#pf:v_0219' in join recognition.

We apologize for the inconvenience...


See (e.g.):
http://monetdb.cwi.nl/testing/projects/monetdb/Current/pathfinder/.mTests103/GNU.64.64.d-Fedora4/tests_XRpc/add_dbl.err.00.html
http://monetdb.cwi.nl/testing/projects/monetdb/Current/pathfinder/.mTests103/GNU.64.64.d-Fedora4/benchmarks_XMark_XRpc/q01.err.00.html


----------------------------------------------------------------------

>Comment By: Jan Rittinger (tsheyar)
Date: 2007-01-19 10:41

Message:
Logged In: YES 
user_id=993208
Originator: NO

The bug is now fixed in CVS.

Thanks Jennie for hunting this one down. The bug was hidden in
coreopt.brg. It was however not related to my latest changes but only
triggered by this rewrite.
The variable expansion that removed the binding did not fill in the
replacement because the XRPC operator rule did use the wrong token (var
instead of Atom).

----------------------------------------------------------------------

Comment By: Ying Zhang (yingying)
Date: 2007-01-19 00:12

Message:
Logged In: YES 
user_id=341633
Originator: NO

This problem is caused by Jan R's checkin on Jan. 09:

====================
From: Jan Rittinger <[EMAIL PROTECTED]>                       
                                                                           
                     
Date: Tue, 09 Jan 2007 14:40:58 +0000                                     
                                                                           
                     

Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4167/core

Modified Files:
        coreopt.brg fs.brg
Log Message:

...

-- Introduced new core optimizations:
   * casts are removed whose input type already matches the cast type
...

@@ -1067,6 +1085,16 @@
             }                                                            
                                                                           
                     
             break;

+        /* CoreExpr:           cast (SequenceType, CoreExpr) */
+        case 72:
+            if (PFty_subtype (TY(L(p)), TY(R(p))) &&
+                PFty_subtype (TY(R(p)), TY(L(p)))) {
+                *p = *R(p);
+                rewritten = true;
+                break;
+            }
+            break;
+
         /* Atom:                var */
         case 73:
             {
====================


I used the following query and module:

====================
$ cat add_dbl.xq 
import module namespace xrpc = "xrpc-fun" at
"/ufs/zhang/www/xrpc/xrpcfun.xq";

for $i in (40.5, 50.5)
    return execute at {"localhost"} {xrpc:add($i, (10.5, 30.5))}

$ cat /ufs/zhang/www/xrpc/xrpcfun.xq
module namespace xrpcfun = "xrpc-fun";

declare function xrpcfun:add($v1 as xs:decimal, 
                          $v2 as xs:decimal*) as xs:decimal* 
{
    let $res := $v1 
    for $i in $v2  
        return $res + $i 
};
====================

The pathfinder compiler gives the following error:

    $ pf add_dbl.xq
    fatal error: The Pathfinder compiler experienced....
    could not lookup variable '#pf:v_0041' in join recognition.
    ...
    # halted in ../../../compiler/mil/milprint_summer.c (mps_error), line
158

The variable v_0041 should contain the URI string of the destination of an
XRPC call, 
but its value is removed during core optimization.

Before the call to reduce() in PFcoreopt() (coreopt.brg line 1190), a
fraction of the
XQuery Core tree looks like this:

  ...
  flwr (nil (),
    flwr
      (let
         (letbind (var (#pf:v_0040),
            apply (fn:data,
              arg (lit_str (localhost), nil ()))),
         let
           (letbind (var (#pf:v_0041),
              cast (seqtype (string), var (#pf:v_0040))),
           nil ())),
      xrpc (var (#pf:v_0041),
  ...

After the call, the XQuery Core tree look like this:

  ...
  flwr
    (let
       (letbind (var (#pf:v_0022),
          seq (lit_dec (40.5), lit_dec (50.5))),
       for
         (forbind (forvars (var (i), nil ()),
            var (#pf:v_0022)), nil ())),
    xrpc (var (#pf:v_0041),
      flwr
        (let
           (letbind (var (#pf:v_0032),
              seq (lit_dec (10.5), lit_dec (30.5))),
           nil ()),
        apply (xrpcfun:add,
          arg (var (i), arg (var (#pf:v_0032), nil ())))))))
  ...

Obviously, the value of v_0041 was removed during the optimization, 
by the new "case 72".


The simplest solution is to remove "case 72", and all XRPC tests work
again, 
but it might not be Jan's intension...

Jan,  I reassign this bug to you.  Would you please have a look at this to
see 
if the implementation of "case 72" can be improved?  Otherwise, would you
mind 
to (temporarily) undo this change? Thank you very much!

Jennie

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-01-17 18:20

Message:
Logged In: YES 
user_id=572415
Originator: YES

Jennie,

maybe you could have a look at this.
Feel free to assign it to someone else, in case you think it's not your
bug.

Thanks!


----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-01-17 17:51

Message:
Logged In: YES 
user_id=572415
Originator: YES

Since these tests do work in the XQuery_0-14 release branch, i.e., they
have (recently) been broken only in the development trunk, I consider this
bug report high priority.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1637825&group_id=56967

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to