Opened 4 years ago

Last modified 16 months ago

#2318 closed defect

rasql - segfault with clip() with linestring — at Version 2

Reported by: Bang Pham Huu Owned by: nivlev@…
Priority: major Milestone: 10.2
Component: rasserver Version: 9.8
Keywords: Cc: Vlad Merticariu
Complexity: Medium

Description (last modified by Dimitar Misev)

select clip( c, LINESTRING(8 20,8 20,31 10,31 10,31 23,31 23,14 10,14 10) ) FROM test_grey AS c

with TRACE output enabled:

Interrupted by signal SIGSEGV (Invalid memory access at address 0)... stacktrace:
 [1] ??:0
 [2] ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:317 in __memcpy_avx_unaligned_erms
 [3] /usr/include/c++/11/bits/stl_algobase.h:431 in double* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<double>(double const*, double const*, double*)
     > 431: 	   __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
 [4] /usr/include/c++/11/bits/stl_algobase.h:495 in double* std::__copy_move_a2<false, double const*, double*>(double const*, double const*, double*)
     > 495: 			     _Category>::__copy_m(__first, __last, __result);
 [5] /usr/include/c++/11/bits/stl_algobase.h:522 in double* std::__copy_move_a1<false, double const*, double*>(double const*, double const*, double*)
     > 522:     { return std::__copy_move_a2<_IsMove>(__first, __last, __result); }
 [6] /usr/include/c++/11/bits/stl_algobase.h:529 in double* std::__copy_move_a<false, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*>(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*)
     > 529:       return std::__niter_wrap(__result,
 [7] /usr/include/c++/11/bits/stl_algobase.h:620 in double* std::copy<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*>(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*)
     > 620: 	    (std::__miter_base(__first), std::__miter_base(__last), __result);
 [8] /usr/include/c++/11/bits/stl_uninitialized.h:110 in double* std::__uninitialized_copy<true>::__uninit_copy<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*>(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*)
     > 110:         { return std::copy(__first, __last, __result); }
 [9] /usr/include/c++/11/bits/stl_uninitialized.h:151 in double* std::uninitialized_copy<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*>(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*)
     > 151: 	__uninit_copy(__first, __last, __result);
[10] /usr/include/c++/11/bits/stl_uninitialized.h:333 in double* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*, double>(__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, double*, std::allocator<double>&)
     > 333:     { return std::uninitialized_copy(__first, __last, __result); }
[11] /usr/include/c++/11/bits/stl_vector.h:1514 in double* std::vector<double, std::allocator<double> >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > > >(unsigned long, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double> > >)
     > 1514: 	     std::__uninitialized_copy_a(__first, __last, __result,
[12] /usr/include/c++/11/bits/vector.tcc:226 in std::vector<double, std::allocator<double> >::operator=(std::vector<double, std::allocator<double> > const&)
     > 226: 	     pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
[13] raslib/pointdouble.cc:83 in r_PointDouble::r_PointDouble(r_PointDouble const&)
     > 83:     points = vectorArg.getVectorContent();
[14] qlparser/qtclippingutil.cc:485 in vectorOfPairsWithoutMultiplicity(std::vector<r_PointDouble, std::allocator<r_PointDouble> > const&, unsigned long)
     > 485:         vectorOfSegmentEndpointPairs.emplace_back(vector<r_PointDouble>({polytopeVertices[i], polytopeVertices[k]}));
[15] qlparser/qtclippingfunc.cc:431 in QtClipping::extractLinestring(MDDObj const*, QtMShapeData const*, unsigned int)
     > 431:     vector<vector<r_PointDouble>> vectorOfSegmentEndpointPairs = vectorOfPairsWithoutMultiplicity(mshape->getMShapeData(), bBoxes.size());
[16] qlparser/qtclippingfunc.cc:1036 in QtClipping::computeOp(QtMDD*, QtGeometryData*)
     > 1036:         resultMDD.reset(extractLinestring(op, linestringData, opDim));
[17] qlparser/qtclippingfunc.cc:1284 in QtClipping::evaluate(std::vector<QtData*, std::allocator<QtData*> >*)
     > 1284:         returnValue = computeOp(qtMDDObj, geomData);
[18] qlparser/qtoperationiterator.cc:242 in QtOperationIterator::next()
     > 242:                     (*resultList)[pos] = op->evaluate(nextTuple.get());
[19] qlparser/querytree.cc:167 in QueryTree::evaluateRetrieval()
     > 167:             while ((dataList = oncRootNode->next()))


with INFO/DEBUG level logging:

Error: memory allocation failed.
rasdaman server exception: std::bad_array_new_length

Change History (2)

comment:1 by Dimitar Misev, 16 months ago

Description: modified (diff)
Milestone: 10.010.2
Owner: changed from Dimitar Misev to nivlev@…

comment:2 by Dimitar Misev, 16 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.