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

closed connection on pull causes service crash #7896

Closed
vrothberg opened this issue Oct 2, 2020 · 3 comments · Fixed by #7899
Closed

closed connection on pull causes service crash #7896

vrothberg opened this issue Oct 2, 2020 · 3 comments · Fixed by #7899
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@vrothberg
Copy link
Member

vrothberg commented Oct 2, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Cancelling the remote client while pulling causes the service to crash.

Steps to reproduce the issue:

  1. podman-remote pull $image

  2. Kill podman-remote

Describe the results you received:

podman (journald) $ podman system service -t0                                                                                                                                                                                  
panic: send on closed channel                                                                                                                                                                                                  
                                                                                                                                                                                                                               
goroutine 67 [running]:                                                                                                                                                                                                        
panic(0x560895061980, 0x56089526bb20)                                                                                                                                                                                          
        /usr/lib/golang/src/runtime/panic.go:1064 +0x470 fp=0xc00017a750 sp=0xc00017a698 pc=0x560893a17b90                                                                                                                     
runtime.chansend(0xc0001a6720, 0xc00017a840, 0x1, 0x560894bb29f2, 0x560893a68474)                                                                                                                                              
        /usr/lib/golang/src/runtime/chan.go:204 +0x5f1 fp=0xc00017a7d0 sp=0xc00017a750 pc=0x5608939e7431                                                                                                                       
runtime.chansend1(0xc0001a6720, 0xc00017a840)                                                                                                                                                                                  
        /usr/lib/golang/src/runtime/chan.go:143 +0x35 fp=0xc00017a808 sp=0xc00017a7d0 pc=0x5608939e6e35                                                                                                                        
