[Bug 1154599] Re: getaddrinfo() returns -11 (EAI_SYSTEM) instead of -2

Thomas Hood 1154599 at bugs.launchpad.net
Thu Mar 20 16:42:54 UTC 2014


By the way, I was wrong earlier: return value -5 is not EAI_FAMILY but
EAI_NODATA.

$ grep -r EAI_ /usr/include
/usr/include/netdb.h:# define EAI_BADFLAGS	  -1	/* Invalid value for `ai_flags' field.  */
/usr/include/netdb.h:# define EAI_NONAME	  -2	/* NAME or SERVICE is unknown.  */
/usr/include/netdb.h:# define EAI_AGAIN	  -3	/* Temporary failure in name resolution.  */
/usr/include/netdb.h:# define EAI_FAIL	  -4	/* Non-recoverable failure in name res.  */
/usr/include/netdb.h:# define EAI_FAMILY	  -6	/* `ai_family' not supported.  */
/usr/include/netdb.h:# define EAI_SOCKTYPE	  -7	/* `ai_socktype' not supported.  */
/usr/include/netdb.h:# define EAI_SERVICE	  -8	/* SERVICE not supported for `ai_socktype'.  */
/usr/include/netdb.h:# define EAI_MEMORY	  -10	/* Memory allocation failure.  */
/usr/include/netdb.h:# define EAI_SYSTEM	  -11	/* System error returned in `errno'.  */
/usr/include/netdb.h:# define EAI_OVERFLOW	  -12	/* Argument buffer overflow.  */
/usr/include/netdb.h:#  define EAI_NODATA	  -5	/* No address associated with NAME.  */
/usr/include/netdb.h:#  define EAI_ADDRFAMILY  -9	/* Address family for NAME not supported.  */
/usr/include/netdb.h:#  define EAI_INPROGRESS  -100	/* Processing request in progress.  */
/usr/include/netdb.h:#  define EAI_CANCELED	  -101	/* Request canceled.  */
/usr/include/netdb.h:#  define EAI_NOTCANCELED -102	/* Request not canceled.  */
/usr/include/netdb.h:#  define EAI_ALLDONE	  -103	/* All requests done.  */
/usr/include/netdb.h:#  define EAI_INTR	  -104	/* Interrupted by a signal.  */
/usr/include/netdb.h:#  define EAI_IDN_ENCODE  -105	/* IDN encoding failed.  */


** Changed in: python2.7 (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/1154599

Title:
  getaddrinfo() returns -11 (EAI_SYSTEM) instead of -2

Status in “eglibc” package in Ubuntu:
  Fix Released
Status in “python2.7” package in Ubuntu:
  Fix Released
Status in “eglibc” source package in Raring:
  New
Status in “python2.7” source package in Raring:
  New

Bug description:
  $ cat lookup.py
  #!/usr/bin/python
  import sys, socket
  names = ["slashdot.org", "foooooooooowhizzzzzzzz.com"]
  if len(sys.argv) > 1:
     names = sys.argv[1:]
  for iname in names:
      try:
          result = socket.getaddrinfo(iname, None, 0, 0, socket.SOCK_STREAM,
                                      socket.AI_CANONNAME)
          for (fam, stype, proto, cname, sockaddr) in result:
              sys.stdout.write("cname=%s, sockaddr=%s\n" % (cname, sockaddr))
      except socket.gaierror as error:
          sys.stderr.write("%s failed lookup" % iname)

  $ python2.7 lookup.py
  cname=slashdot.org, sockaddr=('216.34.181.45', 0)
  Traceback (most recent call last):
    File "/tmp/x.py", line 10, in <module>
      socket.AI_CANONNAME)
  socket.error: [Errno 2] No such file or directory

  shell returned 1

  $ dpkg -S /usr/bin/python2.7
  python2.7-minimal: /usr/bin/python2.7
  $ dpkg-query --show python2.7-minimal
  python2.7-minimal	2.7.3-16ubuntu1

  This is a behavioral change from quantal (2.7.3-5ubuntu4).

  ProblemType: Bug
  DistroRelease: Ubuntu 13.04
  Package: python 2.7.3-10ubuntu5
  ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
  Uname: Linux 3.5.0-21-generic x86_64
  ApportVersion: 2.9.1-0ubuntu1
  Architecture: amd64
  Date: Wed Mar 13 09:52:55 2013
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2011-10-19 (511 days ago)
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python-defaults
  UpgradeStatus: Upgraded to raring on 2013-01-07 (64 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1154599/+subscriptions



More information about the foundations-bugs mailing list