Opened 8 years ago

Closed 8 years ago

#1178 closed defect (fixed)

Can't debug rasserver with gdb

Reported by: Dimitar Misev Owned by:
Priority: major Milestone: Future
Component: rasserver Version: development
Keywords: Cc: Alex Toader, George Merticariu, Peter Baumann
Complexity: Medium

Description

It seems like gdb just doesn't work anymore with rasnet (setting breakpoints or doing anything else). Can you check as well? Any ideas?

ps aux | grep rasserver # to find the pid
gdb -p <pid>

Change History (7)

comment:1 by Alex Toader, 8 years ago

In rasnet, the server process is terminated if it does not respond to status checks from rasmgr. You can bypass this by modifying:
SERVER_MANAGER_CLEANUP_INTERVAL
and
CLIENT_MANAGER_CLEANUP_INTERVAL
in rasmgr_x/constants.hh to large values.

Ideally, we should work towards having the server functionality covered by unit tests to make debugging easier.

comment:2 by Dimitar Misev, 8 years ago

Cc: Peter Baumann added

Being able to attach to rasserver with gdb is essential.

comment:3 by Peter Baumann, 8 years ago

wasn't directql meant for purposes like testing on QL level?

comment:4 by Dimitar Misev, 8 years ago

Yes in this case I resorted to directql, but if it was some issue with the protocol then that wouldn't work and the way to enable it is a bit cumbersome.

Maybe we can put this stuff in some developers guide:

In rasnet, the server process is terminated if it does not respond to status checks from rasmgr. > You can bypass this by modifying:
SERVER_MANAGER_CLEANUP_INTERVAL
and
CLIENT_MANAGER_CLEANUP_INTERVAL
in rasmgr_x/constants.hh to large values.

comment:5 by Alex Toader, 8 years ago

You can attach gdb to the server process without any problem. You just have to make sure that rasmgr does not kill the server process while you are debugging (by setting the above variables).
@Dimitar, where should I put the above information?

comment:6 by Dimitar Misev, 8 years ago

I think this would be a fitting place: wiki:DebuggingBenchmarking

comment:7 by Dimitar Misev, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.