Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] FE memory leak #45609

Open
2 of 3 tasks
cambyzju opened this issue Dec 18, 2024 · 2 comments · May be fixed by #45806
Open
2 of 3 tasks

[Bug] FE memory leak #45609

cambyzju opened this issue Dec 18, 2024 · 2 comments · May be fixed by #45806

Comments

@cambyzju
Copy link
Contributor

cambyzju commented Dec 18, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

branch-2.1

What's Wrong?

fe memory leak

What You Expected?

do not leak

How to Reproduce?

One Reproduce Steps:
1、create a jdbc catalog:

CREATE CATALOG `test_catalog` PROPERTIES (
"user" = "test_user",
"type" = "jdbc",
"password" = "xxxx",
"metadata_refresh_interval_sec" = "10",
"jdbc_url" = "jdbc:mysql://127.0.0.1:3600/cambyzhu?yearIsDateType=false&tinyInt1isBit=false&transformedBitIsBoolean=true&useUnicode=true&characterEncoding=utf-8",
"driver_url" = "mysql-connector-j-8.0.33.jar",
"driver_class" = "com.mysql.cj.jdbc.Driver",
"checksum" = "801b67e18f23e4e9ec392812a1c108d4"
);

2、then drop user test_user

3、Trigger the memory leak:

for i in {1..10000};do mysql -h127.0.0.1 -uroot -P9030 -e "switch test_catalog;show databases";echo $i;done

We will got error message like:
ERROR 1105 (HY000) at line 1: Failed to initialize JdbcMySQLClient: Catalog test_catalog can not connect to jdbc due to error: Access denied for user 'default_cluster:[email protected]' (using password: YES)

Then we found:
1、jvm_non_heap leak
2、java.net.FactoryURLClassLoader leak in jvm heap
Clipboard_Screenshot_1734524983

Another Reproduce Steps:
1、create a jdbc catalog with metadata_refresh_interval_sec = 1
2、Trigger the memory leak:

for i in {1..10000};do mysql -h127.0.0.1 -uroot -P9030 -e "show databases from test_catalog;";echo $i;sleep 1;done

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@XLPE
Copy link

XLPE commented Dec 23, 2024

What tool are you using to detect memory leaks?

@cambyzju cambyzju linked a pull request Dec 23, 2024 that will close this issue
16 tasks
@cambyzju
Copy link
Contributor Author

What tool are you using to detect memory leaks?

doris metrics: jvm_non_heap_size_bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants