[netperf-dev] [netperf-talk] OK, this time I really mean it?-)

Rick Jones rick.jones2 at hp.com
Wed Jun 3 14:14:38 PDT 2009


> 2) Netperf on older Solaris (like S10GA) whines:
> 
>   WARNING! getaddrinfo returned a protocol other than the
>   requested protocol.  Please contact your vendor for
>   a fix to this bug in getaddrinfo()
> 
> There's nothing I can do about it, I didn't write the OS,
> and I hate having my output cluttered with seemingly
> useless noise.  Can we please make these conditional
> on debugging?   Proposed patch attached.
> 
> Thanks,
> 
> Drew
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/nettest_bsd.c
> ===================================================================
> --- src/nettest_bsd.c	(revision 301)
> +++ src/nettest_bsd.c	(working copy)
> @@ -647,6 +647,9 @@
>    int    change_info = 0;
>    static int change_warning_displayed = 0;
>  
> +  if (!debug)	
> +    change_warning_displayed = -1;
> +
>    int count = 0;
>    int error = 0;
>  

So, having seen you have a bug submitted against OpenSolaris I'm willing to visit 
the idea of making that warning a debug only thing, but your patch would seem to 
disable all the warnings about kludging around getaddrinfo() bugs regardless of 
bug, or platform, not just this one combination.  I'd like to make the warning 
only go away for Solaris lest there be other platforms with the bug.

Is there a #define that is consistently set when compiling on Solaris?  If so, 
then as part of the set of &&'d conditionals we could add one that was like:

  /* if we dropped the protocol hint, it would be for a protocol that
      getaddrinfo() wasn't supporting yet, not for the bug that it took
      our hint and still returned zero. raj 2006-10-16 */
  /* we know that OpenSolaris bug ID 6847733 was filed for this bug so
     only emit the warning for other platforms. raj 2009-06-03 */
   if ((change_info & CHANGED_PROTOCOL) &&
       !(change_warning_displayed & CHANGED_PROTOCOL) &&
#ifdef SOLARIS
       (debug) &&
#endif
       (hints.ai_protocol != 0)) {
     change_warning_displayed |= CHANGED_PROTOCOL;
     fprintf(where,
	    "WARNING! getaddrinfo returned a protocol other than the\n");
     fprintf(where,
	    "requested protocol.  Please contact your vendor for\n");
     fprintf(where,
	    "a fix to this bug in getaddrinfo()\n");
     fflush(where);
   }

rick jones


More information about the netperf-dev mailing list