Multi-player local server room matching, the arcade PVP often fails for no apparent reason
Description
Local host, multiplayer matchmaking, the room disappears for no reason, then returns to the lobby for rematch. There are bugs everywhere, please fix it.
Example Match ID (and possibly Timestamp)
No response
Screenshots
No response
please fix it.
This message was generated by AI. Verify the information independently and trust/use it at your own risk.
Update: the workaround is incomplete — multiplayer launch still unverified
The first version only covered UI (0). A real-player launch then showed the same automatic exit in READYUP (4) and NOTREADY (5). After extending those checks, the next attempt got through Accept but exited in SERVERSETUP (1) with game_state=7; the attached guard recorded that exact call being allowed through.
The script below now covers all enumerated pre-game lobby states: UI (0), SERVERSETUP (1), READYUP (4), NOTREADY (5), and SERVERASSIGN (6). The account, host, 12v12, LAN, practice-lobby, and game_state=7 checks remain. This revision passed three local predicate tests and replay checks against the recorded failing events, and installation on the current native client was confirmed. Those checks are not an end-to-end multiplayer test. We have not confirmed a full match reaching hero selection with other players after this latest extension.
Remaining gaps
RUN (2)andPOSTGAME (3)are deliberately not suppressed. If the lobby enters RUN before the client finishes loading, the same automatic exit may still occur under the remaining conditions.- A separate game-session shutdown path also calls
AbandonCurrentGame. It is not patched; normal termination must not be disabled globally. - Custom-game version/CRC validation has a separate
PracticeLobbyLeave (7040)path. This guard does not repair mismatched files. - The patch affects only the local host. Other players' clients may independently leave.
- No automatic reapplication after restarting Dota, no compatibility guarantee after updates, and no verified anti-cheat compatibility.
The root cause of the unexpected GC lobby state is still unknown. Treat this as a debugging experiment and partial workaround, not a complete or proven multiplayer fix.
Updating an older copy
Stop the old guard with python3 native_lobby_guard.py --stop and confirm detach before replacing the file. Copy the updated source below, set your SteamID64 again, and follow the start/verification steps. Editing the file alone does not update a guard already loaded inside GDB. The installation event for this revision lists guarded_states: [0, 1, 4, 5, 6].
Investigation details: 12v12 host auto-exit on Linux
We investigated a similar lobby-disappearing symptom in Dota 12v12 on the native Linux client, build 6930. This identifies one client-side exit path; it does not establish that every Arcade lobby failure has the same cause.
What we observed
While the host was still waiting in the lobby, another player joining was followed by the host client sending k_EMsgGCAbandonCurrentGame (7035), then losing its lobby subscription. The host had not pressed Leave or Start Game.
Native inspection found an automatic abandon call in libclient.so at RVA 0x6065544. In the observed path, the engine was not fully loaded, the local user was the leader, and the lobby had lobby_type=1, lan=1, and nonzero game_state. This path did not check that the lobby was still in state=0 (UI/waiting).
The problematic snapshots specifically had state=0 (UI) and game_state=7 (DISCONNECT). We do not yet know why the lobby received that combination. The lan field also appeared on region-selected lobbies; it is not a claim that the user selected Local Host.
A narrowly scoped GDB guard suppressed that single call only for the configured user's hosted 12v12 waiting lobbies. With the guard active, other players could join without the host leaving. We also verified a test bot joining a public lobby configured for Brazil: the host and other participants remained in the roster. Newly created rooms were covered without changing the room ID in the guard.
This confirms the waiting-lobby workaround in our test, not successful full multiplayer matches in every region. It does not fix server allocation or let a protocol-only bot load the game.
Scope and limitations
- Native Linux x86-64, client build 6930 only. Windows, macOS, Proton, and other builds have not been supported or tested.
- This changes live execution through a debugger. VAC / anti-cheat compatibility is unverified; no ban-safety claim is made. This is not a Valve-approved fix.
- No game files on disk are patched. A normal debugger detach removes the breakpoint. The guard must be started again after restarting Dota.
- The script is intentionally restricted to 12v12, your account as host, and the pre-game/DISCONNECT conditions listed in the update above. It has no region filter and sends no kick commands.
- Build/instruction checks must not be removed to force compatibility with an update.
How to apply
1. Install prerequisites. Install Python 3 and GDB with Python support through your Linux distribution's package manager. Check:
python3 --version
gdb --version
gdb -q -batch -ex 'python print("GDB Python support OK")'
2. Save the script. Expand the source section below. Copy the complete Python code into a plain-text file named native_lobby_guard.py, in its own folder. The source is included here; no separate download or bot login is required.
3. Set your account. Edit this line in the saved file, replacing 0 with your own SteamID64, as digits without quotes:
USER_ID = 0 # Set this to your own SteamID64 before running.
This must be the account currently playing Dota, not a shorter friend/account ID. Never put a Steam password or Steam Guard secret in this script.
4. Start Dota normally. Wait for its main menu. Open a terminal in the script folder and find the game process:
pgrep -a -x dota2
The first number is the PID. Choose your regular native game client, not a -dedicated process. If multiple clients appear, identify the correct one before continuing.
5. Start the guard. Replace YOUR_DOTA_PID with that number:
python3 native_lobby_guard.py --pid YOUR_DOTA_PID --all-hosted --duration 0
Keep the terminal open. --duration 0 means no timer; --all-hosted covers newly created 12v12 rooms you host. Run only one guard. Do not use Python -O or PYTHONOPTIMIZE, because the script uses assertions for runtime validation.
6. Verify it is installed. In a second terminal in the same folder:
tail -n 30 .session/ui-guard-debugger.log
tail -n 5 .session/ui-guard-events.jsonl
Look for UI_GUARD_INSTALLED in the debugger log and an installed event. A running command or state file alone is not confirmation. Then create a 12v12 lobby normally and have another player join. A blocked automatic exit is recorded as suppressed-ui-abandon. Check that you actually remain in the lobby.
7. Stop it when finished. From the second terminal:
python3 native_lobby_guard.py --stop
Check the debugger log for a successful detach. Detach requested alone means only that the request was sent. After restarting Dota, repeat steps 4–6 with the new PID. No autostart is installed.
Troubleshooting
Already traced: another debugger/guard is attached; do not launch a second one.Operation not permitted: the system denied debugging access. Inspect your distribution's policy; this instruction does not require globally disabling ptrace restrictions.- Version assertion /
Unexpected client instructions: unsupported build/layout; stop rather than removing checks. - Missing
steam.inf/libclient.so: check the selected PID and native client installation; nonstandard/containerized installs are unverified. - No
UI_GUARD_INSTALLED: inspect.session/ui-guard-debugger.log; do not assume installation succeeded. original-behavior: the exact workaround conditions did not match; the original call was allowed.guard-error: runtime inspection failed. Stop the guard and inspect diagnostics.
Logs contain SteamIDs and lobby IDs. Review/redact them before sharing. Do not upload credentials, Steam authentication files, or an entire session directory.
Source
The copy below keeps the verified instruction address and uses the updated pre-game state predicate described above. Packaging changes unset the private account ID, create the session folder, locate the installation from the selected process, and remove the private one-room test mode. Three predicate tests passed, and the launcher rejects an unset SteamID. This distributable copy has not been attached to another user's game.
Expand complete native_lobby_guard.py — copy all code into the file
"""Session-only workaround for the verified Dota build 6930 UI abandon bug.
No on-disk game edits. GDB restores its breakpoint on detach. Not a general client patch.
"""
import argparse
import datetime
import json
import os
from pathlib import Path
import signal
import subprocess
import time
BASE = Path(__file__).resolve().parent
SESSION = BASE / '.session'
USER_ID = 0 # Set this to your own SteamID64 before running.
ADDON_ID = 1576297063
CALL_RVA = 0x6065544
CALL_BYTES = bytes.fromhex('e8e7c1feffe9bafbffff')
PRE_GAME_STATES = (0, 1, 4, 5, 6) # UI, SERVERSETUP, READYUP, NOTREADY, SERVERASSIGN
def should_skip(observed, expected):
# Stale DISCONNECT also survives Accept into server assignment/preparation.
# Cover the complete pre-game phase; RUN and POSTGAME retain native handling.
state = observed.get('state')
if type(state) is not int or state not in PRE_GAME_STATES:
return False
if expected is None:
expected = observed.get('lobby_id')
if type(expected) is not int or not 0 < expected < 2**64:
return False
return observed == dict(lobby_id=expected, leader_id=USER_ID, caller_id=USER_ID,
custom_game_id=ADDON_ID, state=state, game_state=7, lan=1, lobby_type=1)
def install(pid, expected):
import gdb
assert gdb.selected_inferior().pid == pid
rows = Path(f'/proc/{pid}/maps').read_text().splitlines()
row = next(r for r in rows if r.endswith('/dota/bin/linuxsteamrt64/libclient.so') and r.split()[2] == '00000000')
base = int(row.split('-')[0], 16)
address = base + CALL_RVA
mem = gdb.selected_inferior().read_memory
assert bytes(mem(address, len(CALL_BYTES))) == CALL_BYTES, 'Unexpected client instructions'
log = SESSION / 'ui-guard-events.jsonl'
def record(data):
with log.open('a') as f:
safe = {k: str(v) if k.endswith('_id') and v is not None else v for k, v in data.items()}
f.write(json.dumps(dict(time=datetime.datetime.now(datetime.timezone.utc).isoformat(), **safe)) + '\n')
class Guard(gdb.Breakpoint):
def stop(self):
try:
def uint(p, size):
return int.from_bytes(bytes(mem(p, size)), 'little')
wrapper = uint(int(gdb.parse_and_eval('$r13')) + 0x18, 8)
assert wrapper == int(gdb.parse_and_eval('$rdx')), 'Unexpected wrapper register'
fields = {name: uint(wrapper + offset, size) for name, offset, size in [
('lobby_id', 0x1a0, 8), ('leader_id', 0x1b8, 8), ('custom_game_id', 0x210, 8),
('state', 0x1ac, 4), ('game_state', 0x1cc, 4), ('lan', 0x1e7, 1), ('lobby_type', 0x2a0, 4)]}
fields['caller_id'] = int(gdb.parse_and_eval('$rax'))
if should_skip(fields, expected):
# Skip this exact CALL only; its return value is unused. No stack adjustment.
gdb.execute(f'set $pc = {address + 5}', to_string=True)
record(dict(event='suppressed-ui-abandon', **fields))
else:
record(dict(event='original-behavior', **fields))
except Exception as exc:
# Fail open to original game behavior rather than leaving Dota paused.
try:
record(dict(event='guard-error', message=str(exc)))
except Exception:
pass # Logging failure must not leave the game paused.
return False
bp = Guard(f'*{address}')
bp.silent = True
record(dict(event='installed', pid=pid, lobby_id=expected, guarded_states=list(PRE_GAME_STATES),
scope='all-hosted-12v12' if expected is None else 'one-lobby'))
gdb.write('UI_GUARD_INSTALLED\n')
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--pid', type=int)
parser.add_argument('--all-hosted', action='store_true', help='All 12v12 waiting rooms owned by this user')
parser.add_argument('--duration', type=int, default=600, help='Seconds; 0 means until Dota exits or --stop')
parser.add_argument('--stop', action='store_true')
args = parser.parse_args()
state_file = SESSION / 'ui-guard-state.json'
if args.stop:
state = json.loads(state_file.read_text())
command = Path(f"/proc/{state['debugger_pid']}/cmdline").read_bytes().split(b'\0')
assert str(SESSION / 'ui-guard.gdb').encode() in command, 'Debugger identity changed'
os.kill(state['debugger_pid'], signal.SIGINT)
print('Detach requested.')
return
if not (76561197960265728 <= USER_ID < 76561202255233024):
parser.error('Edit USER_ID in native_lobby_guard.py to your own SteamID64 first.')
if not (args.pid and args.all_hosted and 0 <= args.duration <= 1800):
parser.error('Use --pid PID --all-hosted; --duration must be 0..1800.')
SESSION.mkdir(mode=0o700, exist_ok=True)
command = Path(f'/proc/{args.pid}/cmdline').read_bytes().split(b'\0')
assert command[0].endswith(b'/dota2') and b'-dedicated' not in command
status = Path(f'/proc/{args.pid}/status').read_text()
assert next(r.split()[1] for r in status.splitlines() if r.startswith('TracerPid:')) == '0', 'Already traced'
game_dir = Path(f'/proc/{args.pid}/exe').resolve().parents[2]
version = (game_dir / 'dota/steam.inf').read_text()
assert 'ClientVersion=6930\n' in version
script = SESSION / 'ui-guard.gdb'
script.write_text('\n'.join(['set pagination off', 'set confirm off', 'set debuginfod enabled off',
'handle SIGPIPE nostop noprint pass', f'attach {args.pid}',
f'python import sys; sys.path.insert(0, {str(BASE)!r}); import native_lobby_guard; native_lobby_guard.install({args.pid}, None)',
'continue', 'detach', 'quit']) + '\n')
with (SESSION / 'ui-guard-events.jsonl').open('a'):
os.chmod(SESSION / 'ui-guard-events.jsonl', 0o600)
with (SESSION / 'ui-guard-debugger.log').open('w') as log:
child = subprocess.Popen(['gdb', '-q', '-batch', '-x', str(script)], stdout=log, stderr=log)
state_file.write_text(json.dumps(dict(pid=args.pid, debugger_pid=child.pid,
lobby_id=None,
scope='all-hosted-12v12',
expires_at=time.time() + args.duration if args.duration else None)))
os.chmod(state_file, 0o600)
try:
child.wait(timeout=args.duration or None)
except (subprocess.TimeoutExpired, KeyboardInterrupt):
child.send_signal(signal.SIGINT)
child.wait(timeout=10)
finally:
if child.poll() is None:
child.send_signal(signal.SIGINT)
child.wait(timeout=10)
print('Debugger finished; inspect detach log. Exit:', child.returncode)
raise SystemExit(child.returncode)
if __name__ == '__main__':
main()
Related: #35326 also reports outgoing AbandonCurrentGame, but in Overthrow and including non-host cases. That similarity is worth investigating; this 12v12 host-only guard does not establish a fix for those cases.
This message was generated by AI. Verify the information independently and trust/use it at your own risk.
Thank you for the debug logs, they are extremely helpful. Valve has shut down the servers, which is a total disaster for the Arcade mode.
This message was generated by AI. Verify the information independently and trust/use it at your own risk.
Update: the workaround is incomplete — multiplayer launch still unverified
The first version only covered
UI (0). A real-player launch then showed the same automatic exit inREADYUP (4)andNOTREADY (5). After extending those checks, the next attempt got through Accept but exited inSERVERSETUP (1)withgame_state=7; the attached guard recorded that exact call being allowed through.The script below now covers all enumerated pre-game lobby states:
UI (0),SERVERSETUP (1),READYUP (4),NOTREADY (5), andSERVERASSIGN (6). The account, host, 12v12, LAN, practice-lobby, andgame_state=7checks remain. This revision passed three local predicate tests and replay checks against the recorded failing events, and installation on the current native client was confirmed. Those checks are not an end-to-end multiplayer test. We have not confirmed a full match reaching hero selection with other players after this latest extension.Remaining gaps
RUN (2)andPOSTGAME (3)are deliberately not suppressed. If the lobby enters RUN before the client finishes loading, the same automatic exit may still occur under the remaining conditions.- A separate game-session shutdown path also calls
AbandonCurrentGame. It is not patched; normal termination must not be disabled globally.- Custom-game version/CRC validation has a separate
PracticeLobbyLeave (7040)path. This guard does not repair mismatched files.- The patch affects only the local host. Other players' clients may independently leave.
- No automatic reapplication after restarting Dota, no compatibility guarantee after updates, and no verified anti-cheat compatibility.
The root cause of the unexpected GC lobby state is still unknown. Treat this as a debugging experiment and partial workaround, not a complete or proven multiplayer fix.
Updating an older copy
Stop the old guard with
python3 native_lobby_guard.py --stopand confirm detach before replacing the file. Copy the updated source below, set your SteamID64 again, and follow the start/verification steps. Editing the file alone does not update a guard already loaded inside GDB. The installation event for this revision listsguarded_states: [0, 1, 4, 5, 6].Investigation details: 12v12 host auto-exit on Linux
We investigated a similar lobby-disappearing symptom in Dota 12v12 on the native Linux client, build 6930. This identifies one client-side exit path; it does not establish that every Arcade lobby failure has the same cause.
What we observed
While the host was still waiting in the lobby, another player joining was followed by the host client sending
k_EMsgGCAbandonCurrentGame(7035), then losing its lobby subscription. The host had not pressed Leave or Start Game.Native inspection found an automatic abandon call in
libclient.soat RVA0x6065544. In the observed path, the engine was not fully loaded, the local user was the leader, and the lobby hadlobby_type=1,lan=1, and nonzerogame_state. This path did not check that the lobby was still instate=0(UI/waiting).The problematic snapshots specifically had
state=0(UI) andgame_state=7(DISCONNECT). We do not yet know why the lobby received that combination. Thelanfield also appeared on region-selected lobbies; it is not a claim that the user selected Local Host.A narrowly scoped GDB guard suppressed that single call only for the configured user's hosted 12v12 waiting lobbies. With the guard active, other players could join without the host leaving. We also verified a test bot joining a public lobby configured for Brazil: the host and other participants remained in the roster. Newly created rooms were covered without changing the room ID in the guard.
This confirms the waiting-lobby workaround in our test, not successful full multiplayer matches in every region. It does not fix server allocation or let a protocol-only bot load the game.
Scope and limitations
- Native Linux x86-64, client build 6930 only. Windows, macOS, Proton, and other builds have not been supported or tested.
- This changes live execution through a debugger. VAC / anti-cheat compatibility is unverified; no ban-safety claim is made. This is not a Valve-approved fix.
- No game files on disk are patched. A normal debugger detach removes the breakpoint. The guard must be started again after restarting Dota.
- The script is intentionally restricted to 12v12, your account as host, and the pre-game/DISCONNECT conditions listed in the update above. It has no region filter and sends no kick commands.
- Build/instruction checks must not be removed to force compatibility with an update.
How to apply
1. Install prerequisites. Install Python 3 and GDB with Python support through your Linux distribution's package manager. Check:
python3 --version gdb --version gdb -q -batch -ex 'python print("GDB Python support OK")' 2. Save the script. Expand the source section below. Copy the complete Python code into a plain-text file named
native_lobby_guard.py, in its own folder. The source is included here; no separate download or bot login is required.3. Set your account. Edit this line in the saved file, replacing
0with your own SteamID64, as digits without quotes:USER_ID = 0 # Set this to your own SteamID64 before running. This must be the account currently playing Dota, not a shorter friend/account ID. Never put a Steam password or Steam Guard secret in this script.
4. Start Dota normally. Wait for its main menu. Open a terminal in the script folder and find the game process:
pgrep -a -x dota2 The first number is the PID. Choose your regular native game client, not a
-dedicatedprocess. If multiple clients appear, identify the correct one before continuing.5. Start the guard. Replace
YOUR_DOTA_PIDwith that number:python3 native_lobby_guard.py --pid YOUR_DOTA_PID --all-hosted --duration 0 Keep the terminal open.
--duration 0means no timer;--all-hostedcovers newly created 12v12 rooms you host. Run only one guard. Do not use Python-OorPYTHONOPTIMIZE, because the script uses assertions for runtime validation.6. Verify it is installed. In a second terminal in the same folder:
tail -n 30 .session/ui-guard-debugger.log tail -n 5 .session/ui-guard-events.jsonl Look for
UI_GUARD_INSTALLEDin the debugger log and aninstalledevent. A running command or state file alone is not confirmation. Then create a 12v12 lobby normally and have another player join. A blocked automatic exit is recorded assuppressed-ui-abandon. Check that you actually remain in the lobby.7. Stop it when finished. From the second terminal:
python3 native_lobby_guard.py --stop Check the debugger log for a successful detach.
Detach requestedalone means only that the request was sent. After restarting Dota, repeat steps 4–6 with the new PID. No autostart is installed.Troubleshooting
Already traced: another debugger/guard is attached; do not launch a second one.Operation not permitted: the system denied debugging access. Inspect your distribution's policy; this instruction does not require globally disabling ptrace restrictions.- Version assertion /
Unexpected client instructions: unsupported build/layout; stop rather than removing checks.- Missing
steam.inf/libclient.so: check the selected PID and native client installation; nonstandard/containerized installs are unverified.- No
UI_GUARD_INSTALLED: inspect.session/ui-guard-debugger.log; do not assume installation succeeded.original-behavior: the exact workaround conditions did not match; the original call was allowed.guard-error: runtime inspection failed. Stop the guard and inspect diagnostics.Logs contain SteamIDs and lobby IDs. Review/redact them before sharing. Do not upload credentials, Steam authentication files, or an entire session directory.
Source
The copy below keeps the verified instruction address and uses the updated pre-game state predicate described above. Packaging changes unset the private account ID, create the session folder, locate the installation from the selected process, and remove the private one-room test mode. Three predicate tests passed, and the launcher rejects an unset SteamID. This distributable copy has not been attached to another user's game.
Expand complete native_lobby_guard.py — copy all code into the file Related: #35326 also reports outgoing
AbandonCurrentGame, but in Overthrow and including non-host cases. That similarity is worth investigating; this 12v12 host-only guard does not establish a fix for those cases.This message was generated by AI. Verify the information independently and trust/use it at your own risk.
Thank you for the debug logs, they are extremely helpful. Valve has shut down the dadecite servers, which is a total disaster for the Arcade mode.