Issues.00114 - lordmundi/wikidoctest GitHub Wiki
00114: comm connection error message can cause seg fault
Summary: comm connection error message can cause seg fault
Created: 2008–10–14 15:55
Status: In Progress
Category: Bug
From: frankie
Version: 2.0
Released_In:
Description:
When connecting to a comm server, if the client receives matching DCOMM tags and tries to connect to the broadcast IP address, but fails, the error message it tries to print can cause a seg fault.
this usually happens when the server is broadcasting the wrong IP address, such as the loopback address instead of its true network address.
this can result in a seg fault with a stack similar to the following:
| |kane|1|0.00|2008/09/30,09:55:55| 0.0000 43:graphics_comm_init()
Initializing Graphics Comm ...
DCF_InitClient: Ready to DCF_InitQueue
DCF_InitClient: Done with DCF_InitQueue
Opening file '/dst/antares/V08.2.0/doug/EDGE/cev.cfg'
DSF_GotoBlock: DSP_SCRIPT.FLAGSClient listening for server...
mc message: doug-server:cev_comm_alhat:127.0.0.1:7010:/tmp/cev_comm_alhat
addr = 127.0.0.1, port = 7010, node = /tmp/cev_comm_alhat, ip = 127.0.0.1
addr = 127.0.0.1, port = 7010
| |kane|1|0.00|2008/09/30,09:55:55| signal SIGSEGV caught... stack trace
#5 <signal handler called>
#6 0x0021797b in strlen () from /lib/tls/libc.so.6
#7 0x001eb731 in vfprintf () from /lib/tls/libc.so.6
#8 0x001e80ac in buffered_vfprintf () from /lib/tls/libc.so.6
#9 0x001e82eb in vfprintf () from /lib/tls/libc.so.6
#10 0x001f0c8f in fprintf () from /lib/tls/libc.so.6
#11 0x0815ad9f in DCF_ReportError (err=111,
func=0x82188dc "Failed to connect to server: %s:%s", fmt=0xbfee055c "127.0.0.1")
at dcomm_utils.c:409
#12 0x0814a977 in DCF_ClientConnect () at dcomm_client.c:684
#13 0x0814c017 in DCF_StartClient (config_file=0x0, type=DCD_LIGHT_CLIENT)
at dcomm_client.c:1597
#14 0x0808ae90 in graphics_comm_init (graphics_data=0xb7f93930) at graphics_comm_init.c:79
#15 0x0805c0e4 in exec_init_modules (E=0xb7f44008, id=43) at S_Source.cpp:5562
#16 0x08187498 in exec_init_phase (E=0xb7f44008) at exec_init_phase.c:291
#17 0x08064561 in main_thread (my_arg=0xb7f44008) at Master_cpp.cpp:342
#18 0x0806444d in main (nargs=2, args=0xbfee1884) at Master_cpp.cpp:257
Comments
frankie October 14, 2008, at 04:03 PM: The main fix for the issue is to make sure that the correct IP address is being broadcast and/or fed to the clients. The server should not think that its own address is 127.0.0.1 (loopback). This can normally be fixed in the hosts file or DNS tables. Nevertheless, the error shouldn't cause a seg fault so that needs fixing as well.
To see a note describing how fix the broadcast address or manually override it, see section 6.7 of the DCOMM Patch 071120 Release Notes.
jeff July 23, 2010: Bug in calling argument to the DCF_ReportError function has been corrected.