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 摘要。