-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
-
Problem Description
During the execution of gquery with a specific query, the program terminates with a segmentation fault (SIGSEGV) in the query execution engine. -
Prerequisites
bin/gbuild -db lubm7 -f ./data/lubm/lubm.nt
Test case:
- Reproduction Steps && Error Log
ting668@nuc:~/gStore$ gdb ./bin/gquery
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bin/gquery...
(gdb) run -db lubm7 -q ./poc/poc_02.sql
Starting program: /home/ting668/gStore/bin/gquery -db lubm7 -q ./poc/poc_02.sql
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3bff640 (LWP 14047)]
[New Thread 0x7ffff33fe640 (LWP 14048)]
[New Thread 0x7ffff2bfd640 (LWP 14049)]
[New Thread 0x7ffff23fc640 (LWP 14050)]
[New Thread 0x7ffff1bfb640 (LWP 14051)]
[New Thread 0x7ffff13fa640 (LWP 14052)]
[New Thread 0x7ffff03ff640 (LWP 14053)]
[New Thread 0x7fffee7ff640 (LWP 14054)]
[Thread 0x7ffff03ff640 (LWP 14053) exited]
[Thread 0x7ffff1bfb640 (LWP 14051) exited]
[Thread 0x7ffff13fa640 (LWP 14052) exited]
[New Thread 0x7fffecffe640 (LWP 14055)]
[New Thread 0x7fffec7fd640 (LWP 14056)]
[Thread 0x7fffecffe640 (LWP 14055) exited]
[Thread 0x7fffee7ff640 (LWP 14054) exited]
[New Thread 0x7fffeb9fc640 (LWP 14057)]
[New Thread 0x7fffeb1fb640 (LWP 14058)]
[New Thread 0x7fffea9fa640 (LWP 14059)]
[Thread 0x7fffec7fd640 (LWP 14056) exited]
[Thread 0x7fffeb9fc640 (LWP 14057) exited]
[Thread 0x7fffea9fa640 (LWP 14059) exited]
[==================================================] Set pre map, pre num = 5
[Thread 0x7fffeb1fb640 (LWP 14058) exited] ] Load s2v cache 1/3
[==================================================] Load cache done!
[New Thread 0x7fffeb1fb640 (LWP 14060)]
[New Thread 0x7fffeb9fc640 (LWP 14061)]
[New Thread 0x7fffecffe640 (LWP 14062)]
[New Thread 0x7ffff03ff640 (LWP 14063)]
[Thread 0x7fffecffe640 (LWP 14062) exited]
[New Thread 0x7ffff1bfb640 (LWP 14064)]
[Thread 0x7fffeb1fb640 (LWP 14060) exited]
[New Thread 0x7ffff13fa640 (LWP 14065)]
[Thread 0x7ffff1bfb640 (LWP 14064) exited]
[New Thread 0x7fffec7fd640 (LWP 14066)]
[New Thread 0x7fffea9fa640 (LWP 14067)]
[Thread 0x7ffff03ff640 (LWP 14063) exited]
[New Thread 0x7fffe9af9640 (LWP 14068)]
[Thread 0x7ffff13fa640 (LWP 14065) exited]
[Thread 0x7fffe9af9640 (LWP 14068) exited]
[==================================================] Set pre map, pre num = 17
[Thread 0x7fffeb9fc640 (LWP 14061) exited]
[Thread 0x7fffec7fd640 (LWP 14066) exited]
[Thread 0x7fffea9fa640 (LWP 14067) exited]
[==================================================] Load cache done!
Thread 1 "gquery" received signal SIGSEGV, Segmentation fault.
0x00005555559d7b74 in gstore::Executor::ExtendRecordOneNode (this=0x7ffff12e0058, one_step_join_node_=..., id_pos_mapping=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >, std::allocator<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >, std::allocator<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >> (use count 3, weak count 0) = {...}, id_caches=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >> (use count 5, weak count 0) = {...}, new_id=7, distinct=<optimized out>, record_iterator=<error reading variable: Cannot access memory at address 0x0>) at /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:1046
1046 return *(this->_M_impl._M_start + __n);
(gdb) bt
#0 0x00005555559d7b74 in gstore::Executor::ExtendRecordOneNode (this=0x7ffff12e0058, one_step_join_node_=..., id_pos_mapping=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >, std::allocator<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >, std::allocator<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > >> (use count 3, weak count 0) = {...}, id_caches=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >> (use count 5, weak count 0) = {...}, new_id=7, distinct=<optimized out>,
record_iterator=<error reading variable: Cannot access memory at address 0x0>) at /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:1046
#1 0x000055555597eb73 in gstore::Executor::InitialTableOneNode (this=0x7ffff014e510, max_output=<optimized out>, id_caches=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >> (use count 5, weak count 0) = {...}, feed_plan=..., is_entity=<optimized out>, is_literal=<optimized out>, is_predicate=<optimized out>,
distinct=<optimized out>) at /home/ting668/gStore/src/Database/Executor.cpp:111
#2 Optimizer::InitialTable (this=<optimized out>, bgp_query=..., id_caches=..., step_operation=..., max_output=<optimized out>)
at /home/ting668/gStore/src/Database/Optimizer.cpp:836
#3 0x00005555559a9bd7 in Optimizer::ExecutionBreathFirst (this=0x7ffff014e510, bgp_query=<error reading variable: Cannot access memory at address 0x1>,
query_info=..., plan_tree_node=0x7ffff1300f00, id_caches=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >, std::allocator<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > > >, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<std::map<unsigned int, std::shared_ptr<IDList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<IDList> > > >> (use count 5, weak count 0) = {...}) at /home/ting668/gStore/src/Database/Optimizer.cpp:600
#4 0x000055555598f004 in Optimizer::DoQuery (this=0x7ffff014e510, bgp_query=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<BGPQuery, std::allocator<BGPQuery>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<BGPQuery, std::allocator<BGPQuery>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<BGPQuery> (use count 3, weak count 0) = {...},
query_info=...) at /home/ting668/gStore/src/Database/Optimizer.cpp:311
#5 0x00005555557f8d6e in GeneralEvaluation::queryEvaluation (this=0x7fffffffcf60, dep=0) at /home/ting668/gStore/src/Query/GeneralEvaluation.cpp:941
#6 0x00005555557f099b in GeneralEvaluation::doQuery (this=0x7fffffffcf60) at /home/ting668/gStore/src/Query/GeneralEvaluation.cpp:341
#7 0x0000555555744e01 in Database::query (this=0x7fffffffd848,
_query="select distinct ?x ?p1 ?p2 ?p3 where \n{ \n\t?x<rdf:type> <Zb:UndergraduateStudent>. \n\t?y <ub:name> <Coqrse1>. \n\t?x ?p1 ?y. \n\t?z <ub:teacherame> <FullProfessor1>. \n\t?k ?p2?w. \n\t?ent\n\t?ent"..., _result_set=..., _fp=0x7ffff6e1b780 <_IO_2_1_stdout_>, update_flag=true,
export_flag=false, txn=std::shared_ptr<Transaction> (empty) = {...}) at /home/ting668/gStore/src/Database/Database.cpp:1965
#8 0x000055555572dabf in main (argc=<optimized out>, argv=<optimized out>) at /home/ting668/gStore/src/Main/gquery.cpp:140
(gdb)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels