Opened 10 years ago

Last modified 5 years ago

#379 closed defect (Won't fix)

Tor blocks on writing to logs

Reported by: arma Owned by:
Priority: Very Low Milestone:
Component: Core Tor/Tor Version: 0.1.2.5-alpha
Severity: Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

#0 0x40253981 in write () from /lib/tls/libc.so.6
#1 0x401f5eef in _IO_file_write () from /lib/tls/libc.so.6
#2 0x401f505e in _IO_do_write () from /lib/tls/libc.so.6
#3 0x401f4ff6 in _IO_do_write () from /lib/tls/libc.so.6
#4 0x401f56a2 in _IO_file_sync () from /lib/tls/libc.so.6
#5 0x401e9c28 in fflush () from /lib/tls/libc.so.6
#6 0x080c5327 in logv (severity=4, domain=1024,

funcname=0x80ff58e "router_choose_random_node",
format=0x80ff5c0 "No available nodes when trying to choose node. Failing.", ap=0xbffff460 "") at log.c:243

#7 0x080c53d9 in _log_fn (severity=4, domain=1024,

fn=0x80ff58e "router_choose_random_node",
format=0x80ff5c0 "No available nodes when trying to choose node. Failing.")
at log.c:272

#8 0x080b0a25 in router_choose_random_node (preferred=0x0, excluded=0x0,

excludedsmartlist=0x86da7b0, need_uptime=0, need_capacity=0, need_guard=1,
allow_invalid=0, strict=0, weight_for_exit=0) at routerlist.c:1098

#9 0x0805494e in choose_good_entry_server (purpose=5 '\005', state=0x0)

at circuitbuild.c:1614

#10 0x08055492 in add_an_entry_guard (chosen=0x0) at circuitbuild.c:1963
#11 0x080562d1 in choose_random_entry (state=0x87bc530) at circuitbuild.c:2305
#12 0x08054759 in choose_good_entry_server (purpose=5 '\005', state=0x87bc530)

at circuitbuild.c:1581

...

This happens when Vidalia freezes and fails to read its stdin. It might also happen
in other cases.

What would happen if we made our log files non-blocking? First, it would make everything
more complex from our side.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 10 years ago by nickm

I'd like to call this WONTFIX or NOTABUG, personally. The fix is pretty easy on
Vidalia's side: just get your log messages as events from the controller (which is
nonblocking) rather than from stdin. (If the point of stdin is to catch the messages Tor
gives before it starts logging to the controller, then just listen to stdin _at first_,
but clear all the logs once the controller is connected and listening for log events.)

Also, the fix on our side is really really hard: nonblocking file IO on windows uses a
more or less completely different system than we use for nonblocking socket IO, and other
similar tricks can only lead to tears.

comment:2 Changed 10 years ago by nickm

flyspray2trac: bug closed.
Talked to edmanm: he'll do a variant on the fix described in my comment.

comment:3 Changed 5 years ago by nickm

  • Component changed from Tor Client to Tor
Note: See TracTickets for help on using tickets.