libgit2 / libgit2/libgit2sharp
throw LibGit2SharpException or repo.Head.TIp==null while parallel
未關閉
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Updated. Code simplified
// use LibGit2Sharp.0.16.0.0 from nuget
// https://github.com/torvalds/linux
var gitpath = @"path/to/linux/source";
var times = 10;
for (int i = 0; i < times; i++)
{
Task.Run(() =>
{
using (var repo = new Repository(gitpath))
{
// sometimes throw LibGit2SharpException here
// An exception of type 'LibGit2Sharp.LibGit2SharpException' occurred in LibGit2Sharp.dll but was not handled in user code
// Additional information: An error was raised by libgit2. Category = Os (Error).
// Failed to mmap. No data written: Not enough storage is available to process this command.
foreach (var commit in repo.Commits)
{
}
}
});
}
while (true)
{
using (var repo = new Repository(gitpath))
{
// sometimes repo.Head.Tip == null
repo.Head.Tip.ToString();
}
}
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先使用 Repository(gitpath)、repo.Commits 和 repo.Head.Tip 進行平行重現,然後使用 LibGit2Sharp 0.16.0.0 在 Linux repository 上執行。調查並行建構或存取 repository 是否會導致 mmap 失敗和 null tip;當回報的平行操作不再產生這兩種現象中的任何一種時,即視為完成;如果專案有合適的測試位置,則加入 regression test。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100