#135 channel desynch caused by KICKs crossing

Server (143)

when two different types of kick (those that turn the victim into a zombie, and those that do not) cross, a desynch results.

imagine the following situation, 4 servers(A-D) with user aa on server A, and user dd on server D:


i base this example on how i came to find this issue. server D is a service, and user dd on that is a channel service.

user aa joins an empty channel, a CREATE goes from server A to server D
D reacts by sending back BURST with older TS, overruling the channel, and with channel mode +i
d then also sends a kick to remove user aa from this channel (not needed yes, but that's not relevant, it simply does.)
A receives the BURST, and sends net rider KICK removing user aa from the channel.

The kick by server A does not turn the victim into a zombie, the user is removed from the channel. The kick by service dd turns user aa into a zombie on every server it reaches, until it crosses with the kick from A.

let's say the two kicks cross between server B and C
B receives kick from A, and removes user aa from the channel
C receives kick from d, and turns user aa into a zombie
B then receives kick from dd, for user aa which is not on the channel anymore and ignores the kick. all fine.
C then receives the kick from A for user aa, C sees aa already as zombie and only passes on the kick.

the picture at this point, user aa is a zombie on server C and everything behind it. user aa is not present on the channel on server A and B, the zombie status for user aa is never cleared, as an acknowledgment part will never be sent by A. this desynch is only resolved when the user quits or servers split.

under certain circumstances it can lead to protocol violations (CREATE from already joined user) after a server links. continuing the example, server E links to server C. zombie status isnt shared in burst, user aa is simply a regular user for E. service dd considers the channel to be empty and parts (saving resources etc.). server C now only has a zombie on the channel and destroys it, server A and B had only dd on the channel, and destroy the channel, server E has user aa left as regular and keeps it. user aa finds the channel has ceased to exist again, and tries his luck again and joins. a CREATE from user aa travels over the net, reaching E, causing protocol violation (CREATE from already joined user) as E had user aa still on the channel.

It seems to me that when a kick is received, and the kick is of such nature that it does not change the victim into a zombie, but is removed straight away, this should still be done in case the victim already is a zombie, as an acknowledgment part will never be received. I have not tested it with other kinds of kicks that remove the victim straight away (user kicking himself, or kick already passed the victim's server, etc.) but i imagine the same problems may occur there.

tested on latest from cvs - u2.10.13.alpha.0.


  • Entrope

    Entrope - 2008-11-18

    This should be fixed on u2_10_12_branch by r1893. This (and any other relevant patches) will eventually be pulled up to trunk; I'm leaving this report open until that happens.

  • wiebe

    wiebe - 2009-01-03

    I have tested the fix (http://undernet-ircu.svn.sourceforge.net/viewvc/undernet-ircu/ircu2/branches/u2_10_12_branch/ircd/m_kick.c?r1=1550&r2=1893) and indeed it does fix the situation i explained above (net rider kick for zombie).

    However it does not fix the wider underlying problem, namely receiving a 'non-zombie turning' kick for a zombie member. I made a zombie user and then send a kick from his server (net rider kick), all fine. Then made a new zombie and send a kick from a channel op on the same server, and there it failed.

    The most logical thing to do seems to call make_zombie, since that function deals with determining whether or not the victim should be made a zombie or removed straight away. The tests i have done with that all worked fine.

  • Entrope

    Entrope - 2009-03-19
    • milestone: 525816 --> u2.10.12
    • assigned_to: nobody --> entrope
  • Entrope

    Entrope - 2009-03-19

    I do not follow the description of the other problem case. Could you elaborate with labels for the kicker(s), kick victim, and servers that each are on?

  • wiebe

    wiebe - 2009-07-20

    Sorry, lately i have had very little interest in IRC in general.

    In the original example, any kick that doesnt make the victim a zombie coming from A for user aa (e.g. a netrider kick by A, or a kick by another user on A, or a kick by another user/server behind server A) crossing with the zombie turning kick by dd on D results in the desynch.

    Calling make_zombie on a zombie member may seem weird, but the function name is a bit misleading, it either turns the member into a zombie or removes them.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks