Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6104

Potential FD double close in libevent's implementation of `sendfile`.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.27.3, 0.28.2, 1.0.1
    • 0.28.3, 1.0.2, 1.1.0
    • webui
    • Mesosphere Sprint 41, Mesosphere Sprint 42
    • 3

    Description

      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:

      LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
      

      3) Run two instances of this python script repeatedly:

      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)
      

      i.e.

      while python test.py; do :; done & while python test.py; do :; done
      

      Attachments

        Issue Links

          Activity

            People

              kaysoky Joseph Wu
              kaysoky Joseph Wu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: