alibaba / alibaba/fastjson2

[BUG]fastjson2的tojsonString引发JVM中的Metaspace增长

Open
#2,900 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

### 问题描述
最近将项目的fastjson升级到fastjson2,运行一两天后 发现 JVM中的Metaspace占用使用越来越大,引发内存溢出。但退回到fastjson 1系列版本后恢复稳定。

### 环境信息
*请填写以下信息:*

- OS信息: [e.g.:Windows Server 2016 Datacenter 4Core 3.40GHz 32 GB]
- JDK信息: [e.g.:OpenJDK-11.0.11+9]
- 版本信息:[e.g.:Fastjson2 2.0.52]

### 重现步骤
暂时无法提供。

1. JSON.toJSONString(newVal.getKey())

Contributor guide

Open the contributing guide

Research direction

The report identifies JSON.toJSONString(newVal.getKey()) as the suspected entry point, but names no source file or test and provides no environment details or reproducible steps. Start by collecting the JDK, Fastjson2 version, operating system, and a minimal long-running reproduction; done means identifying and testing the cause of the Metaspace growth.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.