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

Kamel install failure #2987

Closed
squakez opened this issue Feb 4, 2022 · 3 comments
Closed

Kamel install failure #2987

squakez opened this issue Feb 4, 2022 · 3 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@squakez
Copy link
Contributor

squakez commented Feb 4, 2022

I am trying to install in my local minikube using kamel version 1.8.0. The operator pod starts but suddenly breaks with following traces:

$ k logs -p camel-k-operator-7c96b9b6bd-x8b6c
{"level":"info","ts":1643969642.5568368,"logger":"cmd","msg":"maxprocs: Leaving GOMAXPROCS=[8]: CPU quota undefined"}
{"level":"info","ts":1643969642.5568504,"logger":"cmd","msg":"Go Version: go1.16"}
{"level":"info","ts":1643969642.556853,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1643969642.5568547,"logger":"cmd","msg":"Buildah Version: 1.14.0"}
{"level":"info","ts":1643969642.5568566,"logger":"cmd","msg":"Kaniko Version: 0.17.1"}
{"level":"info","ts":1643969642.5568583,"logger":"cmd","msg":"Camel K Operator Version: 1.8.0"}
{"level":"info","ts":1643969642.5568602,"logger":"cmd","msg":"Camel K Default Runtime Version: 1.11.0"}
{"level":"info","ts":1643969642.5568619,"logger":"cmd","msg":"Camel K Git Commit: 7586d7c28775de8328677ff14df2c58792299e21"}
{"level":"info","ts":1643969642.5770018,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":":8080"}
{"level":"info","ts":1643969642.5772111,"logger":"cmd","msg":"Configuring manager"}
{"level":"info","ts":1643969642.5818698,"logger":"cmd","msg":"Installing operator resources"}
fatal error: sync: unlock of unlocked mutex

goroutine 461 [running]:
runtime.throw(0x240c728, 0x1e)
	runtime/panic.go:1117 +0x72 fp=0xc0012b1d90 sp=0xc0012b1d60 pc=0x4385b2
sync.throw(0x240c728, 0x1e)
	runtime/panic.go:1103 +0x35 fp=0xc0012b1db0 sp=0xc0012b1d90 pc=0x46d1b5
sync.(*Mutex).unlockSlow(0x374f49c, 0xc0ffffffff)
	sync/mutex.go:196 +0xd8 fp=0xc0012b1dd8 sp=0xc0012b1db0 pc=0x47d478
sync.(*Mutex).Unlock(0x374f49c)
	sync/mutex.go:190 +0x48 fp=0xc0012b1df8 sp=0xc0012b1dd8 pc=0x47d388
sync.(*Once).doSlow(0x374f498, 0xc000c07f20)
	sync/once.go:70 +0x9a fp=0xc0012b1e48 sp=0xc0012b1df8 pc=0x47d59a
sync.(*Once).Do(...)
	sync/once.go:59
github.com/apache/camel-k/pkg/install.KameletCatalog.func1.1(0x0, 0x0)
	github.com/apache/camel-k/pkg/install/kamelets.go:98 +0x3f7 fp=0xc0012b1f78 sp=0xc0012b1e48 pc=0x1c582f7
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00075d380, 0xc000a41f80)
	golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup.go:57 +0x59 fp=0xc0012b1fd0 sp=0xc0012b1f78 pc=0x1a6fe59
runtime.goexit()

This is repeated as many times as we have Kamelets from default catalog, so, I have the feeling it relates to the change we did either in apache/camel-kamelets#754 or apache/camel-kamelets#755. Likely there is something not good when we try to install the kamelets with .template instead that .flow

@squakez squakez added the kind/bug Something isn't working label Feb 4, 2022
@squakez squakez added this to the 1.8.1 milestone Feb 4, 2022
@squakez
Copy link
Contributor Author

squakez commented Feb 4, 2022

Workaround while we fix the issue:

$ export KAMELET_CATALOG_DIR="/tmp/"
$ kamel install
OLM is not available in the cluster. Fallback to regular installation.
Camel K installed in namespace default
$ k get pods
NAME                                READY   STATUS    RESTARTS      AGE
camel-k-operator-7c96b9b6bd-x8b6c   1/1     Running   9 (16m ago)   32m

You can use any existing directory which has no kamelets defined in it

@squakez
Copy link
Contributor Author

squakez commented Feb 4, 2022

I think the problem was due to some old kamelet definition in my namespace. If I delete the kamelets, then the installation procedure won't show that problem.

@phantomjinx
Copy link
Contributor

Note:
The error fatal error: sync: unlock of unlocked mutex concerns the use of sync.Once in the kamelet loading code. Documentation recommends that sync.Once should not be re-assigned within the function that is being executed. This error is the result.

See #3063 and related PRs for modification of code to ameliorate this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants