typelevel / typelevel/cats-effect

Failed to register Cats Effect CPU starvation MBean

Open
#3,268 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:beetle: bug
Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

Some of our projects seem to be running into a non-deterministic error with Cats Effect 3.4.1:

[info]   [WARNING] Failed to register Cats Effect CPU starvation MBean, proceeding with
[info]   no-operation versions. You will not see MBean metrics for CPU starvation.
[info]   Exception follows: 
[info]    javax.management.NotCompliantMBeanException: MBean class cats.effect.metrics.CpuStarvation does not implement DynamicMBean, and neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class cats.effect.metrics.CpuStarvation is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: cats.effect.metrics.CpuStarvation: Class cats.effect.metrics.CpuStarvation is not a JMX compliant MXBean)
[info]   	at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:176)
[info]   	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:317)
[info]   	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Cats Effect CPU starvation MBean registration path and reproduce the javax.management.NotCompliantMBeanException with Cats Effect 3.4.1. Investigate why cats.effect.metrics.CpuStarvation is rejected by JMX; done means registration succeeds without the warning and CPU-starvation MBean metrics remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.