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 on download of file to /dev/null #368

Closed
jhiemstrawisc opened this issue Nov 10, 2023 · 1 comment · Fixed by #369
Closed

Panic on download of file to /dev/null #368

jhiemstrawisc opened this issue Nov 10, 2023 · 1 comment · Fixed by #369
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jhiemstrawisc
Copy link
Member

I ran pelican object copy /gluex/uconn1/rawdata/test/testFileSize1GB /dev/null and the first time it worked fine.

The second time I ran the command, I got this error:

EBUG[2023-11-10T15:45:58Z] Parsed Cache: http://stash-cache-shoveler.osgdev.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB 
DEBUG[2023-11-10T15:45:58Z] Transfers:                                   
DEBUG[2023-11-10T15:45:58Z] Constructed URL: http://stash-cache.osg.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB 
DEBUG[2023-11-10T15:45:58Z] Transfer URL String: http://stash-cache.osg.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB 
DEBUG[2023-11-10T15:45:58Z] Starting the HTTP transfer...                
null 0.00 b / 0.00 b [-----------------------------------------------------------------------------------------------------------------------------------------------------------------] 0s ] 0.00 b/s
null 976.56 MiB / 976.56 MiB [=================================================================================================================================================================] Done!
DEBUG[2023-11-10T15:45:58Z] Got error from file transfer                 
DEBUG[2023-11-10T15:45:58Z] Failed to download: transfer error: Unable to read /gluex/uconn1/rawdata/test/testFileSize1GB; permission denied 
DEBUG[2023-11-10T15:45:58Z] Constructed URL: http://sc-cache.chtc.wisc.edu:8000/gluex/uconn1/rawdata/test/testFileSize1GB 
DEBUG[2023-11-10T15:45:58Z] Transfer URL String: http://sc-cache.chtc.wisc.edu:8000/gluex/uconn1/rawdata/test/testFileSize1GB 
DEBUG[2023-11-10T15:45:58Z] Starting the HTTP transfer...                
panic: *mpb.Progress instance can't be reused after it's done

goroutine 119 [running]:
github.com/vbauerster/mpb/v8.(*Progress).MustAdd(...)
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:141
github.com/vbauerster/mpb/v8.(*Progress).New(0x10e12a0?, 0x1c264?, {0xffff9805e440?, 0x40009f8370?}, {0x4000ac4a70, 0x2, 0x2})
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:131 +0x84
github.com/vbauerster/mpb/v8.(*Progress).AddBar(0x40002adc20?, 0x17c4e48?, {0x4000ac4a70, 0x2, 0x2})
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:121 +0x124
github.com/pelicanplatform/pelican/client.DownloadHTTP({{{0x111ff2b, 0x4}, {0x0, 0x0}, 0x0, {0x400093c388, 0x1b}, {0xffffdb1b991d, 0x2a}, {0x0, ...}, ...}, ...}, ...)
        /workspaces/pelican/pelican/client/handle_http.go:515 +0x1f7c
github.com/pelicanplatform/pelican/client.startDownloadWorker({0xffffdb1b991d, 0x2a}, {0xffffdb1b9948, 0x9}, {0x0, 0x0}, {0x40002eca00, 0x3, 0x0?}, 0x0?, ...)
        /workspaces/pelican/pelican/client/handle_http.go:382 +0x2e0
created by github.com/pelicanplatform/pelican/client.download_http
        /workspaces/pelican/pelican/client/handle_http.go:332 +0x894
@jhiemstrawisc
Copy link
Member Author

After a very quick skim of the code, I think this is caused by the fact that the first cache we try returns a permission denied error, and when we try to download from the second cache, we end up using an already initialized and completed progress bar object.

@jhiemstrawisc jhiemstrawisc added the bug Something isn't working label Nov 10, 2023
@jhiemstrawisc jhiemstrawisc added this to the v7.3.0 milestone Nov 10, 2023
@joereuss12 joereuss12 linked a pull request Nov 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants