Skip to content

Flaky test: TestDumbSuite, TestUploadPackSuite and TestReceivePackSuite (Windows) #1954

@pjbgf

Description

@pjbgf

Bug Description

This test is failing intermittently:

Not a git repository: 'C:\Users\RUNNER~1\AppData\Local\Temp\TestReceivePackSuiteTestAdvertisedReferencesNotExists3690584143\001\go-git-http-55488/non-existent.git'
==================
WARNING: DATA RACE
Read at 0x00c000366020 by goroutine 367:
  internal/poll.(*FD).execIO()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/internal/poll/fd_windows.go:269 +0x284
  internal/poll.(*FD).Read()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/internal/poll/fd_windows.go:586 +0x353
  net.(*netFD).Read()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/fd_posix.go:68 +0x4a
  net.(*conn).Read()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/net.go:196 +0xac
  net/http.(*connReader).backgroundRead()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:702 +0x51
  net/http.(*connReader).startBackgroundRead.gowrap2()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:698 +0x2e

Previous write at 0x00c000366020 by goroutine 363:
  internal/poll.(*FD).setOffset()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/internal/poll/fd_windows.go:402 +0x6b9
  internal/poll.SendFile()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/internal/poll/sendfile_windows.go:71 +0x697
  net.sendFile.func1()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/sendfile.go:48 +0x64
  internal/poll.(*FD).RawRead()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/internal/poll/fd_windows.go:1275 +0x1ad
  os.(*rawConn).Read()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/os/rawconn.go:31 +0xb2
  net.sendFile()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/sendfile.go:47 +0x3cd
  net.(*TCPConn).readFrom()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/tcpsock_posix.go:51 +0x5b
  net.(*TCPConn).ReadFrom()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/tcpsock.go:165 +0x64
  net/http.(*response).ReadFrom()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:618 +0x671
  io.copyBuffer()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/io/io.go:415 +0x20e
  io.Copy()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/io/io.go:388 +0xc6
  io.CopyN()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/io/io.go:364 +0xa8
  net/http.serveContent()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/fs.go:429 +0x12f2
  net/http.serveFile()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/fs.go:761 +0x864
  net/http.(*fileHandler).ServeHTTP()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/fs.go:994 +0x18e
  net/http.serverHandler.ServeHTTP()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:3311 +0x2a1
  net/http.(*conn).serve()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:2073 +0xda4
  net/http.(*Server).Serve.gowrap3()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:3464 +0x46

Goroutine 367 (running) created at:
  net/http.(*connReader).startBackgroundRead()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:698 +0x16e
  net/http.(*conn).serve()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:2062 +0xd44
  net/http.(*Server).Serve.gowrap3()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:3464 +0x46

Goroutine 363 (running) created at:
  net/http.(*Server).Serve()
      C:/hostedtoolcache/windows/go/1.26.1/x64/src/net/http/server.go:3464 +0x889
  github.com/go-git/go-git/v6/plumbing/transport/http.setupServer.func1()
      D:/a/go-git/go-git/plumbing/transport/http/common_test.go:276 +0xd9
==================
Not a git repository: 'C:\Users\RUNNER~1\AppData\Local\Temp\TestUploadPackSuiteTestAdvertisedReferencesNotExists2737100274\001\go-git-http-55522/non-existent.git'
--- FAIL: TestDumbSuite (2.28s)
    --- FAIL: TestDumbSuite/TestFetchError (0.11s)
        testing.go:1712: race detected during execution of test
fatal: git upload-pack: not our ref 1111111111111111111111111111111111111111
--- FAIL: TestUploadPackSuite (6.33s)
    --- FAIL: TestUploadPackSuite/TestAdvertisedReferencesFilterUnsupported (0.13s)
        testing.go:1712: race detected during execution of test
--- FAIL: TestReceivePackSuite (6.47s)
    --- FAIL: TestReceivePackSuite/TestDefaultBranch (0.14s)
        testing.go:1712: race detected during execution of test
FAIL
FAIL	github.com/go-git/go-git/v6/plumbing/transport/http	6.507s
ok  	github.com/go-git/go-git/v6/plumbing/transport/ssh	10.999s
ok  	github.com/go-git/go-git/v6/plumbing/transport/ssh/knownhosts	11.405s
?   	github.com/go-git/go-git/v6/plumbing/transport/ssh/sshagent	[no test files]
?   	github.com/go-git/go-git/v6/storage	[no test files]
ok  	github.com/go-git/go-git/v6/storage/filesystem	113.402s
ok  	github.com/go-git/go-git/v6/storage/filesystem/dotgit	11.760s
?   	github.com/go-git/go-git/v6/storage/filesystem/mmap	[no test files]
ok  	github.com/go-git/go-git/v6/storage/memory	1.070s
ok  	github.com/go-git/go-git/v6/storage/tests	1.349s
ok  	github.com/go-git/go-git/v6/storage/transactional	1.079s
ok  	github.com/go-git/go-git/v6/tests/pack	1.194s
ok  	github.com/go-git/go-git/v6/utils/binary	1.084s
ok  	github.com/go-git/go-git/v6/utils/convert	1.065s
ok  	github.com/go-git/go-git/v6/utils/diff	1.093s
ok  	github.com/go-git/go-git/v6/utils/ioutil	1.077s
ok  	github.com/go-git/go-git/v6/utils/merkletrie	1.092s
ok  	github.com/go-git/go-git/v6/utils/merkletrie/filesystem	1.080s
ok  	github.com/go-git/go-git/v6/utils/merkletrie/index	1.060s
ok  	github.com/go-git/go-git/v6/utils/merkletrie/internal/frame	1.077s
ok  	github.com/go-git/go-git/v6/utils/merkletrie/internal/fsnoder	1.064s
ok  	github.com/go-git/go-git/v6/utils/merkletrie/noder	1.068s
ok  	github.com/go-git/go-git/v6/utils/sync	1.062s
ok  	github.com/go-git/go-git/v6/utils/trace	1.044s
?   	github.com/go-git/go-git/v6/x	[no test files]
ok  	github.com/go-git/go-git/v6/x/plugin	1.051s
ok  	github.com/go-git/go-git/v6/x/plugin/config	1.050s
ok  	github.com/go-git/go-git/v6/x/plumbing/worktree	4.336s
?   	github.com/go-git/go-git/v6/x/storage	[no test files]
FAIL
make: *** [Makefile:43: test] Error 1
Error: Process completed with exit code 1.

https://github.com/go-git/go-git/actions/runs/23886815099/job/69651265219?pr=1931

go-git Version

main

Steps to Reproduce

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions