I am having a really strange problem with a in-house C application that
calls mysql_connect() and generates a segfault deep within uname() when
I configure it to contact a remote server.  Using a local MySQL server
works fine as uname is never called.

Have any of you ever seen anything like this?  Here's the backtrace from
gdb:

Program received signal SIGSEGV, Segmentation fault.
0x0807a086 in uname ()
(gdb) bt
#0  0x0807a086 in uname ()
#1  0x4011da96 in getdomainname (name=0x4019f240 "", len=1024)
    at ../sysdeps/generic/getdomain.c:40
#2  0x40191ae6 in nis_local_directory () at nis_local_names.c:68
#3  0x40181cb0 in _nss_create_tablename (errnop=0x808c720)
    at nss_nisplus/nisplus-hosts.c:183
#4  0x40182223 in internal_gethostbyname2_r (name=0xbffff5b0
"dev.pason.com", 
    af=2, host=0x40170620, buffer=0x808fda0 "\177", buflen=1024, 
    errnop=0x808c720, herrnop=0xbffff178, flags=0)
    at nss_nisplus/nisplus-hosts.c:338
#5  0x401825ca in _nss_nisplus_gethostbyname_r (
    name=0xbffff5b0 "dev.pason.com", host=0x40170620, buffer=0x808fda0
"\177", 
    buflen=1024, errnop=0x808c720, h_errnop=0xbffff178)
    at nss_nisplus/nisplus-hosts.c:447
#6  0x40135cc0 in __gethostbyname_r (name=0xbffff5b0 "dev.pason.com", 
    resbuf=0x40170620, buffer=0x808fda0 "\177", buflen=1024, 
    result=0xbffff174, h_errnop=0xbffff178) at ../nss/getXXbyYY_r.c:200
#7  0x401356da in gethostbyname (name=0xbffff5b0 "dev.pason.com")
    at ../nss/getXXbyYY.c:131
#8  0x0805b8cc in mysql_real_connect ()
#9  0x0805d90c in mysql_connect ()
#10 0x08070385 in ssConnectDB (databaseName=0x8073c85 "hub") at
_ssmysql.c:52

Any idea what this could be?  Any idea on how I could try to track it
down?  My feeling is that this is most likely something wrong with our C
application.  However, it calls ssConnectDB right near the beginning of
main(), so there isn't much opportunity for memory errors.

Thanks.
-- 
Guy Davis                http://www.guydavis.ca
PGP: D2E2 76D4 0C9C 5D99 42AA  EB6B B9C2 68CA 2DC7 F2E4

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to