Bug 238433 - security/tor fails to start after libevent update
Summary: security/tor fails to start after libevent update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
Keywords: regression
Depends on:
Blocks: 238127
  Show dependency treegraph
Reported: 2019-06-09 09:43 UTC by Dries Michiels
Modified: 2019-06-09 11:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2019-06-09 09:43:21 UTC

The new libevent doesn't include the evutil_secure_rng_add_bytes(), although this function is still used by tor and thus fails to start with the new libevent.

Starting tor.
ld-elf.so.1: /usr/local/bin/tor: Undefined symbol "evutil_secure_rng_add_bytes"
/usr/local/etc/rc.d/tor: WARNING: failed to start tor
Comment 1 Yuri Victorovich freebsd_committer 2019-06-09 10:06:42 UTC
(In reply to Dries Michiels from comment #0)

Hi Dries,

Thanks for reporting this problem. This is at least a bug in the libevent release (they didn't update the library SONAME).

I've reported this to
* libevent: https://github.com/libevent/libevent/issues/831
* Tor: https://trac.torproject.org/projects/tor/ticket/30813

Comment 2 commit-hook freebsd_committer 2019-06-09 11:27:10 UTC
A commit references this bug:

Author: jbeich
Date: Sun Jun  9 11:26:27 UTC 2019
New revision: 503811
URL: https://svnweb.freebsd.org/changeset/ports/503811

  security/tor: force rebuild after r503790

  evutil_secure_rng_add_bytes became nop in r478104 on all FreeBSD
  releases due to a bug in arc4random_addrandom ifdef. libevent 2.1.10
  hidden it based on configure check. Looks like there were consumers.

  PR:		238433
  Reported by:	yuri

Comment 3 Jan Beich freebsd_committer 2019-06-09 11:55:31 UTC
evutil_secure_rng_add_bytes still exists on FreeBSD 11 but not on FreeBSD 12 or later. security/tor detects evutil_secure_rng_add_bytes during configure and disables if not found, so a simple rebuild should suffice. The failure was due to an ABI quirk from how bug 230764 was fixed.