[redland-dev] [Redland Language Bindings 0000490]: SPARQL queries with filters cause Redland Python bindings to crash

Mantis Bug Tracker mantis-bug-sender at librdf.org
Thu Jan 26 19:43:25 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=490 
====================================================================== 
Reported By:                swilsak
Assigned To:                
====================================================================== 
Project:                    Redland Language Bindings
Issue ID:                   490
Category:                   api
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Binding Language (java, perl, php, python, ruby, tcl): python 
====================================================================== 
Date Submitted:             2012-01-27 00:43
Last Modified:              2012-01-27 00:43
====================================================================== 
Summary:                    SPARQL queries with filters cause Redland
Python	bindings to crash
Description: 
Running a query such as:
SELECT DISTINCT ?target ?type WHERE {
     { ?target a ?type ; ?reln ?obj .
       FILTER ( regex(str(?obj), "Professor", "i") )
     }
     FILTER ( ?type != 
<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#TeachingAssistant> )
}
on a datastore containing tens of thousands of queries causes the following
crash:

$ python quick_test.py
Initialized Model
Querying...
librdf error - digest SHA1 already registered
librdf error - hash memory already registered
librdf error - model storage already registered
librdf error - storage hashes already registered
librdf error - storage trees already registered
librdf error - storage memory already registered
librdf error - storage file already registered
librdf error - storage uri already registered
librdf error - query language sparql11 already registered
librdf error - query language sparql11-query already registered
librdf error - query language sparql11-update already registered
librdf error - query language sparql already registered
Traceback (most recent call last):
   File "quick_test.py", line 38, in <module>
     results = model.execute(RDF.SPARQLQuery(query))
   File "/usr/lib/python2.6/dist-packages/RDF.py", line 1156, in execute
     results = Redland.librdf_model_query_execute(self._model,query._query)
RDF.RedlandError: 'digest MD5 already registered'


Steps to Reproduce: 
Run attached script

I have reproduced this with some other similar queries as well, such as removing
the "DISTINCT" and/or the second "FILTER". This does affect how many triples it
takes to cause the crash; it looks like it's somewhere around 15,000-20,000 with
SELECT DISTINCT and closer to 40,000 with SELECT.

Additional Information: 
Redland/Redland Language Bindings 1.0.13.1
Raptor 2.0.0
Rasqal 0.9.22
Python 2.6
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-01-27 00:43 swilsak        New Issue                                    
2012-01-27 00:43 swilsak        File Added: quick_test.py                    
======================================================================



More information about the redland-dev mailing list