Skip to content

linux arm 64 环境下,sched_to itself! #1407

Description

@zzjshaok

Describe the bug (描述bug)
linux arm 64, 对brpc服务端加大压力并发压测,rpc服务端打印"bthread= sched_to itself!"并退出

To Reproduce (复现方法)
linux arm 64, 300个客户端线程并发压测一段时间,rpc服务端 sched_to itself

Expected behavior (期望行为)
服务端正常工作

Versions (各种版本)
OS: Linux 10-21-10-172 4.19.0-arm64-server #1813 SMP Mon Aug 31 15:44:57 CST 2020 aarch64 GNU/Linux
Compiler: gcc version 8.3.0 (Uos 8.3.0.3-3+rebuild)
brpc: master
protobuf:

Additional context/screenshots (更多上下文/截图)
已经禁用gcse优化 -fno-gcse;经过跟踪调试,每次异常时,task_group.cpp 中的void TaskGroup::task_runner(intptr_t skip_remained) 函数内部,在调用完BAIDU_SCOPED_LOCK(m->version_lock)后,g != tls_task_group,理论上这句最终调用的是butil\scoped_lock.h 中的pthread_spin_lock(_pspin);
不清楚在arm 64 环境下,为何有时调用完此行代码会发生协程环境切换?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions