Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将一个无符号长整型(unsigned long)变量输入到日志流中时发生了崩溃 #307

Open
duansumin2022 opened this issue May 10, 2024 · 6 comments

Comments

@duansumin2022
Copy link

tars版本v3.0.16, 系统环境CentOS Linux release 7.6.1810 (Core)
客户端程序写日志TLOGINFO崩溃,将一个无符号长整型(unsigned long)变量输入到日志流中时发生了崩溃。
堆栈信息:
1715309012561

@ruanshudong
Copy link
Contributor

不科学吧, 源码怎么写的?

@duansumin2022
Copy link
Author

不科学吧, 源码怎么写的?

TLOGINFO(MessageIDKit::Log() <<"pickSecretKey secretkey from memory [" << len << "], deviceID:" << deviceID << " keyId:" << item->keyID << std::endl);
item->keyID 是 unsigned long int 类型

@ruanshudong
Copy link
Contributor

写段测试代码也有这个问题?这不科学啊

@duansumin2022
Copy link
Author

写段测试代码也有这个问题?这不科学啊

测试代码没有问题,我是多进程跑的这段代码,我再看看是不是其他问题。

@ruanshudong
Copy link
Contributor

啥叫多进程? fork出来的?

@duansumin2022
Copy link
Author

duansumin2022 commented May 11, 2024

啥叫多进程? fork出来的?
shell脚本在同一目录下,启动多个客户端程序压测server
1715410825956
etcTest是我的客户端测试程序

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

No branches or pull requests

2 participants