[Pidgin] #4621: MySpace IM causing program freeze at login attempt
Pidgin
trac at pidgin.im
Sat Jan 26 23:22:02 EST 2008
#4621: MySpace IM causing program freeze at login attempt
-----------------------+----------------------------------------------------
Reporter: akb | Owner: jeff
Type: defect | Status: assigned
Priority: critical | Milestone:
Component: MySpace | Version: 2.3.1
Resolution: | Keywords: Adium MySpace
Pending: 0 |
-----------------------+----------------------------------------------------
Comment (by jeff):
msim_parse() is being called endlessly, trying to parse the same buddy
presence update message, because the 15K receive buffer is full. I ran
Adium with the debug log enabled and it generated a 165,305-line 213 MB
log file before I killed it. Msimprpl does actually detect that the read
buffer is full:
{{{
17:56:07: (Libpurple: msim) buffer at 0 (max 15360), reading up to 15360
17:56:07: (Libpurple: msim_input_cb) received 15360 bytes, pushing rxoff
to 15360, over buffer size of 15360
17:56:07: Connection Disconnected: gc=b02e190 (Read buffer full)
17:56:07: <PurpleMySpaceAccount:6e543f0 3>:msimprpl at xyzzy.cjb.net
accountConnectionReportDisconnect: Read buffer full
17:56:07: (Libpurple: msim) msim_input_cb: going to null terminate at
n=15360
17:56:07: (Libpurple: msim) msim_input_cb: read=15360
}}}
It reports this error condition using `purple_connection_error_reason`, in
myspace.c:msim_input_cb:
{{{
/* Only can handle so much data at once...
* Should be large enough to hold the largest protocol message.
*/
if (session->rxoff >= MSIM_READ_BUF_SIZE) {
purple_debug_error("msim",
"msim_input_cb: %d-byte read buffer full!
rxoff=%d. "
"If this happens, try recompiling with a
higher "
"MSIM_READ_BUF_SIZE.",
MSIM_READ_BUF_SIZE, session->rxoff);
purple_connection_error_reason (gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
_("Read buffer full"));
return;
}
}}}
and
{{{
if (n + session->rxoff >= MSIM_READ_BUF_SIZE) {
purple_debug_info("msim_input_cb", "received %d bytes,
pushing rxoff to %d, over buffer size of %d\n",
n, n + session->rxoff,
MSIM_READ_BUF_SIZE);
/* TODO: g_realloc like msn, yahoo, irc, jabber? */
purple_connection_error_reason (gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
_("Read buffer full"));
}
}}}
There is a `return` missing here; the function shouldn't continue. I added
it.
--
Ticket URL: <http://developer.pidgin.im/ticket/4621#comment:9>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list