Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-657

Debug assertion when service is shut down and restarted repeatedly

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 2.1.0
    • Component/s: Core
    • Labels:
      None
    • Sprint:
      2016-11

      Description

      When a service is shut down, it is removed from the polling system and set into a different state. On line 959 in poll.c the check whether the accept or read entry points is done is based on the state of the listener. When a service is shut down, the state of the listener is modified before the listener is removed from the poll queue.

           /*<
           * Set state to NOPOLLING and remove dcb from poll set.
           */
          dcb->state = DCB_STATE_NOPOLLING;
       
          /**
           * Only positive fds can be removed from epoll set.
           * Cloned DCBs can have a state of DCB_STATE_POLLING but are not in
           * the epoll set and do not have a valid file descriptor.  Hence the
           * only action for them is already done - the change of state to
           * DCB_STATE_NOPOLLING.
           */
          dcbfd = dcb->fd;
          spinlock_release(&dcb->dcb_initlock);
          if (dcbfd > 0)
          {
              rc = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, dcbfd, &ev);
      

      This causes the listener DCB's read entry point to be called and the debug check for the protocol is the first to fail.

        Attachments

          Activity

            People

            • Assignee:
              markus makela markus makela
              Reporter:
              markus makela markus makela
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: