Opened 13 years ago

Last modified 7 years ago

#248 closed defect (Fixed)

exit/dns assert failure when out of sockets

Reported by: arma Owned by:
Priority: Low Milestone: 0.1.2.x-final
Component: Core Tor/Tor Version: 0.1.1.12-alpha
Severity: Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Feb 06 14:42:40.773 [warn] connection_add(): Failing because we have 8159 connections already. Please raise your ulimit -n.
Feb 06 14:55:33.357 [err] dns.c:177: purge_expired_resolves: Assertion pend->conn->s == -1 failed; aborting.

#2 0x00000000004320fe in purge_expired_resolves (now=1139255733) at dns.c:166
#3 0x00000000004323d0 in dns_resolve (exitconn=0x16c9cdf0) at dns.c:282
#4 0x0000000000421201 in connection_exit_begin_resolve (cell=0x7fbffff13e, circ=0x18ddac30)

at connection_edge.c:1608

#5 0x000000000043af87 in connection_edge_process_relay_cell (cell=0x7fbffff130,

circ=0x18ddac30, conn=0x0, layer_hint=0x0) at relay.c:1058

#6 0x0000000000439654 in circuit_receive_relay_cell (cell=0x7fbffff130, circ=0x18ddac30,

cell_direction=2) at relay.c:169

#7 0x0000000000412c03 in command_process_relay_cell (cell=0x7fbffff130, conn=0xae1b30)

at command.c:315

#8 0x0000000000423270 in connection_or_process_cells_from_inbuf (conn=0xae1b30)

at connection_or.c:777

#9 0x000000000041bc65 in connection_handle_read (conn=0xae1b30) at connection.c:1202

(gdb) print *oldest_cached_resolve
$2 = {node = {hte_next = 0x0, hte_hash = 1156299437},

address = "www.cinemanow.com", '\0' <repeats 238 times>, addr = 0, state = 0 '\0',
expire = 1139254227, pending_connections = 0xadc4900, next = 0x2c7bfb0}

(gdb) print *oldest_cached_resolve->pending_connections
$3 = {conn = 0xf6b00d0, next = 0x0}
(gdb) print *oldest_cached_resolve->pending_connections->conn
$4 = {magic = 2084319310, type = 4 '\004', state = 5 '\005', purpose = 0 '\0',

wants_to_read = 0, wants_to_write = 0, hold_open_until_flushed = 0, has_sent_end = 0,
control_events_are_extended = 0, is_obsolete = 0, s = 494, poll_index = 3343,
read_event = 0x7cf730, write_event = 0x9937ac0, inbuf = 0xa7194d0, inbuf_reached_eof = 0,
timestamp_lastread = 1139255616, outbuf = 0x700490, outbuf_flushlen = 0,
timestamp_lastwritten = 1139255618, timestamp_created = 1139254410,
timestamp_lastempty = 1139255733, addr = 1166092339, port = 1062, marked_for_close = 0,
marked_for_close_file = 0x0, address = 0x10812050 "69.129.40.51", identity_pkey = 0x0,
identity_digest = "tE3¯&i\027\025\204Áª»i\f\001>©ÕßH",
nickname = 0x1a062760 "$744533AF2669171584C1AABB690C013EA9D5DF48",
chosen_exit_name = 0x0, tls = 0x627d8c0, bandwidth = 6291456, receiver_bucket = 6291456,
circ_id_type = CIRC_ID_TYPE_HIGHER, n_circuits = 1, next_with_same_id = 0x0,
next_circ_id = 767, stream_id = 0, next_stream = 0x0, cpath_layer = 0x0,
package_window = 0, deliver_window = 0, requested_resource = 0x0, socks_request = 0x0,
global_identifier = 5000930, event_mask = 0, incoming_cmd_len = 0,
incoming_cmd_cur_len = 0, incoming_cmd = 0x0, on_circuit = 0x0,
rend_query = '\0' <repeats 16 times>, incoming_cmd_type = 0}

This is an OR conn that's pending on a DNS resolve? What the heck.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 13 years ago by nickm

Have we reproduced this? Has it happened again? Where did it happen? etc,etc.

comment:2 Changed 13 years ago by arma

It happened to me on one of the morias. I only saw it that once.

(I'm guessing there are other edge cases when we run out of space in the
connection array, but that's a different story.)

comment:3 Changed 13 years ago by arma

It's conceivable the 0.1.1.23 release fixed this issue.

I'm going to close this flyspray, and we can re-open if it re-emerges.

comment:4 Changed 13 years ago by arma

flyspray2trac: bug closed.
Might be fixed. We'll see.

comment:5 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.