You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "tdiesler (via GitHub)" <gi...@apache.org> on 2024/04/03 12:30:10 UTC

[PR] fatal error: concurrent map read and map write [camel-k]

tdiesler opened a new pull request, #5317:
URL: https://github.com/apache/camel-k/pull/5317

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd merged PR #5317:
URL: https://github.com/apache/camel-k/pull/5317


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "tdiesler (via GitHub)" <gi...@apache.org>.
tdiesler commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2044460228

   This is now failing with https://issues.redhat.com/browse/CMLK-1928


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "tdiesler (via GitHub)" <gi...@apache.org>.
tdiesler commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2044335428

   PR validation fails in `kamel-build-bundle/build-index-image.sh` for install/olm and install/upgrade
   
   ```
   Constructing index image ...
   time="2024-04-09T07:25:46Z" level=fatal msg="package \"camel-k\" has duplicate bundle \"camel-k-operator.v2.3.0\""
   Error: Process completed with exit code 1.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2044471601

   > This is now failing with https://issues.redhat.com/browse/CMLK-1928
   
   It was already reported in https://github.com/apache/camel-k/issues/5326


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "tdiesler (via GitHub)" <gi...@apache.org>.
tdiesler commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2042334426

   There are (currently) three usages of apis.AddToScheme
   
   * when there is an error on operator startup
   * with some "fake" client while testing
   * whenever a client with config is needed
   
   I ignored the first two and believe it is correct to sync in NewClientWithConfig which IMHO is close enough to `runtime.SchemeBuilder.AddToScheme` where the problem actually is. The idea is, that it is probably ok to sync the creation  of a non-trivial k8s client, which apparently does work sensitive to concurrency issues. At the same time, I assume that creation of such a client is fast enough that it does not need to happen in parallel on the same Go runtime.
   
   Sure, lets try to remove that other mutex


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fatal error: concurrent map read and map write [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5317:
URL: https://github.com/apache/camel-k/pull/5317#issuecomment-2037323925

   I tried to solve this in the E2E test setup (with mutex lock) where the clients get instantiated (see https://github.com/apache/camel-k/blob/main/e2e/support/test_support.go#L165). 
   
   But looking closer at the code I see that the kamel install command will always use a new client instance and this can lead to the concurrent map write. So the proposed solution here makes sense to me. I do not know if this synchronization has some other side effects though.
   
   How about synchronizing the `NewOutOfClusterClient` func which is used by kamel CLI so we do not harm any operator client usage? Also I would remove the mutex lock that I have introduced in the test support then to avoid duplicate locking.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org