小编Pro*_*mer的帖子

Valgrind 中的错误 VgTs_WaitSys 是什么意思?

我有一个用 C 编写的服务器,每当有新客户端连接时,它就会产生一个新线程。为了测试我的服务器,我编写了一个模拟 500 个客户端的脚本。服务器处理前几百个客户端,最后我从 Valgrind 收到以下错误:

Thread 456: status = VgTs_WaitSys
==4182==    at 0x4E383EC: recv (recv.c:34)
==4182==    by 0x4017F1: process_data (socket2.h:45)
==4182==    by 0x40195E: thread (FBServer.c:82)
==4182==    by 0x4E30A03: start_thread (pthread_create.c:300)
==4182==    by 0x532DD4C: clone (clone.S:112)

Thread 457: status = VgTs_WaitSys
==4182==    at 0x4E383EC: recv (recv.c:34)
==4182==    by 0x4017F1: process_data (socket2.h:45)
==4182==    by 0x40195E: thread (FBServer.c:82)
==4182==    by 0x4E30A03: start_thread (pthread_create.c:300)
==4182==    by 0x532DD4C: clone (clone.S:112)

...

Thread 499: status = VgTs_WaitSys
==4182==    at 0x4E383EC: recv (recv.c:34)
==4182==    by …
Run Code Online (Sandbox Code Playgroud)

c multithreading valgrind

5
推荐指数
1
解决办法
1407
查看次数

标签 统计

c ×1

multithreading ×1

valgrind ×1