You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/07/19 01:18:00 UTC

[GitHub] [incubator-doris] morningman opened a new issue #1506: BE crash when closing OlapTableSink

morningman opened a new issue #1506: BE crash when closing OlapTableSink
URL: https://github.com/apache/incubator-doris/issues/1506
 
 
   **Describe the bug**
   ```
   Status OlapTableSink::close(RuntimeState* state, Status close_status) {
       SCOPED_TIMER(_profile->total_time_counter());
       Status status = close_status;
       if (status.ok()) {
           {
               SCOPED_TIMER(_close_timer);
               for (auto channel : _channels) {
                   status = channel->close(state);
                   if (!status.ok()) {
                       LOG(WARNING) << "close channel failed, load_id=" << _load_id
                           << ", txn_id=" << _txn_id;
                   }
               }
           }
           COUNTER_SET(_input_rows_counter, _number_input_rows);
           COUNTER_SET(_output_rows_counter, _number_output_rows);
           COUNTER_SET(_filtered_rows_counter, _number_filtered_rows);
           COUNTER_SET(_send_data_timer, _send_data_ns);
           COUNTER_SET(_convert_batch_timer, _convert_batch_ns);
           COUNTER_SET(_validate_data_timer, _validate_data_ns);
           COUNTER_SET(_wait_in_flight_packet_timer, _wait_in_flight_packet_ns);
           COUNTER_SET(_serialize_batch_timer, _serialize_batch_ns);
   
           state->update_num_rows_load_filtered(_number_filtered_rows);
       } else {
           for (auto channel : _channels) {
               channel->cancel();
           }
       }
       Expr::close(_output_expr_ctxs, state);
       _output_batch.reset();
       return status;
   }
   ```
   
   BE may crash when executing `SCOPED_TIMER(_profile->total_time_counter());`
   
   Because is the OlapTableSink is not prepared before calling close(), the `_profile` is not initialized, so it will access illegal memory.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org