Skip to content

Fix: Apply mutex when visiting Attributes as well#3921

Merged
RPRX merged 1 commit intomainfrom
attr-mutex
Oct 30, 2024
Merged

Fix: Apply mutex when visiting Attributes as well#3921
RPRX merged 1 commit intomainfrom
attr-mutex

Conversation

@Fangliding
Copy link
Member

之前就看到了setattr那个函数(毕竟调的最多)
其他函数也可能遇到类似情况 补上了

@RPRX
Copy link
Member

RPRX commented Oct 17, 2024

这个好像和 mux 那个不是同一个问题?

@Fangliding
Copy link
Member Author

Fangliding commented Oct 17, 2024

这个好像和 mux 那个不是同一个问题?

一个问题 SetAttribute() 和 Attribute() 都会尝试访问那个map 如果同时访问race了就boom 之前只给 SetAttribute() 加锁了

@RPRX
Copy link
Member

RPRX commented Oct 17, 2024

这个不是 sniff 引发的吗

@RPRX
Copy link
Member

RPRX commented Oct 17, 2024

就是说为什么 sniff 也有 race

@Fangliding
Copy link
Member Author

这个不是 sniff 引发的吗

就是 #3908 的问题

@RPRX
Copy link
Member

RPRX commented Oct 17, 2024

所以还是 mux 导致的?

@Fangliding
Copy link
Member Author

问题还是老问题 对于一条被mux的连接 多个子请求在内部共享一条ctx

@RPRX
Copy link
Member

RPRX commented Oct 17, 2024

关键代码在哪里,我研究下能不能治本

@Fangliding
Copy link
Member Author

关键代码在哪里,我研究下能不能治本

#3718 吧 我也是从那来的()

@RPRX
Copy link
Member

RPRX commented Oct 30, 2024

月底了,同样决定先合了治个标

@RPRX RPRX changed the title Apply mutex to more attr functions Fix: Apply mutex when visiting Attributes as well Oct 30, 2024
@RPRX RPRX merged commit 9f8bb47 into main Oct 30, 2024
@yuhan6665 yuhan6665 deleted the attr-mutex branch November 4, 2024 17:54
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
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 this pull request may close these issues.

2 participants