Bugs item #2388424, was opened at 2008-12-04 13:32
Message generated for change (Comment added) made by stmane
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2388424&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: None
Group: Pathfinder "stable"
>Status: Closed
Resolution: Fixed
Priority: 8
Private: No
Submitted By: Floris Ouwendijk (floris233)
Assigned to: Peter Boncz (boncz)
Summary: ERROR: XML Generation: NULL BAT has a 24 head, but tail is N

Initial Comment:
While running a scenario that produces invalid XML, Mserver correctly reports 
errors, but afterwards the data is corrupt.
The scenario involves quite some queries, some concurrently executed. The 
following are the steps leading up to the problem. Replaying the log of the 
scenario doesn't reproduce the situation, while rerunning the scenario does.
The database version used is built from 
/projects/monetdb/Stable/.DailyBuilds./20081126/

The following is the query that contains invalid XML in the file being shredded:
(: Thu Dec 04 11:36:01 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@4ab34646' :)

pf:add-doc("/var/dbtransfer/invalidxml/xiraf12186.xml","-6254939761029904246-148-1228386961869.xml","cons02_log.xml")
<>

Error: ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
ERROR: PCDATA invalid Char value 65535
ERROR: Char 0xFFFF out of allowed range
(and lots more of these errors).

This is followed by some queries that do not involve the above document:
(: Thu Dec 04 11:37:19 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@7b712193' :)

1+1
<>


(: Thu Dec 04 11:37:19 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@7b712193' :)

count(doc("cons02.xml")//*)
<>


(: Thu Dec 04 11:37:19 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@fcdfd19' :)

doc("cons02.xml")
<>


(: Thu Dec 04 11:37:27 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

1+1
<>


(: Thu Dec 04 11:37:27 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

pf:del-doc("cons02.xml")
<>


(: Thu Dec 04 11:37:28 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@4ab34646' :)

pf:add-doc("/var/dbtransfer/invalidxml/xiraf12187.xml","cons02.xml","cons02.xml_1228387047960",10)
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

1+1
<>

(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

pf:del-doc("prepared11965.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@7b712193' :)

pf:del-doc("prepared11976.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@fcdfd19' :)

pf:del-doc("prepared11995.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

pf:del-doc("prepared12024.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@4ab34646' :)

pf:del-doc("prepared12031.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

pf:del-doc("prepared12032.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@7b712193' :)

pf:del-doc("prepared12156.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@fcdfd19' :)

pf:del-doc("prepared12171.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

pf:del-doc("prepared12182.data")
<>


(: Thu Dec 04 11:37:45 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@4ab34646' :)

let $doc := doc("cons02.xml")//*[not(self::container)]
let $count := count(for $i in $doc
                    where not($i/@xid)
                    return $i)
let $max := (let $nodes := for $j in $doc/@xid
                           return $j cast as xs:integer
            return
              if (count($nodes) > 0) then
                max($nodes)
              else
                0)
return ($count, $max, count($doc))
<>


(: Thu Dec 04 11:37:55 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

1+1
<>


(: Thu Dec 04 11:37:55 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

doc("cons02.xml")
<>


(: Thu Dec 04 11:38:02 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@7b712193' :)

pf:del-doc("cons02.xml")
<>


(: Thu Dec 04 11:38:03 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@fcdfd19' :)

pf:add-doc("/var/dbtransfer/invalidxml/xiraf12190.xml","cons02.xml","cons02.xml_1228387082386",10)
<>


(: Thu Dec 04 11:38:21 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

1+1
<>




Then the final steps involve the document:
(: Thu Dec 04 11:38:21 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@612e4cd' :)

count(pf:collections()[.="cons02_log.xml"])
<>


(: Thu Dec 04 11:38:21 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@4ab34646' :)

element { "log" } { pf:collection("cons02_log.xml")//run }
<>


(: Thu Dec 04 11:38:21 CET 2008 @ connection 
'nl.minjus.nfi.xiraf.xquerydbconnect...@5f3c296b' :)

pf:add-doc("/var/dbtransfer/invalidxml/xiraf12192.xml","BED68817-131F-9A60-51AB-1300FAF5AE8E.xml","BED68817-131F-9A60-51AB-1300FAF5AE8E.xml_1228387101406")
<>

Error: ERROR: error parsing attribute name
ERROR: attributes construct error
ERROR: Couldn't find end of Start Tag fault line 81143
ERROR: Premature end of data in tag task line 81119
ERROR: Premature end of data in tag failure line 81118
ERROR: Premature end of data in tag run line 81066
ERROR: Premature end of data in tag log line 1
ERROR: [shred_url]: 1 times inserted nil due to errors at tuples 0...@0.
ERROR: [shred_url]: first error was:
ERROR: shredder_parse: XML input not well-formed.
ERROR: CMDshred_url: operation failed.


This final error is correct: the file being shredded is not valid. The file is 
the output of the query right before it:
element { "log" } { pf:collection("cons02_log.xml")//run }

In this output, the last lines are:

<task exitvalue="0" xid="1639">
  <errout/>
  <stdout>11:34:48,498 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] Going to 
run OLE2Tool on case 'cons02' (82126168995,82126170531)
11:34:48,499 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] Writing XML to 
'/tmp/floris_xiraf_invalidxml/work/invoke-1252256301/output/1639.xml' and 
handler to (/tmp/floris_xiraf_invalidxml/work/invoke-1252256301/output
/1639.hndlr)
11:34:48,509 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] Starting 
tool-run...
11:34:48,509 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: Getting 
StreamNode for 'cons02', [82126168995,82126170531]
11:34:53,985 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] StreamNode size: 
1536
11:34:53,985 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: Opening OLE2 
file...
CANNOT FIND CHILD Catalog
CANNOT FIND CHILD PoMAPI  = [email protected]:49980
QUERY = element { "log" } { pf:collection("cons02_log.xml")//run }
ERROR = !ERROR:
        !ERROR: XML Generation: NULL BAT has a 24 head, but tail is NULL.
        !ERROR:
        !ERROR: xquery_print_result_main: operation failed.
werPoint Document
CANNOT FIND CHILD WordDocument
11:34:54,181 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: got unknown 
ole2 subformat
11:34:54,181 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: Generating 
XML...
11:34:54,189 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: size is 0
11:34:54,189 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] run: type is ole2
11:34:54,213 INFO  [nl.minjus.nfi.xiraf.tools.ole2.OLE2Tool] Done!
</stdout>

  <fault!ERROR: XML Generation: tmp_1454 BAT does not have a 24 head.


This is a merger of output and error streams of mclient. The error seems to be:
[email protected]:49980
QUERY = element { "log" } { pf:collection("cons02_log.xml")//run }
ERROR = !ERROR:
        !ERROR: XML Generation: NULL BAT has a 24 head, but tail is NULL.
        !ERROR:
        !ERROR: xquery_print_result_main: operation failed.
ERROR: XML Generation: tmp_1454 BAT does not have a 24 head.



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

>Comment By: Stefan Manegold (stmane)
Date: 2009-03-15 11:21

Message:
Due to lack of information and/or data to reproduce the problem,
closing without test, 
and hence, without both
check whether the bug is indeed fixed
and monitoring to ensure the persistence of the fix.


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

Comment By: Stefan Manegold (stmane)
Date: 2009-02-17 01:28

Message:
Unfortunately, this bug report does not provide the data (documents) that
is required to create a proper test.


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

Comment By: Stefan Manegold (stmane)
Date: 2009-02-16 13:40

Message:
re-opened to remind us that we should consider adding a test

(and find out how/by whow it was fixed, if at all; there is no comment
about that ...)


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

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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to