phacility/phabricator · error · Exception
Client transmitted more than 1MB of data without transmittin
Error message
Client transmitted more than 1MB of data without transmitting a recognizable protocol frame.
What it means
While peeking at the first ra_svn frame, the workflow accumulates raw client bytes in peekBuffer; if it exceeds 1MiB without DiffusionSubversionWireProtocol yielding a parseable frame, the connection is cut. The guard bounds memory against garbage input and doubles as a compatibility check - a client speaking something the parser does not recognize trips it.
Source
Thrown at src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php:100
if (!$exec_channel->isOpenForReading()) {
throw new Exception(
pht(
'%s subprocess exited before emitting a protocol frame.',
'svnserve'));
}
}
$io_protocol = new DiffusionSubversionWireProtocol();
while (true) {
PhutilChannel::waitForAny(array($io_channel));
$io_channel->update();
$in_message = $io_channel->read();
if ($in_message !== null) {
$this->peekBuffer .= $in_message;
if (strlen($this->peekBuffer) > (1024 * 1024)) {
throw new Exception(
pht(
'Client transmitted more than 1MB of data without transmitting '.
'a recognizable protocol frame.'));
}
$messages = $io_protocol->writeData($in_message);
if ($messages) {
$message = head($messages);
$struct = $message['structure'];
// This is the:
//
// ( version ( cap1 ... ) url ... )
//
// The `url` allows us to identify the repository.
$uri = $struct[2]['value'];
$path = $this->getPathFromSubversionURI($uri);View on GitHub (pinned to 5720a38cfe)
Solutions
- Connect with a compatible svn client over svn+ssh:// with no extra tunnel rewriting
- Reproduce with 'svn ls svn+ssh://user@host/REPO' from the same machine to isolate client configuration
- Remove custom tunnel definitions in ~/.subversion/config that alter the command or the stream
Defensive patterns
Strategy: try-catch
Try / catch
try {
$workflow->executeRepositoryOperations();
} catch (Exception $ex) {
// The 1MB guard is terminal for the session: log, close the channel,
// and report to the client - do not retry with the same stream.
phlog($ex);
$io_channel->closeForRead();
$io_channel->closeForWrite();
} Prevention
- Treat this error as terminal for the session - retrying with the same client config reproduces it
- When building custom SVN tooling, parse frames incrementally client-side instead of streaming raw blobs
When it happens
Trigger: A non-SVN or incompatible SVN client opens svn+ssh to the Phabricator SSH endpoint; a tunnel wrapper corrupts stdin so the byte stream never parses; deliberately oversized junk streamed at the endpoint.
Common situations: Users pointing tools other than svn at the Phabricator SSH user; SVN client versions far newer than the supported ra_svn dialect; ssh ProxyCommand setups that mangle the channel.
Related errors
- Configuration file specifies cluster peer ("%s", at index "%
- This repository is read-only over SSH.
- %s subprocess exited before emitting a protocol frame.
- Client closed connection before sending a complete protocol
- Client closed connection before receiving response.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/c6bd6388c09ab33d.
Report an issue: GitHub.