• Alex Elder's avatar
    libceph: WARN, don't BUG on unexpected connection states · 122070a2
    Alex Elder authored
    A number of assertions in the ceph messenger are implemented with
    BUG_ON(), killing the system if connection's state doesn't match
    what's expected.  At this point our state model is (evidently) not
    well understood enough for these assertions to trigger a BUG().
    Convert all BUG_ON(con->state...) calls to be WARN_ON(con->state...)
    so we learn about these issues without killing the machine.
    
    We now recognize that a connection fault can occur due to a socket
    closure at any time, regardless of the state of the connection.  So
    there is really nothing we can assert about the state of the
    connection at that point so eliminate that assertion.
    Reported-by: default avatarUgis <ugis22@gmail.com>
    Tested-by: default avatarUgis <ugis22@gmail.com>
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    122070a2
messenger.c 70.7 KB