Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13608 )

Change subject: KUDU-2850: fix thrift comparison
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13608/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/13608/2//COMMIT_MSG@7
PS2, Line 7: KUDU-2850: fix thrift comparison
> I've read through the JIRA and while I think I understand the issue, I don'
I'll add details to the Jira in closing it out.

The symptom Hao saw when she tried to use her new Sentry API was that when she 
tried to use a map<TSentryAuthorizable, string>, she wasn't able to find() some 
results when iterating through the map showed their existence. In debugging, I 
also ran into a SEGFAULT while deserializing a response via the Sentry client:

#0  0x00007fffe81678ac in std::string::compare(std::string const&) const () 
from /lib64/libstdc++.so.6
#1  0x00000000004f71fe in std::operator< <char, std::char_traits<char>, 
std::allocator<char> > (__lhs=<error reading variable: Cannot access memory at 
address 0xffffffffffffffe8>, __rhs="server1")
    at /usr/include/c++/4.8.2/bits/basic_string.h:2571
#2  0x00007ffff54cf547 in sentry::TSentryAuthorizable::operator< 
(this=0x7fffffffcf88, other=...) at ../../src/kudu/sentry/thrift_operators.cc:63
#3  0x00007ffff7159479 in std::less<sentry::TSentryAuthorizable>::operator() 
(this=0x7fffffffcf60, __x=..., __y=...) at 
/usr/include/c++/4.8.2/bits/stl_function.h:235
#4  0x00007ffff5490aa0 in std::_Rb_tree<sentry::TSentryAuthorizable, 
std::pair<sentry::TSentryAuthorizable const, std::set<sentry::TSentryPrivilege, 
std::less<sentry::TSentryPrivilege>, std::allocator<sentry::TSentryPrivilege> > 
>, std::_Select1st<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > >, 
std::less<sentry::TSentryAuthorizable>, 
std::allocator<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > > >::_M_get_insert_hint_unique_pos 
(this=0x7fffffffcf60, __position=..., __k=...) at 
/usr/include/c++/4.8.2/bits/stl_tree.h:1433
#5  0x00007ffff548ad3c in std::_Rb_tree<sentry::TSentryAuthorizable, 
std::pair<sentry::TSentryAuthorizable const, std::set<sentry::TSentryPrivilege, 
std::less<sentry::TSentryPrivilege>, std::allocator<sentry::TSentryPrivilege> > 
>, std::_Select1st<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > >, 
std::less<sentry::TSentryAuthorizable>, 
std::allocator<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > > 
>::_M_emplace_hint_unique<std::piecewise_construct_t const&, 
std::tuple<sentry::TSentryAuthorizable const&>, std::tuple<> 
>(std::_Rb_tree_const_iterator<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > >, std::piecewise_construct_t 
const&, std::tuple<sentry::TSentryAuthorizable const&>&&, std::tuple<>&&) 
(this=0x7fffffffcf60, __pos=...)
    at /usr/include/c++/4.8.2/bits/stl_tree.h:1673
#6  0x00007ffff54876ea in std::map<sentry::TSentryAuthorizable, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> >, 
std::less<sentry::TSentryAuthorizable>, ---Type <return> to continue, or q 
<return> to quit---
std::allocator<std::pair<sentry::TSentryAuthorizable const, 
std::set<sentry::TSentryPrivilege, std::less<sentry::TSentryPrivilege>, 
std::allocator<sentry::TSentryPrivilege> > > > >::operator[] 
(this=0x7fffffffcf60,
    __k=...) at /usr/include/c++/4.8.2/bits/stl_map.h:465
#7  0x00007ffff5478166 in sentry::TListSentryPrivilegesByAuthUserResponse::read 
(this=0x7fffffffcf30, iprot=0x7fffd8000d78) at 
src/kudu/sentry/sentry_policy_service_types.cpp:6215
#8  0x00007ffff54a0f74 in 
sentry::SentryPolicyService_list_sentry_privileges_by_authorizable_and_user_presult::read
 (this=0x7fffe280b8a0, iprot=0x7fffd8000d78) at 
src/kudu/sentry/SentryPolicyService.cpp:3546
#9  0x00007ffff54ab7f9 in 
sentry::SentryPolicyServiceClient::recv_list_sentry_privileges_by_authorizable_and_user
 (this=0x80ae78, _return=...) at src/kudu/sentry/SentryPolicyService.cpp:5964
#10 0x00007ffff54ab3fc in 
sentry::SentryPolicyServiceClient::list_sentry_privileges_by_authorizable_and_user
 (this=0x80ae78, _return=..., request=...) at 
src/kudu/sentry/SentryPolicyService.cpp:5920
#11 0x00007ffff571faf6 in 
kudu::sentry::SentryClient::ListPrivilegesByAuthoriablesAndUser (this=0x80ae78, 
request=..., response=0x7fffffffcf30) at 
../../src/kudu/sentry/sentry_client.cc:183
#12 0x00007ffff7148db3 in 
kudu::master::SentryPrivilegesFetcher::__lambda5::operator() 
(__closure=0x181e6f0, client=0x80ae78) at 
../../src/kudu/master/sentry_privileges_fetcher.cc:1040



--
To view, visit http://gerrit.cloudera.org:8080/13608
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I071ccb08a385d6a4bfe407ab05621afe437bc29c
Gerrit-Change-Number: 13608
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 13 Jun 2019 17:29:09 +0000
Gerrit-HasComments: Yes

Reply via email to