Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T14:28:12Zhttps://gitlab.torproject.org/legacy/trac/-/issues/6767tor crashes with Assertion smartlist_get(rl->old_routers, idx) == sd failed2020-06-13T14:28:12ZLeonid Evdokimovtor crashes with Assertion smartlist_get(rl->old_routers, idx) == sd failedI started my gateway with stderr redirected to syslog and got following crash:
```
Sep 2 12:30:07 OpenWrt cron.info crond[708]: crond: USER root pid 1794 cmd /root/tor-watchdog.sh
Sep 2 12:43:19 OpenWrt daemon.err Tor[1280]: routerlist...I started my gateway with stderr redirected to syslog and got following crash:
```
Sep 2 12:30:07 OpenWrt cron.info crond[708]: crond: USER root pid 1794 cmd /root/tor-watchdog.sh
Sep 2 12:43:19 OpenWrt daemon.err Tor[1280]: routerlist_remove_old(): Bug: routerlist.c:3004: routerlist_remove_old: Assertion idx == sd->routerlist_index failed; aborting.
Sep 2 12:43:21 OpenWrt user.notice tor.stdout: routerlist.c:3004 routerlist_remove_old: Assertion idx == sd->routerlist_index failed; aborting.
Sep 2 12:45:01 OpenWrt cron.info crond[708]: crond: USER root pid 1797 cmd /root/tor-watchdog.sh
Sep 2 12:45:01 OpenWrt user.notice Tor.watchdog: pidfile exists and process is missing - start
Sep 2 12:45:02 OpenWrt user.notice Tor.init: Sep 02 12:45:02.684 [notice] Tor v0.2.2.37 (git-fce6eb1c44e87bc2). This is experimental software. Do not rely on it for strong anonymity. (Running on Linux mips)
```
OpenWrt package versions: libopenssl - 1.0.1c-1, tor - 0.2.2.37-1
openssl build information:
```
root@OpenWrt:~# strings /usr/lib/libcrypto.so.1.0.0 | grep gcc
libgcc_s.so.1
mipsel-openwrt-linux-uclibc-gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/fnord/slave/brcm47xx/build/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/include -I/home/fnord/slave/brcm47xx/build/staging_dir/target-mipsel_uClibc-0.9.33.2/include -I/home/fnord/slave/brcm47xx/build/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/fnord/slave/brcm47xx/build/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/include -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DOPENSSL_NO_ERR -DTERMIO -Os -pipe -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fpic -DOPENSSL_THREADS -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE -fomit-frame-pointer -Wall
```Tor: 0.3.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/6673tor crashes silently with non-threaded openssl build2020-06-13T14:22:00ZLeonid Evdokimovtor crashes silently with non-threaded openssl buildI've seen lots of cryptic crashes of tor on my openwrt gateway: https://atlas.torproject.org/#details/F44DA505AD91CFC8D5745BB070909F20F21E06D9
I've recently decided to debug this issue and run tor with --Daemon 0 under tmux and I got as...I've seen lots of cryptic crashes of tor on my openwrt gateway: https://atlas.torproject.org/#details/F44DA505AD91CFC8D5745BB070909F20F21E06D9
I've recently decided to debug this issue and run tor with --Daemon 0 under tmux and I got assertion failure:
```
...
Aug 24 00:43:13.842 [notice] Performing bandwidth self-test...done.
/usr/sbin/tor: md_rand.c: 325: ssleay_rand_add: Assertion `md_c[1] == md_count[1]' failed.
Aborted
```
Accoding to openssl code it means that openssl was built without OPENSSL_THREADS
```
crypto/rand/md_rand.c
320- if (entropy < ENTROPY_NEEDED) /* stop counting when we have enough */
321- entropy += add;
322- if (!do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
323-
324-#if !defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
325: assert(md_c[1] == md_count[1]);
326-#endif
327- }
328-
329-static void ssleay_rand_seed(const void *buf, int num)
330- {
```
If OPENSSL_THREADS is required for tor to work, then tor should probably check for it in compile-time:
```
openssl-1.0.1/doc/crypto/threads.pod
You can find out if OpenSSL was configured with thread support:
#define OPENSSL_THREAD_DEFINES
#include <openssl/opensslconf.h>
#if defined(OPENSSL_THREADS)
// thread support enabled
#else
// no thread support
#endif
```
If OPENSSL_THREADS is not required, than it looks like either bug in tor itself or in tor<->openssl interaction.
libopenssl - 1.0.1c-1
tor - 0.2.2.37-1
P.S. related OpenWrt ticket: https://dev.openwrt.org/ticket/12072Tor: 0.2.4.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/6672Strictnodes not working2012-08-24T20:11:29ZTracStrictnodes not workingHi,
trying to get my connection exit via GB. Always worked before i updated.
Vidalia 0.2.20
tor 0.2.20
i have in my torroc
StrictNodes 1
ExiteNodes {GB}
**Trac**:
**Username**: LostincaHi,
trying to get my connection exit via GB. Always worked before i updated.
Vidalia 0.2.20
tor 0.2.20
i have in my torroc
StrictNodes 1
ExiteNodes {GB}
**Trac**:
**Username**: Lostincahttps://gitlab.torproject.org/legacy/trac/-/issues/6599./configure script using option -q2020-06-13T14:21:51ZTrac./configure script using option -qThe configure script is not quiet when using the option -q.
# ./configure --prefix=/ -q
tor_cv_library_openssl_dir is (system)
#
OS: OpenBSD 5.1
**Trac**:
**Username**: tgredemarkThe configure script is not quiet when using the option -q.
# ./configure --prefix=/ -q
tor_cv_library_openssl_dir is (system)
#
OS: OpenBSD 5.1
**Trac**:
**Username**: tgredemarkTor: 0.2.4.x-final