gdp-writer segfaults under Mac OS X
Under Mac OS X, gdp-writer segfaults
bash-3.2$ echo "foo" | /Users/cxh/ptII/vendors/gdp/gdp/apps/gdp-writer -G edu.berkeley.eecs.gdp-01.gdplogd cxh.GDPLogCreateJS Segmentation fault: 11 bash-3.2$
Below is a stack trace
bash-3.2$ gdb /Users/cxh/ptII/vendors/gdp/gdp/apps/gdp-writer
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin15.5.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /Users/cxh/ptII/vendors/gdp/gdp/apps/gdp-writer...done.
(gdb) r -G edu.berkeley.eecs.gdp-01.gdplogd cxh.GDPLogCreateJS
Starting program: /Users/cxh/ptII/vendors/gdp/gdp/apps/gdp-writer -G edu.berkeley.eecs.gdp-01.gdplog\
Program received signal SIGSEGV, Segmentation fault.
0x0000000100002157 in gdp_init (router_addr=) at gdp_api.c:256
256 GdpChannel->advertise = &_gdp_advertise_me;
#0 0x0000000100002157 in gdp_init (router_addr=) at gdp_api.c:256
#1 0x00000001000019d2 in main (argc=, argv=0x10001df20 <_GdpLibInitialized>)
(gdb) print _GdpChannel
$1 = 0
252 // initialize connection
253 _GdpChannel = NULL;
254 estat = _gdpchan_open(router_addr, &gdp_pdu_process, &GdpChannel);
255 EP_STAT_CHECK(estat, goto fail0);
256 _GdpChannel->advertise = &gdp_advertise_me;
258 // start the event loop
259 estat = _gdpevloop_init();
260 EP_STAT_CHECK(estat, goto fail0);
Under RHEL on campus, it does not segfault
[cxh@terra ~]$ echo "foo" | $PTII/vendors/gdp/gdp/apps/gdp-writer -G edu.berkeley.eecs.gdp-01.gdplogd cxh.GDPLogCreateJS
[ERROR] gdp-writer: GDP Initialization failed
(No such file or directory)
gdp-writer: exiting with status ERROR: No such file or directory [EPLIB:errno:2]
#1 Updated by Eric Allman over 6 years ago
- Category set to libgdp
- Status changed from New to Resolved
- Assignee set to Eric Allman
Resulted from failure to propagate an error if the DNS lookup failed when opening a GDP channel. Fixed in commit:f05b7086e.
#2 Updated by Anonymous over 6 years ago
Thanks! I can no longer reproduce the bug.
#3 Updated by Nitesh Mor over 6 years ago
- Status changed from Resolved to Closed