libgit2 / libgit2/libgit2sharp

LibGit2Sharp.Tests.FilterFixture.CanFilterLargeFiles failed

Aperta
#2,180 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We get always the exception for a blob-file that ... it could not be opened because it is being used by another process. This exception is thrown by the exception handler in filter.cs , Log.Write(LogLevel.Error, "Filter.StreamWriteCallback exception"); It seems that you rely on exclusive file access when using the stream writer (StreamWriteCallback) with the FileShare.None option. But that assumption may not be correct in this case. git_futils_open_ro opens the blob file in question (read mode), and the file is still open while the stream writer in C is starting. We could trace the file handle on Windows. We follow your advice and use the LibGit2TestPath environment variable to be sure that we have complete control over the output test folder, and we observed that Resource Monitor reports the blob file as being locked by the test engine itself. This is our call stack:

Image

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con LibGit2Sharp.Tests.FilterFixture.CanFilterLargeFiles ed esamina filter.cs, in particolare Filter.StreamWriteCallback e il percorso git_futils_open_ro descritto nel report. Riproduci il problema su Windows con LibGit2TestPath impostato, quindi traccia gli handle dei file e conferma che il test termina senza l’eccezione di file in uso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, git
Ambito
backend, testing-qa
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.