Bug 230680 - benchmarks/httperf: application receive buffer too small in case of TLS
Summary: benchmarks/httperf: application receive buffer too small in case of TLS
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: Julien Laffaye
Depends on:
Reported: 2018-08-16 23:23 UTC by szander
Modified: 2019-12-07 11:44 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description szander 2018-08-16 23:23:43 UTC
buf in do_recv() in core.c is too small in case of TLS. TLS record size can be up to 16kB but buf is only 8kB. This leads to data not to be delivered at the end of a reply. At least not in a timely fashion, as it is eventually deliver when the connection is closed many seconds later. buf needs to be at least 16kB.
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-13 05:10:09 UTC
Maintainer feedback!
Comment 2 commit-hook freebsd_committer 2019-12-07 11:40:19 UTC
A commit references this bug:

Author: danfe
Date: Sat Dec  7 11:39:36 UTC 2019
New revision: 519200
URL: https://svnweb.freebsd.org/changeset/ports/519200

  - Update to the latest GitHub commit: current version is from 2015
    and is not compatible with modern OpenSSL implementations
  - Set PORTVERSION to the version number as reported by `httperf -V'
  - Increase buffer size in do_recv() to match TLS record size which
    can be up to 16kB [1]
  - When using TLS 1.1 or TLS 1.2, the first SSL_connect() may often
    return error, while subsequent requests work fine -- to mitigate
    this, try to SSL_connect() a little harder [2]

  Approved by:	maintainer timeout

  PR:	230680 [1], 230681 [2]

Comment 3 Alexey Dokuchaev freebsd_committer 2019-12-07 11:44:02 UTC
Should be fixed per ports r519200, thanks!