Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5750

Handle uncaught exceptions in thread creation

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 2.9.0
    • Impala 2.11.0
    • Backend

    Description

      Impalad uses noexcept API of boost library whenever possible. However, there are certain API which don't implement the noexcept variant. One example of this is the thread creation interface:

      void Thread::StartThread(const ThreadFunctor& functor) {
        DCHECK(thread_manager.get() != nullptr)
            << "Thread created before InitThreading called";
        DCHECK(tid_ == UNINITIALISED_THREAD_ID) << "StartThread called twice";
      
        Promise<int64_t> thread_started;
        thread_.reset(
            new thread(&Thread::SuperviseThread, name_, category_, functor, &thread_started));
      
        // TODO: This slows down thread creation although not enormously. To make this faster,
        // consider delaying thread_started.Get() until the first call to tid(), but bear in
        // mind that some coordination is required between SuperviseThread() and this to make
        // sure that the thread is still available to have its tid set.
        tid_ = thread_started.Get();
      
        VLOG(2) << "Started thread " << tid_ << " - " << category_ << ":" << name_;
      }
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            joemcdonnell Joe McDonnell
            srus@cloudera.com Silvius Rus
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment