c - How to find where a process is stuck using DDD -
i have tcp svr process written in c , running on centos 5.5. acts tcp server external clients , ipc communication other processes in system using unix domain sockets has establised. it's not multi threaded process. 1 task @ time. there's epoll_wait() use listen requests on either tcp socket or of ipc sockets has established internal processes. when epoll_wait() function breaks,i process request whoever , go epoll_wait()
i have tcp client connects process outside (not ipc). connects sucessfully, sends request msg, gets response back. i've put in infinite loop test out robustness etc.
after while, tcp server stops responding requests coming tcp client. tcp client connects successfully, sends request message, doesnt response msg tcp server.
so reckon tcp server stuck somewhere else, trying , has not returned epoll_wait() process other requests coming in. i've tried figure out using logs, thats not helping me understand process stuck.
so wanted use debugger can give me information (function name great), process doing. putting breakpoints, overwhelming cause tcp server process has tons of files , functions....
i'm trying use ddd on centos 5.5, figureout whats going on. attach process successfully. click on "step" or "stepi" or "next" button.... nothing happens....
btw when use eclipse debugging, , attach process (or process), "__kernel_vsyscall()"....does mean, program breaks default @ whatever doing? if thats case, how come out of __kernel_vsyscall() call, continue within program? if press f8, comes out, dont know was, since loose stack trace....like said earlier. since cant figure was, dont know put breakpoint....
in summary, want figureout process stuck or doing , try debug point on....
how go this?
thanks amit
1) attaching c process can cause problems in itself, there way start process in debugger?
2) using step functions of ddd need done after you've set breakpoint , program stopped on command. reading question, i'm not sure you've done that. may not want set many breakpoints, setting 1 or 2 in critical sections of code possible?
Comments
Post a Comment