microsoftgraph / microsoftgraph/msgraph-sdk-java

large amount of com.microsoft.kiota.store.InMemoryBackingStore$Pair objects are allocated, memory leak?

未關閉
#2,235 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

Status: Needs Investigation type:bug
主要語言
Java
星號
444
分支
154
平均合併
18 小時 28 分鐘
30 天內合併 PR
4

描述

Describe the bug

trying to use the delta api and observed 10s of gigabytes of ram usage from this sdk.

Expected behavior

memory consumption should not be this large for a library doing http requests.

How to reproduce

just periodically call the users/groups delta api and try to persist the user/group models somewhere, you will see the ram usage steadily rising.

SDK Version

6.20.0

Latest version known to work for scenario above?

No response

Known Workarounds

none found atm.

Debug output
Click to expand log
Name,Live bytes,Live objects,Allocated objects,Generations
com.microsoft.kiota.store.InMemoryBackingStore$Pair	93,336,120 B (84.3%)	3,889,005 (81.4%)	15,340,787 (78.9%)	234

image

Configuration
  • OS: ubuntu, fedora
  • Arch: x64, aarch64
  • java: 21, 23
Other information

tried -XX:+UseG1GC without avail

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先在持久化模型的同時,使用 Java SDK 6.20.0 重現 users/groups delta API 的問題,接著檢查回報的 com.microsoft.kiota.store.InMemoryBackingStore$Pair 配置。比較在列出的 Java 和 OS 設定中重複呼叫時的記憶體使用量;當持續成長與過度保留 Pair 的原因獲得解釋並解決,且為此情境加入回歸檢查後,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。