Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3986560
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:01:45+00:00 2026-05-20T06:01:45+00:00

I have a TCP Svr process written in C and running on CentOS 5.5.

  • 0

I have a TCP Svr process written in C and running on CentOS 5.5. It acts as a TCP Server for external clients and also does some IPC communication with other processes in the system using Unix Domain Sockets it has establised. It’s not a multi threaded process. It does one task at a time. There’s an epoll_wait() I use to listen for requests on either the TCP socket or any of the IPC sockets it has established with internal processes. When the epoll_wait() function breaks,I process the request for whoever it is and then go back into epoll_wait()

I have a TCP Client that connects to this Process from outside (not IPC). It connects sucessfully, sends a request msg, gets a response back. I’ve put this in an infinite loop
just to test out its robustness etc.

After a while, the TCP Server stops responding to requests coming from TCP Client. The TCP client connects successfully, sends a request message, but it doesnt get any response msg back from the TCP server.

So I reckon the TCP server is stuck somewhere else, trying to do something and has not returned to the epoll_wait() to process
other requests coming in. I’ve tried to figure it out using logs, but thats not helping me understand where exactly the process is stuck.

So I wanted to use any debugger that can give me some information (function name would be great), as to what the process is doing. Putting breakpoints, is overwhelming cause the TCP Server process has tons of files and functions….

I’m trying to use DDD on CentOS 5.5, to figureout whats going on. I attach to the process successfully. Then I click on “Step” or “Stepi” or “Next” button….
but nothing happens….

btw when I use Eclipse for debugging, and attach to this process (or any process), I always get “__kernel_vsyscall()”….Does this mean, the program breaks by default at
whatever its doing? If thats the case, how do I come out of the __kernel_vsyscall() call, to continue within my program? If I press f8, it comes out, but then I dont know where it was, since I loose the stack trace….Like I said earlier. Since I cant figure where it was, I dont know where to put breakpoint….

In summary, I want to figureout where my process is stuck or what its doing and try to debug from that point on….

How do I go about this?

Thanks
Amit

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:01:45+00:00Added an answer on May 20, 2026 at 6:01 am

    In summary, What I wanted to accomplish was to be able to find where my program is stuck, when it hangs. I figured it out – It was so simple. Create a configuration in Eclipse ….”Debug Configurations->C/C++ attach to application”…

    Let the process run normally from shell (preferably with a terminal attached). When it hangs, open eclipse, click on the debug icon and run the configured process. It’ll ask you to attach to a process. Look for your process name and attach to it.

    Now, just look at the entire stack trace….you’ll see some of your own function calls mixed with kernel function calls. That tells you where the program is stuck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TCP server app that is written in C#. I accept TCP
I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create
I have a TCP server running which spits out messages of 2 bytes at
I have a tcp server running at port xxxx and flash policy server(again tcp)
I have a TCP server running on a machine. (implemented in Java). I need
I have a tcp server which is not in java also its a hardware
I have a TCP/IP server written in C# .net which can have 10,000 connections
I have a tcp client - server implementation running in the same program, on
I have a tcp server application which accepts tcp clients in more number and
I am getting pretty frustrated, i have an tcp server running on my mac

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.