bahamut icon indicating copy to clipboard operation
bahamut copied to clipboard

Long messages with multi-byte utf-8 characters are dropped and "crash the sendq"

Open progval opened this issue 4 years ago • 3 comments

Hi,

I was playing around with byte limits, and I noticed the following bug:

  1. nick1 sends: privmsg nick2 :aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (this is a 512 bytes message including \r\n)
  2. nick2 receives it, but truncated so it fits in 512 bytes after prepending the NUH. All good for now.
  3. nick1 sends: privmsg nick2 :aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa😃 (this is, again, 512 bytes including '\r\n`)
  4. nick2 does not receive it, not even truncated
  5. the server no longer sends anything to nick1: no reply to nick1 commands, or messages from user users. However, commands sent by nick1 are still interpreted (eg. nick1 can send messages to other users)

Tested on istana.il.us.dal.net, running version bahamut-2.1.6

progval avatar Aug 09 '21 20:08 progval

Thanks for submitting your first issue! A member of the DALnet coder team will label it appropriately and provide follow-up

github-actions[bot] avatar Aug 09 '21 20:08 github-actions[bot]

Thanks for reporting this. Do you happen to have the code so we can replicate it?

eaescob avatar Aug 12 '21 22:08 eaescob

You can copy-paste the messages above in a telnet session (mind the nick length though).

Alternatively, you can make sure ircd is findable with $PATH, clone this repository: https://github.com/ProgVal/irctest , cd to it, and run pytest --controller=irctest.controllers.bahamut -k 'buffering and charperchar' -s -v -x (that's how I initially found the issue), but it's not very convenient to use for this

progval avatar Aug 13 '21 06:08 progval