dirport but no orport triggers assert failure
% src/app/tor dirport 9030
[...]
May 28 02:49:41.954 [err] tor_assertion_failed_(): Bug: src/lib/crypt_ops/crypto_ed25519.c:658: ed25519_pubkey_copy: Assertion src failed; aborting. (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: Tor 0.4.8.0-alpha-dev (git-69e3b8bb843aaab6): Assertion src failed in ed25519_pubkey_copy at src/lib/crypt_ops/crypto_ed25519.c:658: . Stack trace: (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(log_backtrace_impl+0x57) [0x559f702dd237] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(tor_assertion_failed_+0x148) [0x559f702e8218] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(ed25519_pubkey_copy+0x94) [0x559f702d0bd4] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(server_onion_keys_new+0x4b) [0x559f70400a1b] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(+0x1ab218) [0x559f703a7218] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(threadpool_new+0x199) [0x559f70414739] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(cpu_init+0x8d) [0x559f703a76ed] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(run_tor_main_loop+0xe3) [0x559f70260683] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(tor_run_main+0x1d5) [0x559f70260bb5] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(tor_main+0x49) [0x559f7025d0d9] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(main+0x19) [0x559f7025ccb9] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7fb309032d0a] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
May 28 02:49:41.955 [err] Bug: src/app/tor(_start+0x2a) [0x559f7025cd0a] (on Tor 0.4.8.0-alpha-dev 69e3b8bb843aaab6)
Aborted
I did a git bisect: commit 244444e8 works and commit bd2e9a44 is the first broken one.
I assume it is this line:
+ ed25519_pubkey_copy(&keys->my_ed_identity, get_master_identity_key());
where the other functions called from server_onion_keys_new() check if there aren't any keys before doing their thing, but this one doesn't.
This commit went into Tor 0.4.7.4-alpha.