Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion failure - report to developers #1810

Open
pfps opened this issue Feb 15, 2025 · 3 comments
Open

assertion failure - report to developers #1810

pfps opened this issue Feb 15, 2025 · 3 comments

Comments

@pfps
Copy link

pfps commented Feb 15, 2025

This error seems to depend on the cache. Restarting the server reduces or eliminates the error on my benchmarking machine. But on https://qlever.cs.uni-freiburg.de/api/wikidata/ I'm getting errors even when clearing the cache between each query. More details below.

On my benchmarking machine, I'm getting:

Assertion `subresult->idTable().numColumns() == inWidth` failed. Please report this to the developers. In file \"/home/local/qlever/qlever-code/src/engine/GroupBy.cpp \" at line 411

for several queries (only differing in the target: PREFIX) including

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX cc: <http://creativecommons.org/ns#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prn: <http://www.wikidata.org/prop/reference/value-normalized/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX prv: <http://www.wikidata.org/prop/reference/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdata: <http://www.wikidata.org/wiki/Special:EntityData/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wdref: <http://www.wikidata.org/reference/>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX wdv: <http://www.wikidata.org/value/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX target: <http://www.wikidata.org/entity/Q23397>

SELECT ?score 
?author ?authorLabel (CONCAT("/author/", SUBSTR(STR(?author), 32)) AS ?authorUrl)
?example_work ?example_workLabel (CONCAT("/work/", SUBSTR(STR(?example_work), 32)) AS ?example_workUrl)

WHERE {
  {
  SELECT
    (SUM(?score_) AS ?score)
    ?author
    (SAMPLE(?work) AS ?example_work)
  WHERE {
    { 
      ?author wdt:P101/wdt:P279* target: .
      BIND(20 AS ?score_)
    }
    UNION
    {
      SELECT (3 AS ?score_) ?author ?work WHERE {
        ?work wdt:P50 ?author ;
              wdt:P921/wdt:P279* target: .
      }
    }
    UNION
    {
      SELECT (1 AS ?score_) ?author ?work WHERE {
        ?work wdt:P50 ?author .
        ?citing_work wdt:P2860 ?work .
        ?citing_work wdt:P921/wdt:P279* target: .
      }
    }
  }
  GROUP BY ?author
  ORDER BY DESC(?score)
  LIMIT 200
} OPTIONAL { ?example_work rdfs:label ?example_workLabel .  FILTER ( lang(?example_workLabel) = 'en' ) }
  OPTIONAL { ?author rdfs:label ?authorLabel .  FILTER ( lang(?authorLabel) = 'en' ) }
}
ORDER BY DESC(?score)

This query is an instantiation of a transformed Scholia query with prefixes added at the front.

On the QLever Wikidata Query Service, this query https://qlever.cs.uni-freiburg.de/wikidata-test/xlWAgA times out so I can't tell whether the problem also exists there.

@pfps
Copy link
Author

pfps commented Feb 15, 2025

I'm also getting similar errors when using https://qlever.cs.uni-freiburg.de/api/wikidata/

For example

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX cc: <http://creativecommons.org/ns#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prn: <http://www.wikidata.org/prop/reference/value-normalized/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX prv: <http://www.wikidata.org/prop/reference/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdata: <http://www.wikidata.org/wiki/Special:EntityData/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wdref: <http://www.wikidata.org/reference/>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX wdv: <http://www.wikidata.org/value/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#defaultView:Table

PREFIX target: <http://www.wikidata.org/entity/Q8502>

SELECT ?count ?short_name 
?venue ?venueLabel (CONCAT("/venue/", SUBSTR(STR(?venue), 32)) AS ?venueUrl)
WHERE {
  {
  SELECT (count(?work) as ?count) ?venue (SAMPLE(?short_name_) AS ?short_name) WHERE {
    { ?work wdt:P921/wdt:P31*/wdt:P279* target: . }
    union { ?work wdt:P921/wdt:P361+ target: . }
    union { ?work wdt:P921/wdt:P1269+ target: . }
    ?work wdt:P1433/wdt:P179* ?venue .
    OPTIONAL { ?venue wdt:P1813 ?short_name_ . }
  }
  GROUP BY ?venue
} OPTIONAL { ?venue rdfs:label ?venueLabel .  FILTER ( lang(?venueLabel) = 'en' ) } 
}
ORDER BY DESC(?count)
LIMIT 200

produces

Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226

This does not happen on my local copy of QLever and does not happen in the QLever ui on
https://qlever.cs.uni-freiburg.de/wikidata-test/hnhKWw

@pfps pfps changed the title assertion failure - report to developers assertion failure - report to developers (may depend on cache) Feb 16, 2025
@pfps pfps changed the title assertion failure - report to developers (may depend on cache) assertion failure - report to developers Feb 16, 2025
@pfps
Copy link
Author

pfps commented Feb 16, 2025

Here is a run against https://qlever.cs.uni-freiburg.de/api/wikidata/ of two variants of 18 Scholia queries. Two different reportable errors occur on both variants of 12 of the queries. But when I run some of the queries on the QLever UI I don't get an error.

What's the best way of sending you the queries to look at? I could just print out the query before evaluating it but it might be better to send them in some other way.

Here is one of the queries that produces problems.

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX cc: <http://creativecommons.org/ns#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prn: <http://www.wikidata.org/prop/reference/value-normalized/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX prv: <http://www.wikidata.org/prop/reference/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdata: <http://www.wikidata.org/wiki/Special:EntityData/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wdref: <http://www.wikidata.org/reference/>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
PREFIX wdv: <http://www.wikidata.org/value/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX target: <http://www.wikidata.org/entity/Q8054>

SELECT ?date ?work ?workLabel (CONCAT("/work/", SUBSTR(STR(?work), 32)) AS ?workUrl)
?topicsUrl ?topics
WHERE {
  {
  SELECT (MAX(?dates) as ?datetime) ?work (GROUP_CONCAT(DISTINCT ?topic_label; separator=" // ") AS ?topics) 
                                    (CONCAT("../topics/", GROUP_CONCAT(DISTINCT SUBSTR(STR(?topic), 32); separator=",")) AS ?topicsUrl) 
                                    WHERE {
    {
  SELECT DISTINCT ?work WHERE {
    ?work wdt:P921 / (wdt:P361+ | wdt:P1269+ | (wdt:P31* / wdt:P279*) ) target: .
  }
}   ?work wdt:P921 ?topic . 
    ?work wdt:P577 ?dates . 
	FILTER (!isBLANK(?dates)) .
    ?topic rdfs:label ?topic_label .  FILTER (lang(?topic_label) = 'en')
  }
  GROUP BY ?work
}  # There is a problem with BC dates
  # BIND(xsd:date(?datetime) AS ?date)
  BIND(REPLACE(STR(?datetime), 'T.*', '') AS ?date)
    
  OPTIONAL { ?work rdfs:label ?workLabel .  FILTER ( lang(?workLabel) = 'en' ) }
}
GROUP BY ?date ?work ?workLabel ?topicsUrl ?topics
ORDER BY ASC(?date)
LIMIT 500

@pfps
Copy link
Author

pfps commented Feb 16, 2025

Here is the output of the benchmarking run that shows the errors, but not the queries:

./benchmark.py --engine=QWDS --directory=scholia/topic | tee results/scholia-topic-qwds.tsvx
1	QWDS		    512	      	Count= 79 	200		Topic author awards for protein
2	QWDS		    546	      	Count= 8 	200		Topic author awards for building
3	QWDS		   6349	      	Count= 200 	200		Topic author scores graph for protein
4	QWDS		   1452	      	Count= 200 	200		Topic author scores graph for building
5	QWDS		   8077	      	Count= 200 	200		Topic author scores for protein
6	QWDS		  13626	      	None 	500	    "exception": "Tried to allocate 6.6 GB, but only 5.5 GB were available. Clear the cache or allow more memory for QLever during startup",	Topic author scores for building
7	QWDS		    513	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic authors for protein
8	QWDS		    415	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic authors for building
9	QWDS		    475	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-occuring map for protein
10	QWDS		    419	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-occuring map for building
11	QWDS		    509	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-occuring for protein
12	QWDS		    595	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-occuring for building
13	QWDS		    441	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-author graph for protein
14	QWDS		    678	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic co-author graph for building
15	QWDS		   1835	      	Count= 68 	200		Topic context for protein
16	QWDS		   1866	      	Count= 100 	200		Topic context for building
17	QWDS		    476	      	None 	400	    "exception": "Invalid SPARQL query: Built-in function \"notexists{?citing_workwdt:p50?author.?citing_workwdt:p2860?cited_work.?cited_workwdt:p50?author.}\"  not yet implemented; if you need it, just add it to SparqlQleverVisitor.cpp::visitTypesafe(Parser::BuiltInCallContext following the already implemented functions there",	Topic country citation graph for protein
18	QWDS		    511	      	None 	400	    "exception": "Invalid SPARQL query: Built-in function \"notexists{?citing_workwdt:p50?author.?citing_workwdt:p2860?cited_work.?cited_workwdt:p50?author.}\"  not yet implemented; if you need it, just add it to SparqlQleverVisitor.cpp::visitTypesafe(Parser::BuiltInCallContext following the already implemented functions there",	Topic country citation graph for building
19	QWDS		    517	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic earliest published workd for protein
20	QWDS		    426	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic earliest published workd for building
21	QWDS		    338	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic most cited authors for protein
22	QWDS		    488	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic most cited authors for building
23	QWDS		    424	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic organization map for protein
24	QWDS		    614	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic organization map for building
25	QWDS		    510	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic publications per year for protein
26	QWDS		    414	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic publications per year for building
27	QWDS		    428	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic recently published works for protein
28	QWDS		    516	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic recently published works for building
29	QWDS		    512	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic top cited for protein
30	QWDS		    356	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic top cited for building
31	QWDS		    424	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic topics for protein
32	QWDS		    353	      	None 	500	    "exception": "Assertion `_joinVar == findJoinVar(*_right, _rightJoinCol)` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/Join.cpp \" at line 139",	Topic topics for building
33	QWDS		   2159	      	Count= 14 	200		Topic uses for protein
34	QWDS		    909	      	Count= 0 	200		Topic uses for building
35	QWDS		    507	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic venues for protein
36	QWDS		    368	      	None 	500	    "exception": "Assertion `it != varColMap.end()` failed. Please report this to the developers. In file \"/local/data-ssd/qlever/qlever-code/src/engine/QueryExecutionTree.cpp \" at line 226",	Topic venues for building

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant