Can't create IP socket: Address family not supported by protocolAborting Entering pool shutdown

Bug #324052 reported by RedBrain
4
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Eric Day

Bug Description

Having strange problems unable to run drizzled:

gdb output:
[Thread debugging using libthread_db enabled]
Changed limits: max_open_files: 1024 max_connections: 886 table_cache: 64[New Thread 0xb7b106f0 (LWP 6252)]
[New Thread 0xb71eeb90 (LWP 6255)]
[New Thread 0xb71adb90 (LWP 6256)]
[New Thread 0xb716cb90 (LWP 6257)]
[New Thread 0xb712bb90 (LWP 6258)]
[New Thread 0xb70eab90 (LWP 6259)]
[New Thread 0xb70a9b90 (LWP 6260)]
[New Thread 0xb7068b90 (LWP 6261)]
[New Thread 0xb7027b90 (LWP 6262)]
[New Thread 0xb652ab90 (LWP 6263)]
[New Thread 0xb5d29b90 (LWP 6264)]
[New Thread 0xb5528b90 (LWP 6265)]
[New Thread 0xb4d27b90 (LWP 6266)]
090201 19:57:22 InnoDB: highest supported file format is Barracuda.
[New Thread 0xb4097b90 (LWP 6267)]
[New Thread 0xb3896b90 (LWP 6268)]
[Thread 0xb4097b90 (LWP 6267) exited]
[New Thread 0xb3095b90 (LWP 6269)]
[New Thread 0xb2894b90 (LWP 6270)]
090201 19:57:23 InnoDB Plugin 1.0.2 started; log sequence number 46409
Can't create IP socket: Address family not supported by protocolAborting
Entering pool shutdown
[Thread 0xb70eab90 (LWP 6259) exited]
[Thread 0xb71adb90 (LWP 6256) exited]
[Thread 0xb7068b90 (LWP 6261) exited]
[Thread 0xb7027b90 (LWP 6262) exited]
[Thread 0xb70a9b90 (LWP 6260) exited]
[Thread 0xb712bb90 (LWP 6258) exited]
[Thread 0xb716cb90 (LWP 6257) exited]
[Thread 0xb71eeb90 (LWP 6255) exited]
090201 19:57:23 InnoDB: Starting shutdown...
[Thread 0xb3896b90 (LWP 6268) exited]
[Thread 0xb3095b90 (LWP 6269) exited]
[Thread 0xb5d29b90 (LWP 6264) exited]
[Thread 0xb5528b90 (LWP 6265) exited]
[Thread 0xb652ab90 (LWP 6263) exited]
[Thread 0xb4d27b90 (LWP 6266) exited]
[Thread 0xb2894b90 (LWP 6270) exited]
090201 19:57:24 InnoDB: Shutdown completed; log sequence number 46419
Plugin 'InnoDB' has ref_count=1 after deinitialization./home/redbrain/usr/local/drizzle/sbin/drizzled: Shutdown complete

Program exited with code 01.
(gdb)

So yeah i tracked this one more..
In drizzled.cc .. network_init()

