Hi,
The infinite loop protection in background_process_init() does not work properly. During installation, several calls are made to the background-process/check-token/:encode_detector URL. Unfortunately, the infinite loop protection only checks for paths matching "background-process/check-token", so there is currently an infinite loop during installation.
This is likely to cause all sorts of problems, depending on which of the 100's of check-token requests sets the service hosts configuration - explaining why I've seen my test site both successfully and unsuccessfully set the default service host.
The attached patch changes the infinite loop protection to look for paths starting with "background-process/check-token" instead, which seems to fix the problem.
Cheers,
Kevin
| Comment | File | Size | Author |
|---|---|---|---|
| background_process-infinite_loop.patch | 500 bytes | Kevin Rogers |
Comments
Comment #1
gielfeldt commentedHi Kevin
Hmmm. It doesn't seem like I can recreate the problem? What webserver are you using?
Comment #2
Kevin Rogers commentedHi,
This is on Apache, standard installs on both RHEL 5 and Ubuntu 13.10.
A quick debugging session showed that on line 327 $_GET['q'] is set to "background-process/check-token/%3Aencode_detector" for multiple requests. This makes sense, as the background_process_determine_default_service_host() function generates URLs with this path.
Without my patch, I see 148 requests with the above value for $_GET['q'] and a server reached MaxClients setting error too. With my patch, I see just two or three requests with $_GET['q'] set to this value. I would expect the latter behaviour based on what this code is trying to do.
Comment #3
gielfeldt commentedCommitted to 6.x-1.x and 7.x-1.x.