Bug 14045 - git fetcher deadlock with self-referencing sub-modules
Summary: git fetcher deadlock with self-referencing sub-modules
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 3.4
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 4.2 M1
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-09-16 05:29 UTC by kenth.eriksson
Modified: 2022-11-20 11:32 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kenth.eriksson 2020-09-16 05:29:29 UTC
gitsm fetcher dead locks if submodule is self-referencing. The fetcher creates lock/done files in DL/git2 folder. Due to this design, it cannot handle repositories where submodule is a specific revision of the the parent repo.

As an example where a dead lock will happen, consider the following repository, https://github.com/gflags/gflags, where the doc folder is submodule of the parent repository.
Comment 1 Randy MacLeod 2020-09-17 07:37:10 UTC
We should add a check to avoid the deadlock.
Comment 3 Pavel Zhukov 2022-09-06 15:10:12 UTC
Resolved in https://git.openembedded.org/bitbake/commit/?id=0361ecf7eb82c386a9842cf1f3cb706c0a112e77

Test case added to cover possible regressions.
Comment 4 Jonathan Crockett 2022-10-13 17:23:30 UTC
This patch breaks cases where the parent repo matches the submodule except the submodule has additional chars to the repo name. 

E.g. parent is alpha and submodule is alpha-keys will now fail because the patch only looks at alpha not the end line, even though they are valid different repositories.
Comment 5 Randy MacLeod 2022-10-13 21:44:51 UTC
See Jonathan's comment.
Comment 8 Richard Purdie 2022-11-20 11:32:15 UTC
Thanks for the help Pavel!