Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session ID exhaustion doesn't appear to produce an actionable error message #498

Closed
io7m opened this issue Apr 6, 2018 · 1 comment
Closed

Comments

@io7m
Copy link
Contributor

io7m commented Apr 6, 2018

I'm experimenting with the new reserved session ID feature. Just to see what would happen, I configured the media driver thusly:

final MediaDriver.Context media_context =
  new MediaDriver.Context()
        .publicationReservedSessionIdLow(Integer.MIN_VALUE)
        .publicationReservedSessionIdHigh(Integer.MAX_VALUE);

I then created a publication and had a client in another process subscribe to it. This happened (running with the debug agent set to all):

[331279.748877] CMD_IN_ADD_PUBLICATION [91/91]: aeron:udp?control=127.0.0.1:9001|control-mode=dynamic|reliable=true 541388802 [0:1]
[331279.766338] SEND_CHANNEL_CREATION [91/91]: UdpChannel - localData: /127.0.0.1:9001, remoteData: /0.0.0.0:0, ttl: 0
[331279.840501] CMD_OUT_PUBLICATION_READY [125/125]: -2147483648:541388802 27 24 [1 1]
    /tmp/aeron-server/publications/UDP-7f000001-9001-00000000-0-80000000-2044f002-1.logbuffer
[331279.854090] CMD_IN_ADD_SUBSCRIPTION [79/79]: aeron:udp?endpoint=127.0.0.1:9000|reliable=true 541388802 [-1][0:2]
[331279.870869] RECEIVE_CHANNEL_CREATION [98/98]: UdpChannel - localData: 0.0.0.0/0.0.0.0:0, remoteData: /127.0.0.1:9000, ttl: 0
[331279.872353] CMD_OUT_SUBSCRIPTION_READY [12/12]: 2 28
[331280.240342] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331280.740206] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331281.255799] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331281.772447] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331282.287731] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331282.802680] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331283.318946] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331283.818455] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331284.218097] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331284.270565] FRAME_OUT [40/40]: 127.0.0.1.51674 SETUP 0x0 len 40 -2147483648:541388802:1355349900 1355349900 @0 16777216 MTU 1408 TTL 0
[331284.323028] CMD_IN_KEEPALIVE_CLIENT [16/16]: [0:0]
[331284.332531] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331284.371222] FRAME_OUT [40/40]: 127.0.0.1.51674 SETUP 0x0 len 40 -2147483648:541388802:1355349900 1355349900 @0 16777216 MTU 1408 TTL 0
[331284.405237] FRAME_IN [40/40]: 127.0.0.1.56277 SETUP 0x0 len 40 808567384:541388802:-939498290 -939498290 @0 16777216 MTU 1408 TTL 0
[331284.447901] FRAME_IN [40/40]: 127.0.0.1.56277 SETUP 0x0 len 40 808567384:541388802:-939498290 -939498290 @0 16777216 MTU 1408 TTL 0
[331284.478136] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331284.480953] CMD_OUT_AVAILABLE_IMAGE [134/134]: 808567384:541388802 [29:2] "127.0.0.1:56277" [3]
    /tmp/aeron-server/images/UDP-00000000-0-7f000001-9000-3031c258-2044f002-3.logbuffer
