Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: file already closed when setting AZCOPY_LOG_LOCATION env variable #1824

Closed
rpaz-qontigo opened this issue Jun 8, 2022 · 1 comment · Fixed by #1782
Closed

panic: file already closed when setting AZCOPY_LOG_LOCATION env variable #1824

rpaz-qontigo opened this issue Jun 8, 2022 · 1 comment · Fixed by #1782

Comments

@rpaz-qontigo
Copy link

Which version of the AzCopy was used?

azcopy_windows_amd64_10.15.0

Note: The version is visible when running AzCopy without any argument

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

azcopy.exe copy $source $destination$SASToken --recursive --log-level=WARNING --check-length=false --from-to LocalFile --overwrite ifSourceNewer

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

What problem was encountered?

When setting the environment variable env.AZCOPY_LOG_LOCATION to a relative folder inside a build server (can confirm the process has permissions to write, and there are many jobs passing)

panic: close azcopylogs/e35398bc-7b26-f443-6056-d40dead60bf0.log: file already closed
Error message: panic: close azcopylogs/e35398bc-7b26-f443-6056-d40dead60bf0.log: file already closed
goroutine 1 [running]:
github.com/Azure/azure-storage-azcopy/v10/common.PanicIfErr(...)
/home/vsts/work/1/s/common/lifecyleMgr.go:674
github.com/Azure/azure-storage-azcopy/v10/common.(*jobLogger).CloseLog(0xc000111a40)
/home/vsts/work/1/s/common/logger.go:168 +0xb6
github.com/Azure/azure-storage-azcopy/v10/ste.(*jobMgr).CloseLog(0xc000352380)
/home/vsts/work/1/s/ste/mgr-JobMgr.go:671 +0x2a
github.com/Azure/azure-storage-azcopy/v10/jobsAdmin.ListJobs(0x64)
/home/vsts/work/1/s/jobsAdmin/init.go:766 +0x3cd
github.com/Azure/azure-storage-azcopy/v10/cmd.inprocSend({0x1581342, 0x8}, {0x1511200, 0x1d9b9c0}, {0x13c5be0, 0xc0004547b0})
/home/vsts/work/1/s/cmd/rpc.go:50 +0x2b8
github.com/Azure/azure-storage-azcopy/v10/cmd.glob..func6({0x1581342, 0x17411f0}, {0x1511200, 0x1d9b9c0}, {0x13c5be0, 0xc0004547b0})
/home/vsts/work/1/s/cmd/rpc.go:36 +0x32
github.com/Azure/azure-storage-azcopy/v10/cmd.HandleListJobsCommand(0x45cdfc)
/home/vsts/work/1/s/cmd/jobsList.go:87 +0x68

How can we reproduce the problem in the simplest way?

You can run azcopy with the environment log variable set to a path other than default

Have you found a mitigation/solution?

The default log path is working

@nakulkar-msft
Copy link
Member

Fixed in 10.16.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants