I tried to start gsserver through executing gs_startnode
and gs_joincluster
then gsserver binary throws SIGSEGV when executing a specific SQL statement through JDBC driver:
INSERT INTO x VALUES (1),();
The backtrace of gsserver crashes:
#0 0x0000000002941cb0 in __gnu_cxx::__normal_iterator<SyntaxTree::Expr**, std::vector<SyntaxTree::Expr*, util::StdAllocator<SyntaxTree::Expr*, void> > >::__normal_iterator (this=0x7fff98ff5af0, __i=<error reading variable>) at /usr/include/c++/4.8.2/bits/stl_iterator.h:726 #1 0x00000000029314d3 in std::vector<SyntaxTree::Expr*, util::StdAllocator<SyntaxTree::Expr*, void> >::begin (this=<incomplete type>) at /usr/include/c++/4.8.2/bits/stl_vector.h:539 #2 0x0000000002a08d4a in SQLExecution::checkSelectList (this=<incomplete type>, selectList=0x0, mergeSelectList=..., placeHolderCount=@0x7fff98ff5b9c: 0) at ./sql_execution.cpp:3567 #3 0x0000000002a05a92 in SQLExecution::checkFastInsert (this=<incomplete type>, setInfo=...) at ./sql_execution.cpp:2981 #4 0x0000000002a0418d in SQLExecution::fastInsert (this=<incomplete type>, ec=..., bindParamInfos=..., useCache=true) at ./sql_execution.cpp:2834 #5 0x00000000029f50a7 in SQLExecution::execute (this=<incomplete type>, ec=..., request=..., prepareBinded=255, e=0x7fff80011b18, versionId=160 '\240', responseJobId=0x0) at ./sql_execution.cpp:757 #6 0x0000000002b40dad in SQLRequestHandler::operator() (this=0x7fff8000a071, ec=..., ev=...) at ./sql_service.cpp:894 #7 0x00000000025c212d in EventEngine::Dispatcher::handleEvent (this=0x7fffffff84c8, ec=..., ev=..., entry=...) at ./event_engine.cpp:1663 #8 0x00000000025c0e67 in EventEngine::Dispatcher::execute (this=0x4e602e0, ec=..., ev=...) at ./event_engine.cpp:1495 #9 0x00000000025cbed5 in EventEngine::EventWorker::run (this=0x7fff80002b78) at ./event_engine.cpp:3399 #10 0x000000000348a285 in util::Thread::threadProc (param=0x4e73ec8) at ./util/thread.cpp:1262 #11 0x00007ffff7fa3609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #12 0x00007ffff7b4e133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The server should send error to the client, such as Parse Error at '('
or Table 'x' not exist
, rather than crashing straightly. It can be reproduced on the master branch and the v5.1.0 tag.