golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
121.07k stars 17.36k forks source link

io: Copy leaves file zero bytes in Azure with CIFS #67806

Open jack-edgar-bi opened 4 weeks ago

jack-edgar-bi commented 4 weeks ago

Go version

1.22.3

Output of go env in your module/workspace:

I'm using the golang:1.22.3 Docker image.

What did you do?

Please see #42400 but I am still seeing this issue with v1.22.3, when using an Azure Container Apps mount, which runs on AKS and uses a CIFS share.

What did you see happen?

Please see #42400, but essentially no bytes are written to the target file, even after flush/close. The file is successfully created, but io.copy transfers no contents.

What did you expect to see?

The file should be populated, which does occur for the same application when run locally.

mknyszek commented 3 weeks ago

Unfortunately without additional information it's difficult to discern what the problem is exactly, especially if it seems to work fine for you locally.

Note that io.Copy is just using the Read and Write methods of its arguments. If one of them is specific to the Azure SDK, it's unlikely to be a Go project issue. (io.Copy is not a very complex function, and it has not changed recently, so I don't see why it wouldn't simply work, other than the Read and Write methods it's using have some problems.)