[MXS-657] Debug assertion when service is shut down and restarted repeatedly Created: 2016-04-02  Updated: 2017-02-07  Resolved: 2017-02-07

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.4.1
Fix Version/s: 2.1.0

Type: Bug Priority: Minor
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
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.



 Comments   
Comment by markus makela [ 2016-06-01 ]

Downgrading to major as the problem is not critical. The crash is not reproducible with changes to the maxadmin client.

Comment by Timofey Turenko [ 2016-06-14 ]

I added test 'mxs657_restart", but unable to reproduce. Probably to reproduce it it is necessary to execute restart commands much more faster, but as soon as we need to use ssh to run maxadmin for test aplication it is not really possible now

Comment by Johan Wikman [ 2017-02-07 ]

Cannot be reproduced anymore.

Generated at Thu Feb 08 04:00:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.