Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Nov 2020 at 12:34 UTC
Updated:
23 Jul 2026 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
klausiOpened merge request with the proposed try/finally block.
Comment #4
raman.b commentedExpanded test coverage for
\Drupal\Tests\rest\Functional\FileUploadResourceTestBase::testFileUploadLargerFileSize()to emulate steps to reproduce from IS. But couldn't get a failing test caseComment #5
wim leersWoah, nice catch!
Comment #6
dwwAlas, I pointed out exactly the same at #2940383-59: [META] Unify file upload logic of REST and JSON:API.3. I should have opened a bug report about it in rest.module when I noticed that. Sorry!
Comment #7
dwwI guess this is a REST plugin provided by file.module, so restoring the component. ;)
I'm sorta reluctant to +1 this, even though it's a bug, since we're trying to unify all this code at #2940383: [META] Unify file upload logic of REST and JSON:API and this is a big diff to conflict with that. But given the track record on how long #2940383 is taking, the pragmatic thing is probably to fix this as a stand-alone bug and then we'll have to re-roll #2940383 again.
Regardless, this still needs a (failing) test that shows the underlying bug. I think we'd need to be explicitly checking that the lock is still around. That's not going to show up with the kinds of assertions being added in #4...
Comment #13
kim.pepperI suspect this is not a bug since we always release locks at the end of a request with a shutdown function.
See https://git.drupalcode.org/project/drupal/blob/e0b4b7ef6e6997d9446e60486...
Comment #14
kim.pepperSince this issue was created, we moved implementation to the common FileUploadHandler which now handles locking in a finally block.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/...
I think we can close this issue. Please re-open if you think otherwise.