** Description changed:

+ [ Impact ]
+ 
+ Apache2 users with mod_http2 enabled can face problems when the
+ MaxRequestsPerChild limit is reached.  In this scenario, apache2 will
+ send a GOAWAY packet too early in the connection, which will cause no
+ data to be transferred to the client (i.e., an empty HTTP response from
+ the server).
+ 
+ [ Test Plan ]
+ 
+ This problem reproduces on Bionic, Focal and Impish.  The instructions
+ are almost the same for all 3, but on Bionic an extra step is necessary
+ to make sure apache2 will use HTTP2.
+ 
+ $ lxc launch ubuntu-daily:focal bug1969629-focal
+ $ lxc shell bug1969629-focal
+ # apt update
+ # apt install -y apache2
+ # a2enmod http2
+ # [ $(lsb_release -sc) = "bionic" ] && (echo -e "\nProtocols h2 h2c http/1.1" 
>> /etc/apache2/apache2.conf)
+ # cat > /etc/apache2/mods-available/mpm_event.conf << __EOF__
+ <IfModule mpm_event_module>
+         StartServers 2
+         MaxRequestsPerChild 3
+ </IfModule>
+ __EOF__
+ # systemctl restart apache2.service
+ # while true; do if [[ $(curl -o /dev/null -s -k --http2 http://localhost/ -w 
'%{size_download}') == 0 ]]; then echo "BUG DETECTED"; break; fi; done
+ BUG DETECTED
+ 
+ The "while" command above should never stop, but as can be seen, it does
+ stop because the size of the downloaded file (index.html, in this case)
+ is zero.  This can also be confirmed by looking at the server logs:
+ 
+ 127.0.0.1 - - [26/Apr/2022:20:13:46 +0000] "GET / HTTP/1.1" 101 125 "-" 
"curl/7.58.0"
+ 127.0.0.1 - -  "GET / HTTP/2.0" 200 0 "-" "curl/7.58.0"
+ 
+ [ Where problems could occur ]
+ 
+ Even though the patch is relatively simple, it touches an area that can
+ be a bit complex: session processing of an HTTP request.  There are
+ upstream tests that exercise this area and I believe we can be
+ reasonably confident that this change does the right thing.  If a
+ regression is to occur, it would likely manifest in the form of a bug in
+ the HTTP2 session handling, and the quicker solution here would be to
+ revert the change while revisiting the patch to determine what went
+ wrong (possibly with upstream help).
+ 
+ [ Original Description ]
+ 
  We run into a bug in mod_http2 for Apache 2.4.x.
  
  Every time MaxRequestsPerChild is reached, an empty response is sent to the 
client:
  https://bz.apache.org/bugzilla/show_bug.cgi?id=65731
  
  This bug was fixed and backported to v2.4.52:
  https://github.com/apache/httpd/pull/281
  
  Any chance that this fix get backported to the Bionic and Focal Package?

** Changed in: apache2 (Ubuntu Bionic)
     Assignee: (unassigned) => Sergio Durigan Junior (sergiodj)

** Changed in: apache2 (Ubuntu Focal)
     Assignee: (unassigned) => Sergio Durigan Junior (sergiodj)

** Changed in: apache2 (Ubuntu Impish)
     Assignee: (unassigned) => Sergio Durigan Junior (sergiodj)

** Changed in: apache2 (Ubuntu Bionic)
       Status: Triaged => In Progress

** Changed in: apache2 (Ubuntu Focal)
       Status: Triaged => In Progress

** Changed in: apache2 (Ubuntu Impish)
       Status: Triaged => In Progress

** Bug watch added: bz.apache.org/bugzilla/ #65731
   https://bz.apache.org/bugzilla/show_bug.cgi?id=65731

** Also affects: apache2 via
   https://bz.apache.org/bugzilla/show_bug.cgi?id=65731
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1969629

Title:
  Apache 2.4.x: mod_http2 sends empty response after MaxRequestsPerChild

To manage notifications about this bug go to:
https://bugs.launchpad.net/apache2/+bug/1969629/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to