for (next= ai, pollfd_count= 0; next; next= next->ai_next, pollfd_count++)
  {
    int ip_sock;

    ip_sock= socket(next->ai_family, next->ai_socktype, next->ai_protocol);

    if (ip_sock == -1)
    {
      sql_perror(ER(ER_IPSOCK_ERROR)); /* purecov: tested */
      unireg_abort(1); /* purecov: tested */
    }

socket() returns -1 for me... on the 2nd pass in the loop :( I think autoconf has defined
#ifdef IPV6_V6ONLY
      if (next->ai_family == AF_INET6)
      {
        error= setsockopt(ip_sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &flags, sizeof(flags));
        if (error !

I was thinking config.h may have defined ipv6 for me but it hasn't. So really not sure where to start debugging this :( Its giving me awful problems to test my patches because i can't actualy run drizzle i cant test my patches.

Related branches

Revision history for this message
Padraig O'Sullivan (posulliv) wrote :

Hey Philip,

I've never been able to re-produce this. Are you able to re-produce it?

-Padraig

Revision history for this message
RedBrain (herron-philip) wrote : Re: [Bug 324052] Re: Can't create IP socket: Address family not supported by protocolAborting Entering pool shutdown
Download full text (3.6 KiB)

Hey

Yeah this only happens me on my laptop i have it working fine on my desktop.

My Laptop runs Linux Mint i might see if i can reproduce this on my
desktop sometime. My desktop runs x64 ubuntu.

So yeah i'll keep you guys up to date on this!

2009/2/9 Padraig <email address hidden>:
> Hey Philip,
>
> I've never been able to re-produce this. Are you able to re-produce it?
>
> -Padraig
>
> --
> Can't create IP socket: Address family not supported by protocolAborting Entering pool shutdown
> https://bugs.launchpad.net/bugs/324052
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> Having strange problems unable to run drizzled:
>
> gdb output:
> [Thread debugging using libthread_db enabled]
> Changed limits: max_open_files: 1024 max_connections: 886 table_cache: 64[New Thread 0xb7b106f0 (LWP 6252)]
> [New Thread 0xb71eeb90 (LWP 6255)]
> [New Thread 0xb71adb90 (LWP 6256)]
> [New Thread 0xb716cb90 (LWP 6257)]
> [New Thread 0xb712bb90 (LWP 6258)]
> [New Thread 0xb70eab90 (LWP 6259)]
> [New Thread 0xb70a9b90 (LWP 6260)]
> [New Thread 0xb7068b90 (LWP 6261)]
> [New Thread 0xb7027b90 (LWP 6262)]
> [New Thread 0xb652ab90 (LWP 6263)]
> [New Thread 0xb5d29b90 (LWP 6264)]
> [New Thread 0xb5528b90 (LWP 6265)]
> [New Thread 0xb4d27b90 (LWP 6266)]
> 090201 19:57:22 InnoDB: highest supported file format is Barracuda.
> [New Thread 0xb4097b90 (LWP 6267)]
> [New Thread 0xb3896b90 (LWP 6268)]
> [Thread 0xb4097b90 (LWP 6267) exited]
> [New Thread 0xb3095b90 (LWP 6269)]
> [New Thread 0xb2894b90 (LWP 6270)]
> 090201 19:57:23 InnoDB Plugin 1.0.2 started; log sequence number 46409
> Can't create IP socket: Address family not supported by protocolAborting
> Entering pool shutdown
> [Thread 0xb70eab90 (LWP 6259) exited]
> [Thread 0xb71adb90 (LWP 6256) exited]
> [Thread 0xb7068b90 (LWP 6261) exited]
> [Thread 0xb7027b90 (LWP 6262) exited]
> [Thread 0xb70a9b90 (LWP 6260) exited]
> [Thread 0xb712bb90 (LWP 6258) exited]
> [Thread 0xb716cb90 (LWP 6257) exited]
> [Thread 0xb71eeb90 (LWP 6255) exited]
> 090201 19:57:23 InnoDB: Starting shutdown...
> [Thread 0xb3896b90 (LWP 6268) exited]
> [Thread 0xb3095b90 (LWP 6269) exited]
> [Thread 0xb5d29b90 (LWP 6264) exited]
> [Thread 0xb5528b90 (LWP 6265) exited]
> [Thread 0xb652ab90 (LWP 6263) exited]
> [Thread 0xb4d27b90 (LWP 6266) exited]
> [Thread 0xb2894b90 (LWP 6270) exited]
> 090201 19:57:24 InnoDB: Shutdown completed; log sequence number 46419
> Plugin 'InnoDB' has ref_count=1 after deinitialization./home/redbrain/usr/local/drizzle/sbin/drizzled: Shutdown complete
>
> Program exited with code 01.
> (gdb)
>
> So yeah i tracked this one more..
> In drizzled.cc .. network_init()
>
> for (next= ai, pollfd_count= 0; next; next= next->ai_next, pollfd_count++)
> {
> int ip_sock;
>
> ip_sock= socket(next->ai_family, next->ai_socktype, next->ai_protocol);
>
> if (ip_sock == -1)
> {
> sql_perror(ER(ER_IPSOCK_ERROR)); /* purecov: tested */
> unireg_abort(1); /* purecov: tested */
> }
>
> socket() returns -1 for me... on the 2nd pass in the loop...

Read more...

Revision history for this message
Andrew Garner (muzazzi) wrote : Re: [Bug 324052] [NEW] Can't create IP socket: Address family not supported by protocolAborting Entering pool shutdown

On Sun, Feb 1, 2009 at 2:05 PM, RedBrain <email address hidden> wrote:
> I was thinking config.h may have defined ipv6 for me but it hasn't. So really not sure where to start debugging this :( Its giving me awful problems to test my patches because i can't actualy run drizzle i cant test my patches.
>

Hmm. I was able to reproduce this on RHEL4. It looks like
getaddrinfo will return an AF_INET6 ai_family element even though the
system doesn't support it. I suppose we should check for errno ==
EAFNOSUPPORT and skip over it (with a warning). What platform did
you encounter this error on? You can probably work around it until
it gets fixed by specifying a --bind-address.

~Andrew

Revision history for this message
RedBrain (herron-philip) wrote :
Download full text (4.1 KiB)

Yeah i was thinking it was something like that. My laptop runs Linux
Mint 6. But it works fine on my desktop. I might try and do that check
on my laptop now quickly but i'll see what happens :)

2009/2/10 Andrew Garner <email address hidden>:
> On Sun, Feb 1, 2009 at 2:05 PM, RedBrain <email address hidden> wrote:
>> I was thinking config.h may have defined ipv6 for me but it hasn't. So really not sure where to start debugging this :( Its giving me awful problems to test my patches because i can't actualy run drizzle i cant test my patches.
>>
>
> Hmm. I was able to reproduce this on RHEL4. It looks like
> getaddrinfo will return an AF_INET6 ai_family element even though the
> system doesn't support it. I suppose we should check for errno ==
> EAFNOSUPPORT and skip over it (with a warning). What platform did
> you encounter this error on? You can probably work around it until
> it gets fixed by specifying a --bind-address.
>
> ~Andrew
>
> --
> Can't create IP socket: Address family not supported by protocolAborting Entering pool shutdown
> https://bugs.launchpad.net/bugs/324052
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> Having strange problems unable to run drizzled:
>
> gdb output:
> [Thread debugging using libthread_db enabled]
> Changed limits: max_open_files: 1024 max_connections: 886 table_cache: 64[New Thread 0xb7b106f0 (LWP 6252)]
> [New Thread 0xb71eeb90 (LWP 6255)]
> [New Thread 0xb71adb90 (LWP 6256)]
> [New Thread 0xb716cb90 (LWP 6257)]
> [New Thread 0xb712bb90 (LWP 6258)]
> [New Thread 0xb70eab90 (LWP 6259)]
> [New Thread 0xb70a9b90 (LWP 6260)]
> [New Thread 0xb7068b90 (LWP 6261)]
> [New Thread 0xb7027b90 (LWP 6262)]
> [New Thread 0xb652ab90 (LWP 6263)]
> [New Thread 0xb5d29b90 (LWP 6264)]
> [New Thread 0xb5528b90 (LWP 6265)]
> [New Thread 0xb4d27b90 (LWP 6266)]
> 090201 19:57:22 InnoDB: highest supported file format is Barracuda.
> [New Thread 0xb4097b90 (LWP 6267)]
> [New Thread 0xb3896b90 (LWP 6268)]
> [Thread 0xb4097b90 (LWP 6267) exited]
> [New Thread 0xb3095b90 (LWP 6269)]
> [New Thread 0xb2894b90 (LWP 6270)]
> 090201 19:57:23 InnoDB Plugin 1.0.2 started; log sequence number 46409
> Can't create IP socket: Address family not supported by protocolAborting
> Entering pool shutdown
> [Thread 0xb70eab90 (LWP 6259) exited]
> [Thread 0xb71adb90 (LWP 6256) exited]
> [Thread 0xb7068b90 (LWP 6261) exited]
> [Thread 0xb7027b90 (LWP 6262) exited]
> [Thread 0xb70a9b90 (LWP 6260) exited]
> [Thread 0xb712bb90 (LWP 6258) exited]
> [Thread 0xb716cb90 (LWP 6257) exited]
> [Thread 0xb71eeb90 (LWP 6255) exited]
> 090201 19:57:23 InnoDB: Starting shutdown...
> [Thread 0xb3896b90 (LWP 6268) exited]
> [Thread 0xb3095b90 (LWP 6269) exited]
> [Thread 0xb5d29b90 (LWP 6264) exited]
> [Thread 0xb5528b90 (LWP 6265) exited]
> [Thread 0xb652ab90 (LWP 6263) exited]
> [Thread 0xb4d27b90 (LWP 6266) exited]
> [Thread 0xb2894b90 (LWP 6270) exited]
> 090201 19:57:24 InnoDB: Shutdown completed; log sequence number 46419
> Plugin 'InnoDB' has ref_count=1 after deinitialization./home/redbrain/usr/local/drizzle/sbin/d...

Read more...

Changed in drizzle:
importance: Undecided → Low
Revision history for this message
Eric Day (eday) wrote :

I can take care of a proper socket/bind loop while I'm reworking the protocol code.

Changed in drizzle:
assignee: nobody → eday
importance: Low → Medium
milestone: none → aloha
status: New → Confirmed
milestone: aloha → cirrus
Eric Day (eday)
Changed in drizzle:
status: Confirmed → Fix Committed
Eric Day (eday)
Changed in drizzle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.