Bug 14161 - agent socket never deleted
Summary: agent socket never deleted
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: 7.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-24 16:08 UTC by Tom Tromey
Modified: 2022-12-21 18:17 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2012-05-24 16:08:46 UTC
When I run the gdb test suite, I see files like this in /tmp:

srwxr-xr-x. 1 tromey tromey    0 May 17 07:27 gdb_ust11542=

I think this comes from gdbserver's gdb_agent_socket_init.
As far as I can see, there is no code to unlink the socket after
gdbserver is done with it.
I think there should be.
Comment 1 Yao Qi 2012-05-25 02:10:45 UTC
I'll have a look.
Comment 2 Sourceware Commits 2012-07-27 08:09:22 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	qiyao@sourceware.org	2012-07-27 08:09:14

Modified files:
	gdb/doc        : ChangeLog gdb.texinfo 
	gdb/gdbserver  : ChangeLog server.h target.c target.h 
	                 tracepoint.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.trace: strace.exp 

Log message:
	gdb/gdbserver/
	PR remote/14161.
	
	* server.h: Declare gdb_agent_about_to_close.
	* target.c (kill_inferior): Include "agent.h".
	New.  Send command 'kill'.
	* target.h (kill_inferior): Removed macro.
	* tracepoint.c (gdb_agent_about_to_close): New.
	(gdb_agent_helper_thread): Handle command 'close'.
	Wait endlessly until the inferior stops.
	Install gdb_agent_remove_socket to atexit hook.
	(agent_socket_name): New static variable.
	(gdb_agent_socket_init): Replace local variable 'name' with
	'agent_socket_name'.
	(gdb_agent_remove_socket): New.
	
	gdb/doc/
	* gdb.texinfo (IPA Protocol Commands): Document new command
	'close'.
	
	gdb/testsuite/
	KFAIL for PR remote/14161.
	* gdb.trace/strace.exp (strace_remove_socket): kfail for native.
	Cleanup socket files.
	(strace_info_marker): Detach inferior.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1348&r2=1.1349
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.992&r2=1.993
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/ChangeLog.diff?cvsroot=src&r1=1.633&r2=1.634
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/server.h.diff?cvsroot=src&r1=1.97&r2=1.98
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/target.c.diff?cvsroot=src&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/target.h.diff?cvsroot=src&r1=1.64&r2=1.65
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/tracepoint.c.diff?cvsroot=src&r1=1.62&r2=1.63
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3307&r2=1.3308
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/strace.exp.diff?cvsroot=src&r1=1.13&r2=1.14
Comment 3 Tom Tromey 2022-12-21 18:17:03 UTC
Sounds like this was fixed some time ago.