[
https://issues.apache.org/jira/browse/TS-4309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15305267#comment-15305267
]
ASF GitHub Bot commented on TS-4309:
------------------------------------
Github user oknet commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/629#discussion_r64986856
--- Diff: iocore/net/SSLNetVConnection.cc ---
@@ -193,131 +193,121 @@ ssl_read_from_net(SSLNetVConnection *sslvc, EThread
*lthread, int64_t &ret)
{
NetState *s = &sslvc->read;
MIOBufferAccessor &buf = s->vio.buffer;
- IOBufferBlock *b = buf.writer()->first_write_block();
int event = SSL_READ_ERROR_NONE;
int64_t bytes_read = 0;
- int64_t block_write_avail = 0;
ssl_error_t sslErr = SSL_ERROR_NONE;
int64_t nread = 0;
bool trace = sslvc->getSSLTrace();
Debug("ssl", "trace=%s", trace ? "TRUE" : "FALSE");
- for (bytes_read = 0; (b != 0) && (sslErr == SSL_ERROR_NONE); b =
b->next.get()) {
- block_write_avail = b->write_avail();
+ bytes_read = 0;
+ while (sslErr == SSL_ERROR_NONE) {
+ int64_t block_write_avail = buf.writer()->block_write_avail();
+ if (block_write_avail <= 0) {
+ buf.writer()->add_block();
+ block_write_avail = buf.writer()->block_write_avail();
+ if (block_write_avail <= 0) {
+ Warning("Cannot add new block");
+ break;
+ }
+ }
--- End diff --
I believe these code will read SSL data until meet EAGAIN. How to handle a
SSL flood attack ? a fast socket keeps sending and keeps call SSLReadBuffer and
add_block() there no chance to return to NetHandler::manNetEvent() to
processing next NetVC.
> Reduced SSL upload/download speed after event loop change (TS-4260)
> -------------------------------------------------------------------
>
> Key: TS-4309
> URL: https://issues.apache.org/jira/browse/TS-4309
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Reporter: Susan Hinrichs
> Assignee: Susan Hinrichs
> Fix For: 7.0.0
>
>
> With the Eventloop changes of TS-4260 there are fewer spurious event loop
> kicks. This reveals stalls during upload and download on a lightly loaded
> system. Tidying up the net read/write loops and reactivating a never
> triggered signal fixed the problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)