简体   繁体   中英

Debug restarting daemon

There is a c++ program running as daemon on linux in production environment. It keeps on restarting after some unpredictable time. Since it is in production environment it has no debug info. It does not log errors in any file. There is no liberty to attach gdb to the running process as it may affect production. But the fix is to be provided.

How to collect info or dump in such a case? How to debug such a scenario?

How to debug such a scenario?

Enable core dump saving on production environment. See how to do it on linux: How to enable core dump in my Linux C++ program .

Copy core dump on development environment and debug it with debug info loaded in gdb.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM