Joseph Wu created MESOS-6104:
--------------------------------

             Summary: Potential FD double close in libevent's implementation of 
`sendfile`.
                 Key: MESOS-6104
                 URL: https://issues.apache.org/jira/browse/MESOS-6104
             Project: Mesos
          Issue Type: Bug
          Components: webui
    Affects Versions: 1.0.1
            Reporter: Joseph Wu
            Assignee: Joseph Wu
            Priority: Critical


Repro copied from: https://reviews.apache.org/r/51509/

It is possible to make the master CHECK fail by repeatedly hitting the web UI 
and reloading the static assets:

1) Paste lots of text (16KB or more) of text into 
`src/webui/master/static/home.html`.  The more text, the more reliable the 
repro.

2) Start the master with SSL enabled:
{code}
LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem 
LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
{code}

3) Run two instances of this python script repeatedly:
{code}
import socket
import ssl

s = ssl.wrap_socket(socket.socket())
s.connect(("localhost", 5050))

s.sendall("""GET /static/home.html HTTP/1.1
User-Agent: foobar
Host: localhost:5050
Accept: */*
Connection: Keep-Alive

""")

# The HTTP part of the response
print s.recv(1000)
{code}

i.e. 
{code}
while python test.py; do :; done & while python test.py; do :; done
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to