agentscope-ai / agentscope-ai/agentscope-java

[Bug]:非沙箱模式下,分布式部署机器workspace使用共享磁盘挂载会导致.skill-cache竞争

未關閉
#2,772 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Java
星號
5.6k
分支
1.3k
平均合併
4 天 12 小時
30 天內合併 PR
77

描述

**AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.**

**Describe the bug**
当多用户并发访问时,会出现报错
在不使用沙箱的情况下,为了让分布式workspace的内容统一/data/workspace,使用共享磁盘挂载,默认使用框架userId隔离
当前的额.skill-cache应该是全局操作,我如果想规避这个问题,目前智能在workspace路径再加一层userId隔离

**To Reproduce**
Steps to reproduce the behavior:

请求 A(用户甲,本次失败) 请求 B(用户乙,并发)
───────────────────────── ─────────────────────────
onSystemPrompt → stage() onSystemPrompt → stage()
物化 19 个可见 skill(含 xxx-testing) 物化自己的可见集合
(若乙看不到 xxx-testing,
retained 集合里没有它)
stage 收尾: stage 收尾:
garbageCollectOrphans garbageCollectOrphans
→ deleteRecursively(xx-testing) → 删其它孤儿
Files.walk 下钻 scripts ... (或先一步也在动这个目录)
← scripts 此刻被 B 侧并发删除
→ UncheckedIOException 逃逸 → 执行失败(3105ms)

**Expected behavior**
A clear and concise description of what you expected to happen.

**Error messages**
java.nio.file.NoSuchFileException: /data/workspace/.skills-cache/
**Environment (please complete the following information):**

- AgentScope-Java Version: 2.0
- grep agentscope-parent:pom`(only mac/linux)]
- Java Version: [e.g. 17]
- OS: [linux]

**Additional context**
Add any other context about the problem here.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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