Opened 4 years ago

Closed 4 years ago

#2332 closed defect (fixed)

rasql - segfault if width is 0 in project()

Reported by: Bang Pham Huu Owned by: ocampos
Priority: major Milestone: 10.0
Component: rasserver Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu, Peter Baumann
Complexity: Easy

Description (last modified by Bang Pham Huu)

Import the test coverage by wcst_import from the attached file and run this query:

 rasql -q 'SELECT ENCODE( project(c0[0:247,0:380],
"804850.0,5809400.0,807330.0,5813210.0", "EPSG:32632",
"13.4912109375,52.36083984375,13.502197265625,52.371826171875",
"EPSG:4326", 0, 0, near, 0.125) , "png") FROM
utm32_4_utms_10m_part4_cropped AS c0' --out file

the error

Interrupted by signal SIGSEGV (Invalid memory access at address 0)...
stacktrace:
 [1] ??:? in QtProject::reprojectTile(Tile*, int,
r_Primitive_Type*)+0x821 [0x141d951]
 [2] ??:? in QtProject::evaluateMDD(QtMDD*)+0x3f1 [0x1421501]
 [3] ??:? in QtProject::compute(std::vector<QtData*,
std::allocator<QtData*> >*)+0x39 [0x1421ca9]
 [4] ??:? in QtOperation::evaluateWithCache(std::vector<QtData*,
std::allocator<QtData*> >*)+0x17b [0x1434fdb]
 [5] ??:? in QtOperation::evaluate(std::vector<QtData*,
std::allocator<QtData*> >*)+0x18f [0x142db1f]
 [6] ??:? in QtConversion::compute(std::vector<QtData*,
std::allocator<QtData*> >*)+0x163 [0x1462003]
 [7] ??:? in QtOperation::evaluateWithCache(std::vector<QtData*,
std::allocator<QtData*> >*)+0x17b [0x1434fdb]
 [8] ??:? in QtOperation::evaluate(std::vector<QtData*,
std::allocator<QtData*> >*)+0x18f [0x142db1f]
 [9] ??:? in QtOperationIterator::next()+0x187 [0x142f207]
[10] ??:? in QueryTree::evaluateRetrieval()+0x335 [0x1415ed5]
[11] ??:? in ServerComm::executeQuery(unsigned long, char const*,
ExecuteQueryRes&, bool, bool)+0x1108 [0x13f4558]
[12] ??:? in RasServerEntry::compat_executeQueryRpc(char const*,
ExecuteQueryRes&, bool, bool)+0x1b [0x13c299b]
[13] ??:? in RasnetServerComm::ExecuteQuery(grpc::ServerContext*,
rasnet::service::ExecuteQueryReq const*,
rasnet::service::ExecuteQueryRepl*)+0x6d [0x17f75ad]
[14] ??:? in std::_Function_handler<grpc::Status
(rasnet::service::ClientRassrvrService::Service*, grpc::ServerContext*,
rasnet::service::ExecuteQueryReq const*,
rasnet::service::ExecuteQueryRepl*), std::_Mem_fn<grpc::Status
(rasnet::service::ClientRassrvrService::Service::*)(grpc::ServerContext*,
rasnet::service::ExecuteQueryReq const*,
rasnet::service::ExecuteQueryRepl*)> >::_M_invoke(std::_Any_data const&,
rasnet::service::ClientRassrvrService::Service*, grpc::ServerContext*,
rasnet::service::ExecuteQueryReq const*,
rasnet::service::ExecuteQueryRepl*)+0x36 [0x1705e76]
[15] ??:? in grpc::Status
grpc::internal::CatchingFunctionHandler<grpc::internal::RpcMethodHandler<rasnet::service::ClientRassrvrService::Service,
rasnet::service::ExecuteQueryReq,
rasnet::service::ExecuteQueryRepl>::RunHandler(grpc::internal::MethodHandler::HandlerParameter
const&)::{lambda()#1}>(grpc::internal::RpcMethodHandler<rasnet::service::ClientRassrvrService::Service,
rasnet::service::ExecuteQueryReq,
rasnet::service::ExecuteQueryRepl>::RunHandler(grpc::internal::MethodHandler::HandlerParameter
const&)::{lambda()#1}&&)+0x34 [0x171d534]
[16] ??:? in
grpc::internal::RpcMethodHandler<rasnet::service::ClientRassrvrService::Service,
rasnet::service::ExecuteQueryReq,
rasnet::service::ExecuteQueryRepl>::RunHandler(grpc::internal::MethodHandler::HandlerParameter
const&)+0x4d1 [0x17280b1]
[17] ??:? in grpc::Server::SyncRequestThreadManager::DoWork(void*,
bool)+0x16e [0x26671ee]
[18] ??:? in grpc::ThreadManager::MainWorkLoop()+0x11b [0x266965b]
[19] ??:? in grpc::ThreadManager::WorkerThread::Run()+0xc [0x266976c]
[20] /lib64/libstdc++.so.6(+0xb5070) [0x7f0debcbd070]
[21] /lib64/libpthread.so.0(+0x7dd5) [0x7f0df0648dd5]
[22] ??:0 in clone+0x6d [0x7f0dea2f602d]

[ERROR] - 2020-07-13 09:29:35,514, Shutting down... rasserver terminated.

The problem was due to width/height are set to 0 by the rasql query with project() document:

0, 0, near, 0.125

It should show this error instead of segfault

 Reason: Projection output must have width > 0.

Attachments (1)

10m.zip (526.3 KB ) - added by Bang Pham Huu 4 years ago.

Download all attachments as: .zip

Change History (3)

by Bang Pham Huu, 4 years ago

Attachment: 10m.zip added

comment:1 by Bang Pham Huu, 4 years ago

Cc: Dimitar Misev Vlad Merticariu Peter Baumann added
Complexity: MediumEasy
Component: undecidedrasserver
Description: modified (diff)
Owner: set to ocampos
Status: newassigned

comment:2 by ocampos, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.