Bug 186509 - databases/mysql51-client: mysql client core dumps in name resolution
databases/mysql51-client: mysql client core dumps in name resolution
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Alex Dupre
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-06 10:30 UTC by lutz.rabing
Modified: 2014-02-11 13:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lutz.rabing 2014-02-06 10:30:00 UTC
mysql client (5.1.73) connections to localhost or hosts given as ip address
work. however, when you supply a hostname you get a "Segmentation fault (core dumped)".

The system is running bind99-9.9.5 and resolv.conf revers to localhost as nameserver. Nameresolution works without problems. Another FBSD10 system with the default resolver shows the same behavior.

# gdb mysql mysql.core 
Core was generated by `mysql'.
Program terminated with signal 11, Segmentation fault.
(gdb) bt
#0  0x0000000801da1713 in gethostent () from /lib/libc.so.7
#1  0x0000000801d9ff2f in nsdispatch () from /lib/libc.so.7
#2  0x0000000801d9e89f in gethostbyname_r () from /lib/libc.so.7
#3  0x0000000801d9e5e4 in gethostbyname_r () from /lib/libc.so.7
#4  0x0000000800cfd410 in mysql_real_connect () from /usr/local/lib/mysql/libmysqlclient.so.16
#5  0x00000000004047da in ?? ()
#6  0x0000000000404069 in ?? ()
#7  0x0000000000403adf in ?? ()
#8  0x0000000800631000 in ?? ()
#9  0x0000000000000000 in ?? ()

Fix: 

?
How-To-Repeat: Just connect to a mysql server via network:

 mysql -h <hostname>

and you get the coredump.
Comment 1 Edwin Groothuis freebsd_committer 2014-02-10 05:05:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2014-02-11 13:40:42 UTC
Author: ale
Date: Tue Feb 11 13:40:34 2014
New Revision: 343739
URL: http://svnweb.freebsd.org/changeset/ports/343739
QAT: https://qat.redports.org/buildarchive/r343739/

Log:
  Fix gethostbyname usage.
  
  PR:		ports/186509
  Submitted by:	Lutz Rabing <lutz.rabing@omc.net>

Deleted:
  head/databases/mysql51-server/files/patch-include_my_net.h
Modified:
  head/databases/mysql51-server/Makefile
  head/databases/mysql51-server/files/patch-configure

Modified: head/databases/mysql51-server/Makefile
==============================================================================
--- head/databases/mysql51-server/Makefile	Tue Feb 11 12:45:56 2014	(r343738)
+++ head/databases/mysql51-server/Makefile	Tue Feb 11 13:40:34 2014	(r343739)
@@ -3,7 +3,7 @@
 
 PORTNAME?=	mysql
 PORTVERSION=	5.1.73
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	databases
 MASTER_SITES=	${MASTER_SITE_MYSQL}
 MASTER_SITE_SUBDIR=	MySQL-5.1

Modified: head/databases/mysql51-server/files/patch-configure
==============================================================================
--- head/databases/mysql51-server/files/patch-configure	Tue Feb 11 12:45:56 2014	(r343738)
+++ head/databases/mysql51-server/files/patch-configure	Tue Feb 11 13:40:34 2014	(r343739)
@@ -1,6 +1,15 @@
---- configure.orig	Sat May 26 12:22:14 2007
-+++ configure	Fri Jun  1 07:53:46 2007
-@@ -26935,8 +26933,8 @@
+--- configure.orig	2013-11-04 18:55:16.000000000 +0000
++++ configure	2014-02-11 13:34:06.586185156 +0000
+@@ -22206,7 +22206,7 @@
+ int
+ main ()
+ {
+-return gethostbyname_r ();
++return incompatible_gethostbyname_r ();
+   ;
+   return 0;
+ }
+@@ -24768,8 +24768,8 @@
  # Some system specific hacks
  #
  
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alex Dupre freebsd_committer 2014-02-11 13:40:43 UTC
State Changed
From-To: open->closed

Fixed, thanks!