[ 
https://issues.apache.org/jira/browse/MESOS-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14590734#comment-14590734
 ] 

Till Toenshoff commented on MESOS-2464:
---------------------------------------

IMHO https://reviews.apache.org/r/31838/ still is a valid patch as it in any 
case demonstrates a defensive pattern in not assuming that an optional 
proto-member was always present. 

However, for making sure that the slave's executors wont get shutdown on 
authentication failures, it makes total sense to update the _authenticate 
continuation to not send a shutdown message but instead simply EXIT -- thus 
also not triggering the bug described (but fixed by the suggested RR).


> Authentication failure may lead to slave crash
> ----------------------------------------------
>
>                 Key: MESOS-2464
>                 URL: https://issues.apache.org/jira/browse/MESOS-2464
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Till Toenshoff
>            Assignee: Till Toenshoff
>             Fix For: 0.23.0
>
>
> When slave authentication fails, the following attempt to transmit a 
> {{UnregisterSlaveMessage}} may cause a crash within the slave.
> {noformat}
> E0309 01:08:34.819758 336699392 slave.cpp:740] Master 
> [email protected]:5050 refused authentication
> I0309 01:08:34.819787 336699392 slave.cpp:538] Master refused authentication; 
> unregistering and shutting down
> [libprotobuf FATAL google/protobuf/message_lite.cc:273] CHECK failed: 
> IsInitialized(): Can't serialize message of type 
> "mesos.internal.UnregisterSlaveMessage" because it is missing required 
> fields: slave_id.value
> libprocess: slave(1)@192.168.178.20:5051 terminating due to CHECK failed: 
> IsInitialized(): Can't serialize message of type 
> "mesos.internal.UnregisterSlaveMessage" because it is missing required 
> fields: slave_id.value
> {noformat}
> The problem here is the following code:
> {noformat}
>       UnregisterSlaveMessage message_;
>       message_.mutable_slave_id()->MergeFrom(info.id());
> {noformat}
> Authentication happens before registration. {{info.id}} is an optional member 
> (of {{SlaveInfo}}) and not known yet. It is set later, while registering. So 
> {{slave_id}} will remain unset.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to