github.com/containers/podman/pkg/channel.(*writeCloser).Write(0xc000268e20, 0xc00050a280, 0x57, 0xa0, 0x2, 0x2, 0x5608939ec8bd)                                                                                                
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/pkg/channel/writer.go:43 +0xd2 fp=0xc00017a868 sp=0xc00017a808 pc=0x560894bb29f2                                                            
fmt.Fprintf(0x7f8660ff2a78, 0xc000268e20, 0x560894c99e7c, 0xe, 0xc00017a9d0, 0x2, 0x2, 0xc000a00120, 0x1e, 0x18)                                                                                                               
        /usr/lib/golang/src/fmt/print.go:205 +0xa7 fp=0xc00017a8d0 sp=0xc00017a868 pc=0x560893ad2d47                                                                                                                           
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*copier).Printf(...)                                                                                                                                  
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:711                                                                                      
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*copier).createProgressBar(0xc000568000, 0xc0001a6540, 0xc000a81cc0, 0x47, 0x5d5, 0x0, 0x0, 0x0, 0x0, 0xc00054f320, ...)                              
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:1004 +0x6a8 fp=0xc00017aa20 sp=0xc00017a8d0 pc=0x560894455b68                            
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*copier).copyConfig.func1(0xc000568000, 0x5608952cc8a0, 0xc00063a740, 0xc000a81cc0, 0x47, 0x5d5, 0x0, 0x0, 0x0, 0x0, ...)                             
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:1021 +0x128 fp=0xc00017abb8 sp=0xc00017aa20 pc=0x56089445d6a8                            
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*copier).copyConfig(0xc000568000, 0x5608952cc8a0, 0xc00063a740, 0x5608952e5120, 0xc00019cf40, 0x600, 0xc000990680)                                    
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:1028 +0x14f fp=0xc00017adc8 sp=0xc00017abb8 pc=0x56089445614f                            
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*imageCopier).copyUpdatedConfigAndManifest(0xc00058b200, 0x5608952cc8a0, 0xc00063a740, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5608952e53a0, 0xc000566000, ...)    
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:935 +0x20c fp=0xc00017b040 sp=0xc00017adc8 pc=0x560894454ccc                             
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.(*copier).copyOneImage(0xc000568000, 0x5608952cc8a0, 0xc00063a740, 0xc000620ca0, 0xc000510480, 0xc00067ca80, 0xc00067cb40, 0x0, 0x0, 0x0, ...)         
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:646 +0x687 fp=0xc00017b3a0 sp=0xc00017b040 pc=0x560894451a87                             
github.com/containers/podman/vendor/github.com/containers/image/v5/copy.Image(0x5608952cc8a0, 0xc00063a740, 0xc000620ca0, 0x5608952dd200, 0xc0001a6900, 0x5608952dd920, 0xc000268ee0, 0xc000510480, 0x0, 0x0, ...)             
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/image/v5/copy/copy.go:308 +0x7c5 fp=0xc00017b738 sp=0xc00017b3a0 pc=0x56089444dba5                             
github.com/containers/podman/libpod/image.(*Runtime).doPullImage.func2(0x74, 0xc000426380)                                                                                                                                     
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/libpod/image/pull.go:348 +0x78 fp=0xc00017b7b8 sp=0xc00017b738 pc=0x5608948b5af8                                                            
github.com/containers/podman/vendor/github.com/containers/common/pkg/retry.RetryIfNecessary(0x5608952cc8a0, 0xc00063a740, 0xc00017bb20, 0xc00017be00, 0x74, 0x0)                                                               
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/vendor/github.com/containers/common/pkg/retry/retry.go:27 +0x42 fp=0xc00017b8c8 sp=0xc00017b7b8 pc=0x5608943da702                           
github.com/containers/podman/libpod/image.(*Runtime).doPullImage(0xc00009eff0, 0x5608952cc8a0, 0xc00063a740, 0xc000240700, 0xc00011a8a0, 0x1, 0x1, 0x0, 0x0, 0x0, ...)                                                         
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/libpod/image/pull.go:347 +0x445 fp=0xc00017bb90 sp=0xc00017b8c8 pc=0x5608948af0a5                                                           
github.com/containers/podman/libpod/image.(*Runtime).pullImageFromHeuristicSource(0xc00009eff0, 0x5608952cc8a0, 0xc00063a740, 0xc000530460, 0x61, 0x7f8660ff2a78, 0xc000268e20, 0xc00011c880, 0x1c, 0x560894cb1db6, ...)       
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/libpod/image/pull.go:281 +0x471 fp=0xc00017bd38 sp=0xc00017bb90 pc=0x5608948ae111                                                           
github.com/containers/podman/libpod/image.(*Runtime).New(0xc00009eff0, 0x5608952cc8a0, 0xc00063a740, 0xc000530460, 0x61, 0x0, 0x0, 0xc00011c880, 0x1c, 0x7f8660ff2a78, ...)                                                    
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/libpod/image/image.go:165 +0x25c fp=0xc00017be50 sp=0xc00017bd38 pc=0x5608948994bc                                                          
github.com/containers/podman/pkg/api/handlers/libpod.ImagesPull.func1(0xc000268e70, 0xc000718d00, 0x5608952cc8a0, 0xc00063a740, 0xc00011c880, 0x1c, 0x5608952ba960, 0xc000268e20, 0xc0001a65a0, 0x5608952ba960, ...)           
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/pkg/api/handlers/libpod/images_pull.go:131 +0x1a6 fp=0xc00017bf68 sp=0xc00017be50 pc=0x560894bf3fe6                                         
runtime.goexit()                                                                                                                                                                                                               
        /usr/lib/golang/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00017bf70 sp=0xc00017bf68 pc=0x560893a4f141                                                                                                                    
created by github.com/containers/podman/pkg/api/handlers/libpod.ImagesPull                                                                                                                                                     
        /builddir/build/BUILD/podman-2.1.1/_build/src/github.com/containers/podman/pkg/api/handlers/libpod/images_pull.go:127 +0x9e5                                                                                           

Describe the results you expected:

The service should handle closed connections.

Output of podman version:

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.15.1
Built:        Wed Sep 30 21:16:09 2020
OS/Arch:      linux/amd64

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 2, 2020
@vrothberg
Copy link
Member Author

@jwhonce PTAL

@vrothberg
Copy link
Member Author

#7899 did not fix the issue, so I'll reopen.

@vrothberg vrothberg reopened this Oct 5, 2020
@vrothberg
Copy link
Member Author

My bad. I tested the wrong binary.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants