Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2010 at 07:26 UTC
Updated:
25 Aug 2014 at 20:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedyep, i agree with catch.
Comment #2
Anonymous (not verified) commentedhere's a patch for that. code in the patch tries to acquire the lock 10 times, then gives up and sends a "Serve Error" header.
Comment #4
Anonymous (not verified) commentedok, that fails because we no longer bail out and send a useless header if we don't get the lock first time.
i could just take that test out, but i want to replace it with something that tests the "another process is rebuilding so we failed to get the lock, but then we got the cache so its all good" scenario.
Comment #5
Anonymous (not verified) commentedhere's a patch without the test that relied on the old behaviour.
its hard to test the lock wait code without async http requests, so i've created this issue: #850782: allow testing lock code via async http calls.
Comment #7
Anonymous (not verified) commentedtake out the lock check in the test, as we don't create one anymore.
Comment #8
moshe weitzman commentedif ($lock_acquired === TRUE) {is usually too verbose. I didn't look into the logic completely though.A nice to have enhancement would be http headers like 'Image wait' and 'Image build' like we do for cache misses and builds at #802446: Cache stampede protection: drupal_render() and page cache.
Comment #9
Anonymous (not verified) commentedupdated #7 so it applies to HEAD.
Comment #11
Anonymous (not verified) commentedComment #12
mikran commented#7: image.lock_.wait_.patch queued for re-testing.
Comment #13
mikran commentedOops, I didn't mean to change anything or actually even re-test the old patch so reverting the status back.
Comment #14
Marco Vervoort commentedI encountered this bug when using the media plugin with CKEditor to insert a new thumbnail of an image into a text. On IE11 this resulted in an 'image not loaded' cross (not always, but more than 50% of the time). The randomness is probably related to timing issues (with the Developer console open the percentage dropped to about 30%).
To be quite honest, it is a bit strange that the first request for a not-yet-existing thumbnail yields a 'HTTP 200' response (albeit after a possibly lengthy delay), and that subsequent requests yield an immediate 'HTTP 503' response (as long as the image is still being generated). It doesn't feel consistent. Does anybody know whether this behaviour was intended, and if so, what the reason was?
In order to solve my immediate problem while changing as little as possible, I've modified image.module so that the code waits 3 seconds for the image to appear, by adding
This feelds like it shouldn't have negative side-effects. But an official patch to resolve this issue more thoroughly would be appreciated.
Comment #15
randallknutson commentedRan into this as well with the media module and ckeditor. It has something to do with IE seeing the image twice and requesting it too quickly. The easiest patch is to fix this response with the code from #14. I made a patch so it can be applied in a make file.