[331284.481526] FRAME_OUT [36/36]: 127.0.0.1.56277 SM 0x0 len 36 808567384:541388802:-939498290 @0 131072 7250697240715520586
[331284.484969] FRAME_OUT [32/32]: 127.0.0.1.51674 DATA 0xc0 len 0 -2147483648:541388802:1355349900 @0
[331284.497345] FRAME_IN [64/64]: 127.0.0.1.56277 DATA 0xc0 len 37 808567384:541388802:-939498290 @0
11:34:33.492 [com.io7m.aeron_guide.take2.server[16]] DEBUG com.io7m.aeron_guide.take2.EchoServer - [3031C258] initial client connected (127.0.0.1:56277)
11:34:33.545 [com.io7m.aeron_guide.take2.server[16]] DEBUG com.io7m.aeron_guide.take2.EchoServer - [3031C258] received: HELLO
[331284.549136] FRAME_IN [40/40]: 127.0.0.1.56277 SETUP 0x0 len 40 808567384:541388802:-939498290 -939498290 @40 16777216 MTU 1408 TTL 0
[331284.561752] CMD_IN_ADD_PUBLICATION [91/91]: aeron:udp?control=127.0.0.1:9011|control-mode=dynamic|reliable=true 541388802 [0:4]
[331284.562089] SEND_CHANNEL_CREATION [91/91]: UdpChannel - localData: /127.0.0.1:9011, remoteData: /0.0.0.0:0, ttl: 0
[331284.649784] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331284.680198] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331284.749352] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331284.852225] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331284.878917] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331284.951186] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.051842] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.082472] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331285.152766] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.217573] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331285.217646] FRAME_OUT [40/40]: 127.0.0.1.51674 SETUP 0x0 len 40 -2147483648:541388802:1355349900 1355349900 @0 16777216 MTU 1408 TTL 0
[331285.252612] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.282817] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331285.354448] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.455489] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.482218] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331285.555993] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.656618] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.682939] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331285.757201] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.859041] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331285.882749] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331285.958443] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.058654] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.084201] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331286.158905] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.218376] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331286.259851] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.284941] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331286.360610] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.460148] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.485268] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331286.560936] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.662884] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.686278] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331286.761265] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.863934] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331286.886413] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331286.964367] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.063579] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.086648] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331287.165562] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.218254] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331287.265703] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.286804] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331287.366819] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.466814] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.486952] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331287.569463] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.668764] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.687205] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331287.768915] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.869174] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331287.888213] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331287.970740] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.071401] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.089405] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331288.172838] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.218742] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331288.272603] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.289732] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331288.373956] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.473986] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.489872] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331288.574269] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.675794] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.691042] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331288.776314] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.876548] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331288.892648] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331288.976577] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.079192] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.093626] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331289.179343] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.218793] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331289.279807] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.293972] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331289.379654] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.481219] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.494128] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331289.582136] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.682625] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.693520] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331289.782957] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.883377] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331289.895165] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331289.984796] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.085016] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.095963] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331290.184037] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.219998] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331290.284252] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.296734] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331290.384712] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.486127] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.498211] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331290.586966] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.687325] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.698458] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331290.787856] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.888019] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331290.898615] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331290.988550] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.088978] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.098816] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331291.190429] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.220838] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331291.291694] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.300113] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331291.391260] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.491416] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.501279] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331291.592932] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.694370] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.700743] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331291.794245] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.894341] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331291.901930] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331291.994743] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.095274] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.101269] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331292.196039] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.220341] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331292.296270] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.301771] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331292.396483] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.496796] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.502562] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331292.597154] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.698581] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.702988] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331292.798760] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.900018] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331292.904341] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331292.999208] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.100580] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.113417] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331293.200272] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.221162] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x80 len 36 0:0:0 @0 0 -6064918378600183558
[331293.301830] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.306101] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331293.402768] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.502097] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.505872] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331293.601611] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.703995] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.705466] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
[331293.803479] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.904811] FRAME_IN [32/32]: 127.0.0.1.56277 DATA 0xc0 len 0 808567384:541388802:-939498290 @40
[331293.905849] FRAME_IN [36/36]: 127.0.0.1.51674 SM 0x0 len 36 -2147483648:541388802:1355349900 @0 131072 -6064918378600183558
io.aeron.exceptions.DriverTimeoutException: MediaDriver keepalive older than (ms): 10000
	at io.aeron.ClientConductor.checkLiveness(ClientConductor.java:757)
	at io.aeron.ClientConductor.onCheckTimeouts(ClientConductor.java:723)
	at io.aeron.ClientConductor.service(ClientConductor.java:659)
	at io.aeron.ClientConductor.awaitResponse(ClientConductor.java:696)
	at io.aeron.ClientConductor.addPublication(ClientConductor.java:371)
	at io.aeron.Aeron.addPublication(Aeron.java:254)
	at com.io7m.aeron_guide.take2.EchoServerDuologue.create(EchoServerDuologue.java:119)
	at com.io7m.aeron_guide.take2.EchoServer$ClientState.allocateNewDuologue(EchoServer.java:428)
	at com.io7m.aeron_guide.take2.EchoServer$ClientState.onInitialClientMessageProcess(EchoServer.java:397)
	at com.io7m.aeron_guide.take2.EchoServer.lambda$onInitialClientMessage$2(EchoServer.java:257)
	at com.io7m.aeron_guide.take2.EchoServerExecutor.lambda$submit$0(EchoServerExecutor.java:37)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

***
*** Timeout from the MediaDriver - is it currently running? Exiting.
***

Process finished with exit code 255

I feel like the code in the driver conductor goes into an infinite loop as it never finds a usable session ID:

https://github.com/real-logic/aeron/blob/master/aeron-driver/src/main/java/io/aeron/driver/DriverConductor.java#L1356

To be clear, I'm not filing this issue as a "bug that I want fixed". Just wanted to note that session ID exhaustion won't give a helpful error message of any description. I suspect this was extremely unlikely to occur before it was possible to reserve ranges of session IDs to be explicitly assigned, but is perhaps more likely to occur in practice now that people can do that.

mjpt777 added a commit that referenced this issue Apr 6, 2018
…ficient space for dynamic allocations. Issue #498.
@io7m
Copy link
Contributor Author

io7m commented Apr 6, 2018

Hypothetical (but, I think, possibly realistic) situation where this can be a problem:

Clients subscribe to an introduction publication. A client at address a subscribes and the publication says "New client at a: Connect to my port p using session ID s" (encrypted in some fashion so that other subscribers can't read that message). The intention is that port p is freshly allocated, holds a publication (or subscription) specific to that client, and clients other than that single intended client aren't supposed to be able to talk to it. The server works from the assumption that a malicious client won't know a or s and will therefore have a hard time if it wants to spoof packets appearing to come from the permitted client.

To implement this, the server carves off a large region of the session ID address space (let's say 24 bits of the address space) that it'll use to pick random session IDs. The space needs to be reasonably large so that a malicious client can't just try every possible value for s in a short amount of time. This leaves only 2 ^ 8 session IDs available for that introduction publication. Knowing that the introduction publication only has 2 ^ 8 usable session IDs, a malicious client can open 2 ^ 8 subscriptions to the introduction publication and this will effectively DOS the server (because the media server will go into an infinite loop and Aeron will get a timeout talking to it).

A workaround for this would be to implement IP filtering on a per-publication basis. Ideally it'd be possible to declaratively add requirements to pubs/subs such as "This publication may only have at most four subscribers from a single IP address" or "This subscription may only have at most one image". I'm looking into implementing this right now.

mjpt777 added a commit that referenced this issue Apr 9, 2018
@mjpt777 mjpt777 closed this as completed May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants