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

Flaky assertion failure on empty PSO scan #206

Closed
niklas88 opened this issue Mar 15, 2019 · 3 comments
Closed

Flaky assertion failure on empty PSO scan #206

niklas88 opened this issue Mar 15, 2019 · 3 comments

Comments

@niklas88
Copy link
Member

On Wikidata Full an evaluation script generates queries for looking up aliases for predicates and entities.

One of the queries it generates is the following looking for aliases for wikibase:claim
which should return an empty result but actually results in an assertion failure.
I've broken this down to the following simple query which should also return an empty result

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?label WHERE {
   wikibase:claim skos:altLabel ?label .
   FILTER langMatches(lang(?label),"en") .
}

Instead the following assertion is triggered

Fri Mar 15 10:52:15.645 - DEBUG: Got 1 subplans to create.
Fri Mar 15 10:52:15.645 - DEBUG: Creating execution plan.
Fri Mar 15 10:52:15.645 - DEBUG: IndexScan result computation...
Fri Mar 15 10:52:15.645 - DEBUG: Performing PSO scan of relation @en@<http://www.w3.org/2004/02/skos/core#altLabel> with fixed subject: <http://wikiba.se/ontology#claim>...
Fri Mar 15 10:52:15.645 - ERROR: Failed to compute Operation result for:
Fri Mar 15 10:52:15.645 - ERROR: SCAN PSO with P = "@en@<http://www.w3.org/2004/02/skos/core#altLabel>", S = "<http://wikiba.se/ontology#claim>"
Fri Mar 15 10:52:15.645 - ERROR: ASSERT FAILED (it != _blocks.begin(); in /app/src/index/MetaDataTypes.cpp, line 111, function std::pair<long int, long unsigned int> BlockBasedRelationMetaData::getBlockStartAndNofBytesForLhs(Id) const)

Interestingly the same works for rdfs:label

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?label WHERE {
   wikibase:claim rdfs:label ?label .
   FILTER langMatches(lang(?label),"en") .
}

This happend both on an older index as well as one I built yesterday with the xsd:double fixes.

@niklas88 niklas88 changed the title Flakey assertion failure on empty PSO scan Flaky assertion failure on empty PSO scan Mar 15, 2019
@niklas88
Copy link
Member Author

This Bug is affected by PR #208, while that does indeed fix the original assertion error we get a new one

Mon Mar 18 16:28:49.012 - ERROR: SCAN PSO with P = "@en@<http://www.w3.org/2004/02/skos/core#altLabel>", S = "<http://wikiba.se/ontology#claim>"
Mon Mar 18 16:28:49.012 - ERROR: ASSERT FAILED (it != _blocks.begin(); in /app/src/index/MetaDataTypes.cpp, line 144, function std::pair<long int, long unsigned int> BlockBasedRelationMetaData::getFollowBlockForLhs(Id) const)
Mon Mar 18 16:28:49.013 - DEBUG: Sent 649 bytes.

I suspect this to be the almost identical problem. Stupidly as the code looked good and understandable to me I didn't test on this bug until after merging the change yeah really should have done that.

@joka921
Copy link
Member

joka921 commented Mar 18, 2019

I just opened #211 that also adresses this bug in a similar way as the first one.

  • I also found another possible problem connected with these issues that i defused.

@niklas88
Copy link
Member Author

Fixed by #211

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

2 participants