Crash on MetricsPort when prematurely terminating socket
If I setup a MetricsPort
and telnet into it, and then prematurely terminate the socket without doing anything, we get a crash:
Jan 23 14:03:51.000 [notice] Bootstrapped 100% (done): Done
Jan 23 14:03:56.000 [warn] conn_read_callback: Bug: Unhandled error on read for Metrics connection (fd 10); removing (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] tor_bug_occurred_: Bug: src/core/mainloop/mainloop.c:899: conn_read_callback: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: Tor 0.4.6.0-alpha-dev (git-878c124e0dda4cde): Line unexpectedly reached at conn_read_callback at src/core/mainloop/mainloop.c:899. Stack trace: (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x130985c <log_backtrace_impl+0x5c> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x1317d91 <tor_bug_occurred_+0x1d1> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x116a843 <conn_read_callback+0x1021103> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x80140519d <event_base_assert_ok_nolock_+0xbfd> at /usr/local/lib/libevent-2.1.so.7 (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x80140112c <event_base_loop+0x58c> at /usr/local/lib/libevent-2.1.so.7 (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x116cbba <do_main_loop+0x12a> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x1155f1c <tor_run_main+0x12c> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
Jan 23 14:03:56.000 [warn] Bug: 0x1154871 <tor_main+0x61> at /usr/home/neel/code/tor/tor/src/app/tor (on Tor 0.4.6.0-alpha-dev 878c124e0dda4cde)
^CJan 23 14:04:02.000 [notice] Interrupt: exiting cleanly.
neel@concorde:~/code/tor/tor %