{"record":{"id":"a0a6b4358f13e7f3","repo":"pinpoint-apm/pinpoint","slug":"invalid-from-usernode-a0a6b4","errorCode":null,"errorMessage":"Invalid from UserNode:{}","messagePattern":"Invalid from UserNode:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/histogram/SimplifiedNodeHistogramFactory.java","lineNumber":88,"sourceCode":"                    find = new Histogram(histogram.getServiceType());\n                    agentHistogramMap.put(histogram.getId(), find);\n                }\n                find.add(histogram.getHistogram());\n            }\n        }\n        return agentHistogramMap;\n    }\n\n    @Override\n    public NodeHistogram createUserNodeHistogram(Application userApplication, Range range, LinkList linkList) {\n        // for User nodes, find its source link and create the histogram\n        final List<Link> fromLink = linkList.findFromLink(userApplication);\n        if (fromLink.isEmpty()) {\n            logger.warn(\"from UserNode not found:{}\", userApplication);\n            return createEmptyNodeHistogram(userApplication, range);\n        } else if (fromLink.size() > 1) {\n            // log and use first(0) link.\n            logger.warn(\"Invalid from UserNode:{}\", linkList.getLinkList());\n        }\n        final Link sourceLink = fromLink.get(0);\n\n        NodeHistogram.Builder builder = NodeHistogram.newBuilder(userApplication, range);\n        builder.setApplicationHistogram(sourceLink.getHistogram());\n        return builder.build();\n    }\n\n    @Override\n    public NodeHistogram createQueueNodeHistogram(Application queueApplication, Range range, LinkList linkList) {\n        final List<Link> toLinkList = linkList.findToLink(queueApplication);\n        if (toLinkList.isEmpty()) {\n            return NodeHistogram.empty(queueApplication, range);\n        }\n\n        // create applicationHistogram\n        final Histogram applicationHistogram = new Histogram(queueApplication.getServiceType());\n        for (Link link : toLinkList) {","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/histogram/SimplifiedNodeHistogramFactory.java#L70-L106","documentation":"The 'Invalid from UserNode' case in SimplifiedNodeHistogramFactory.createUserNodeHistogram: more than one incoming link exists for the User node. The factory logs the full link list and falls back to using the first link (index 0) as the histogram source, so the simplified histogram is built from an arbitrary duplicate link.","triggerScenarios":"Calling SimplifiedNodeHistogramFactory.createUserNodeHistogram(userApplication, range, linkList) when findFromLink(userApplication).size() > 1 — duplicated USER->APP links present in the LinkList for the same user application and range.","commonSituations":"Simplified map mode after merging map data from multiple sources that each emitted a user link; duplicated user links from repeated link-append runs; LinkList assembled from overlapping time ranges producing two user links.","solutions":["Deduplicate user links before invoking the factory (merge histograms or keep a single canonical USER->APP link).","Review the link append/merge logic that allows more than one link with the same from/to user application.","Constrain the requested range so overlapping link snapshots are not combined.","If the first-link choice is acceptable, downgrade the issue but record which link was selected for traceability."],"exampleFix":"// before\nfinal Link sourceLink = fromLink.get(0);\n// after\nfinal Link sourceLink = fromLink.stream()\n        .distinct()\n        .findFirst()\n        .orElseThrow(() -> new IllegalStateException(\"missing user link: \" + userApplication));","handlingStrategy":"validation","validationCode":"List<Link> fromLinks = linkList.findFromLink(userApplication);\nif (fromLinks.size() > 1) {\n    logger.warn(\"simplified map: {} duplicate user links for {}\", fromLinks.size(), userApplication);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Merge or deduplicate user links before simplified histogram creation.","Prevent repeated link-append runs from inserting duplicate user links.","Scope the requested map range to avoid overlapping snapshots.","Make source-link selection explicit rather than depending on list order."],"tags":["application-map","duplicate-links","apm"],"backgroundTag":"invalid-state-transition","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}