XSF Discussion - 2020-12-01


  1. jonas’

    dwd, spreadsheet of doom?

  2. dwd

    jonas’, https://docs.google.com/spreadsheets/d/1-IBY4NhXbdZ_TqCCZkXrMgqq63yytaxXqJKhh47J1vI/edit?usp=sharing - but poke it about to see if I've cleared the old data off it correctly first. I think I have, but ENOQA.

  3. jonas’

    dwd, I need your approval for +w, I sent a request

  4. jonas’

    mathieui> whoops I forgot to look at pending PRs before submitting my MIX patches, but it looks like there’s no overlap at least with which of the current PRs do you see a conflict?

  5. mathieui

    jonas’, no conflict, but I saw a few MIX-related ones after looking

  6. jonas’

    dwd, nevermind, I forked it

  7. jonas’

    mathieui, which ones?

  8. dwd

    jonas’, Oh, sorry, didn't think of that.

  9. mathieui

    jonas’, only #856 actually

  10. jonas’

    right, that one’s not gonna happen soon anyway

  11. mathieui

    yup

  12. mathieui

    there are deeper changes in other ones that I didn’t want to get into, e.g. reusing 0424 in 0407 section 4 instead of providing an ad-hoc mechanism+namespace

  13. jonas’

    Ge0rG, can you obtain approval by the author of '401 for: https://gitlab.com/xsf/xeps/-/merge_requests/33

  14. jonas’

    cc @ marc

  15. marc

    jonas’: okay for me if that's the MR Ge0rG was talking about last time

  16. jonas’

    marc, please check if it really is that PR :)

  17. marc

    jonas’: yep, later. I'm on mobile atm

  18. jonas’

    marc, thank you

  19. Ge0rG

    it's the one splitting out IBR with token from 0401. I'm not so sure any more about the title, maybe I overdid it a bit

  20. Zash

    Re https://github.com/xsf/xeps/pull/1008 Does anyone actually enforce or even handle that?

  21. SamWhited

    I do in my implementation (just by virtue of using a uint16 which in Go wraps around if you overflow it)

  22. SamWhited

    I can't imagine it's likely to be something that's hit often (or ever) though.

  23. Zash

    Yeah, it goes into "don't use IBB for files that large" territory

  24. Zash

    Given a maximum block size of 65535 that's 4 GB. So, plz don't.

  25. SamWhited

    I did look around and found several other implementations that explicitly handled it (Smack is the only one I remember looking at now though, but I think there were some of the python ones too). They used uint16

  26. Zash

    I just looked at two and saw no trace of any overflow handling

  27. Zash

    this one seems to do stuff tho

  28. moparisthebest

    https://i.imgflip.com/4oiu0k.jpg

  29. SamWhited

    yah, maybe it wasn't Smack, I don't see it now

  30. mathieui

    it is wrapped around in slixmpp afaik

  31. SamWhited

    ah no, here it is: https://github.com/igniterealtime/Smack/blob/master/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java#L759

  32. Zash

    Is that off-by-one?

  33. SamWhited

    And here it is for aioxmpp: https://github.com/horazont/aioxmpp/blob/devel/aioxmpp/ibb/service.py#L195-L196

  34. SamWhited

    Yah, that looks off by 1 to me

  35. Zash

    Haven't found anything in nbxmpp and Swiften tho

  36. Zash

    Nobody so far seems to have accidentally read it as a the positive subset of a signed integer, which I think is a thing somewhere else.

  37. flow

    Zash, good catch

  38. Zash

    np

  39. SamWhited

    Yah, good eye; this is why I never use weird ternary constructs, I would never have noticed it in that mess of symbols and what not

  40. flow

    I've just looked at the origin of this: it was introduced by henning in 2010

  41. flow

    so it's a 10 year old bug you discovered \o/

  42. Zash

    :D

  43. SamWhited

    Nice, Zash gets all the points

  44. flow

    of course i wonder if this ever caused an troubles :) but that doesn't mean that this shouldn't get fixed

  45. SamWhited

    Heh, yah, I doubt it

  46. mathieui

    Zash, oh, slixmpp is also off by one as well I guess

  47. SamWhited

    FWIW, java does integer wraparound too IIRC, so that could probably just be an "unsigned short" or whatever it would be called in java land

  48. SamWhited

    Nice; multiple off by ones fixed today! As they say, the three hard problems in computer science are naming things and off by one errors

  49. mathieui

    tricked by a modulo

  50. moparisthebest

    SamWhited, java doesn't have unsigned anything

  51. SamWhited

    oh, nevermind then. Been a while since I did any Java

  52. Zash

    SamWhited: nice chain of events you set in motion here :)

  53. SamWhited

    Yah that worked out nicely; I thought it was just going to clarify a typo fix, good teamwork turning it into bugfixes

  54. mathieui

    I just hope nobody ran into that, as it would reject stanzas with the 65535 sequence number

  55. flow

    SamWhited, the problem is that there is no uint16_t in java land

  56. SamWhited

    I can't imagine anyone actually sends multi-gig files (assuming a reasonable blocksize) and doesn't get bored and cancel or have some other hickup

  57. SamWhited

    But who knows

  58. mathieui

    The best file transport!

  59. SamWhited

    I'm sure one crazy person somewhere has done it

  60. mathieui

    Doing 4k livestreams over IBB

  61. Zash

    Absolute madlad

  62. SamWhited

    Tangentially related: has anyone ever experimented with different blocksizes to see what a good default is? I just kind of guessed that ~2k was probably a good default, but I really have no idea

  63. Zash

    For IBB? 🤷

  64. moparisthebest

    somewhat related to stanza size limits I reckon

  65. Zash

    I imagine there's some sweet spot wrt filesystem block sizes, tcp/ip/ethernet packet sizes etc

  66. SamWhited

    I assumed ethernet MUT would be smaller than TCP and would be too small to actually fit a stanza in (without drastically increasing the overhead just from the XML), but maybe wifi would be a better thing to lookup

  67. SamWhited

    MTU, even

  68. Zash

    4k block gets you a ~5.5k message stanza, that's about half of the 10k minimum stanza size limit. should be safe, even with longer jids.

  69. Zash

    a JID can be up to 3k in theory...

  70. SamWhited

    That sounds good to me, maybe I'll up mine which I think was at 2k

  71. moparisthebest

    that would be a case of "some people get what they deserve" (re: 3k JIDs)

  72. Zash

    dns limits you to 255 or something for the hostpart, so more like 1023@255/1023

  73. SamWhited

    Could be a hostname though

  74. SamWhited

    No idea if there are limits there

  75. Zash

    A message stanza with 2x 1023@255/1023, 2x UUID and 4k IBB block turns into 12.5k

  76. Zash

    heh, with 2k block it looks like 9.8k

  77. Zash

    so if you're absolutely want to stay clear of the strictest stanza size limits then 2k blocks would do.

  78. SamWhited

    meh, if you have a 3k JID you can manually set the block size, that's definitely not a thing I'm interested in optimizing for

  79. Zash

    Would be cool to have real network troughput stats ;)

  80. marc

    jonas’, +1 for the PR from Ge0rG

  81. jonas’

    marc: thabks

  82. jonas’

    marc: thanks

  83. jonas’

    Path-MTU!

  84. Zash

    Mmmmmmm. I've observed MUC participants in loops where they request the vcard of someone, then get their connection closed because the avatar was larger than the stanza size limit

  85. Zash

    Much fun.

  86. moparisthebest

    big avatar crashes MUC's you say ? >:)

  87. jonas’

    khekhekhe

  88. jonas’

    fun fact: you cannot kick MUCs off the s.j.n list that way (except the one with the evil avatar) because s.j.n shuffles the list of MUCs during each scan :)

  89. jonas’

    (even if it caused a longer outage of the s2s connection or killed the c2s connection in a bad way or somesuch)

  90. Zash

    Was there some point in advertising stanza size limits in stream-features or somesuch?

  91. SamWhited

    That would be really nice; at the very least it would let clients show a rough max-message-size while you're typing.

  92. dwd

    FWIW, I assumed that stanza sizes were reasonable huge these days. Like 64k would be an absolute minimum. Didn't we say 10M in RFC 6120?

  93. Kev

    10k

  94. Zash

    10k

  95. Zash

    Prosody ships with a default of 10M by default, ejabberd with 256k for c2s and 512k for s2s IIRC

  96. Zash

    Dunno about others

  97. Zash

    Eh, default defaults ftw

  98. Guus

    I think Openfire does 2M.

  99. Ge0rG

    So we need Path MTU Discovery! Will s2s be terminated on oversized stanzas? Is there an error sent to the originating node?

  100. dwd

    With bandwidth and RAM sizes these days, I'd think IBB at 10k blocksizes would be fine. That'll yield a 1ms choke on a 80Mbit link, so you could probably increase that by a factor of ten without worrying.

  101. Zash

    Ge0rG: yes. maybe, but probably no.

  102. Zash

    Push harder for s2s-198

  103. Ge0rG

    dwd: not on german mobile "broadband"

  104. Ge0rG

    Zash: won't help on stream errors

  105. Zash

    Why?

  106. dwd

    Ge0rG, So you don't want to much a PMTU discovery, you actually want a IBB blocksize negotiation.

  107. Zash

    You want PMTU discovery for vcards/avatars!

  108. SamWhited

    I think my implementation for blocksize "negotiation" was to just request the default, then cut it in half until they accept the transfer or it gets under some small minimum where we deam the XML encoding overhead is too high to justify bothering

  109. dwd

    Zash, But if you're on a slow link, do you even want the jumbo-avatar?

  110. Zash

    Why you want the multiple-choice 0084 allows

  111. Ge0rG

    dwd: how would you do that for the involved servers?

  112. dwd

    Ge0rG, Hmmm, yes. But you probably want a path characteristics request, plus a stream feature for stanza limits. We talked of a path characteristic command for TLS a while back; one for stanza limits and 198 might be more useful.

  113. Ge0rG

    dwd: all of the above, and a way to discover each hop on the way