pinpoint-apm/pinpoint · error · InstrumentException

Signature miss match. method=${methodName}, source=${sourceD

Error message

Signature miss match. method=${methodName}, source=${sourceDesc}, advice=${adviceDesc}

What it means

When copying a pointcut method, the source method's descriptor (parameter/return types in JVM internal form) must exactly equal the advice pointcut method's descriptor. A mismatch means the join point's signature changed, and weaving would produce invalid bytecode, so InstrumentException is thrown showing both descriptors.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java:117

            classNode.copyMethod(methodNode);
        }
    }

    private void copyPointCutMethods(final MethodNodes methodNodes, final ASMClassNodeAdapter classNode) throws InstrumentException {
        final ASMMethodInsnNodeRemapper.Builder remapBuilder = new ASMMethodInsnNodeRemapper.Builder();
        for (ASMMethodNodeAdapter joinPointMethodNode : methodNodes.jointPoints) {
            remapBuilder.addFilter(null, joinPointMethodNode.getName(), joinPointMethodNode.getDesc());
        }

        for (ASMMethodNodeAdapter pointCutMethodNode : methodNodes.pointCuts) {
            final ASMMethodNodeAdapter sourceMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc());
            if (sourceMethodNode == null) {
                throw new InstrumentException("not found method. " + classNode.getInternalName() + "." + pointCutMethodNode.getName());
            }

            if (!sourceMethodNode.getDesc().equals(pointCutMethodNode.getDesc())) {
                throw new InstrumentException("Signature miss match. method=" + pointCutMethodNode.getName() + ", source=" + sourceMethodNode.getDesc() + ", advice=" + pointCutMethodNode.getDesc());
            }

            if (logger.isInfoEnabled()) {
                logger.info("weaving method={}{}", sourceMethodNode.getName(), sourceMethodNode.getDesc());
            }

            // rename.
            final String methodName = this.methodNameReplacer.replaceMethodName(sourceMethodNode.getName());
            sourceMethodNode.rename(methodName);
            // set private.
            sourceMethodNode.setAccess(sourceMethodNode.getAccess() & -6 | Opcodes.ACC_PRIVATE);
            // copy.
            classNode.copyMethod(pointCutMethodNode);

            // remap
            final ASMMethodNodeAdapter newMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc());
            if (newMethodNode == null) {
                throw new InstrumentException("not found new method. " + classNode.getInternalName() + "." + pointCutMethodNode.getName());

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Update the advice pointcut method signature to match the new source descriptor
  2. Pin the target library to the version matching the advice's expected signature
  3. Regenerate the advice class for the upgraded target version
  4. Compare descriptors with javap to see the exact type difference

Example fix

// before
public void interceptor_before(Object arg1) { ... }
// after
public void interceptor_before(Object arg1, Object arg2) { ... }
Defensive patterns

Strategy: validation

Validate before calling

ASMMethodNodeAdapter src = sourceClassNode.getDeclaredMethod(name, desc);
if (src != null && !src.getDesc().equals(adviceDesc)) { throw new IllegalArgumentException("signature drift on " + name); }

Try / catch

try { weaver.weaving(src, adv); } catch (InstrumentException e) { if (e.getMessage().startsWith("Signature miss match")) { logger.error("update advice signature: {}", e.getMessage()); } }

Prevention

When it happens

Trigger: Source class method with the matching name has a different parameter list or return type than the advice's pointcut method — e.g. a dependency upgrade changed the intercepted method's signature.

Common situations: Library upgrade added/changed parameters of the intercepted method; advice compiled against an older API version; generics/boxing differences in the declared descriptor.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/5ac750c1b6a8357b. Report an issue: GitHub.