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: send on closed channel #71

Open
popey opened this issue Mar 26, 2024 · 1 comment
Open

panic: send on closed channel #71

popey opened this issue Mar 26, 2024 · 1 comment

Comments

@popey
Copy link
Contributor

popey commented Mar 26, 2024

πŸ‘‹

I ran grant check against a folder which contains an installation of Android Studio. It ran for a while then crashed.

android-studio                                                                                                                                                                                
 β ‡ Checking licenses  ━━━━━━━━━━━━━━━━━━━━                                                                                                                                                    
panic: send on closed channel                                                                                                                                                                 
                                                                                                                                                                                              
goroutine 11434 [running]:                                                                                                                                                                    
github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses.func1.1()                                                                         
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:86 +0x39                                                              
github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses.func1({0xc004b69c00?, 0xc00716c900?})                                             
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:91 +0xab                                                              
created by github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses in goroutine 11433
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:96 +0x165                  

Steps to reproduce

  1. On a system which supports snap (such as Ubuntu), install Android Studio

snap install android-studio

(it's a classic (unconfined) snap, so it will need --classic passed on the above command)

  1. Run grant against the installed application

grant check /snap/android-studio/current/

Expected results

I'd expect grant check to produce a list of licenses.

Actual results

The run crashed:

panic: send on closed channel                                                                                                                                                                 
                                                                                                                                                                                              
goroutine 11434 [running]:                                                                                                                                                                    
github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses.func1.1()                                                                         
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:86 +0x39                                                              
github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses.func1({0xc004b69c00?, 0xc00716c900?})                                             
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:91 +0xab                                                              
created by github.com/google/licenseclassifier/v2/tools/identify_license/backend.(*ClassifierBackend).ClassifyLicenses in goroutine 11433
        /home/runner/go/pkg/mod/github.com/google/licenseclassifier/v2@v2.0.0/tools/identify_license/backend/backend.go:96 +0x165        
@spiffcs
Copy link
Collaborator

spiffcs commented Mar 26, 2024

Oh no! I'm so sorry about this. Let me check why this is showing a panic for android. Thanks for the report and I'll make sure to add it into our test cases going forward =(

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

No branches or pull requests

2 participants