RKum
RKum

Reputation: 831

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?

Upvotes: 0

Views: 272

Answers (1)

ks1322
ks1322

Reputation: 35775

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.

Upvotes: 1

Related Questions