Bug #48915 After haveing switched off the ipv6 support in OS, mysqld crashed in network_ini
Submitted: 19 Nov 2009 17:11 Modified: 7 Mar 2010 1:33
Reporter: Horst Hunger Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.6 (Celosia) OS:Linux (2.6.27.37-0.1-default #1 SMP 2009-10-15 x86_64)
Assigned to: Alexander Nozdrin CPU Architecture:Any

[19 Nov 2009 17:11] Horst Hunger
Description:
The core:

Program terminated with signal 11, Segmentation fault.
#0  0x00007fea8187bc66 in pthread_kill () from /lib64/libpthread.so.0
#0  0x00007fea8187bc66 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000b478f4 in my_write_core (sig=11) at stacktrace.c:309
#2  0x00000000006f37a5 in handle_segfault (sig=11) at mysqld.cc:2765
#3  <signal handler called>
#4  0x00000000006f5363 in network_init () at mysqld.cc:1845
#5  0x00000000006f7a50 in main (argc=10, argv=0x7fff0cbd2488) at mysqld.cc:4749

Thread 1 (Thread 6066):
#0  0x00007fea8187bc66 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000b478f4 in my_write_core (sig=11) at stacktrace.c:309
#2  0x00000000006f37a5 in handle_segfault (sig=11) at mysqld.cc:2765
#3  <signal handler called>
#4  0x00000000006f5363 in network_init () at mysqld.cc:1845
#5  0x00000000006f7a50 in main (argc=10, argv=0x7fff0cbd2488) at mysqld.cc:4749
Quitting: You can't do that without a process to debug.

How to repeat:
Switch off the IPv6 support of the Linux ("ping6 localhost" is failing).
execute the attached tests with mtr.
[19 Nov 2009 17:14] Horst Hunger
test source for mtr (touch r/ipv6.result).

Attachment: ipv6.test (application/octet-stream, text), 1.07 KiB.

[19 Nov 2009 17:15] Horst Hunger
sets the parameters.

Attachment: ipv6_connect-master.opt (application/octet-stream, text), 20 bytes.

[19 Nov 2009 17:16] Horst Hunger
thats the corresponding option file to ipv6.test.

Attachment: ipv6-master.opt (application/octet-stream, text), 38 bytes.

[19 Nov 2009 17:26] Horst Hunger
On an IPv4 system it would be nice if mysqld would start when getting "::" as IP (bind-address) as if it has been started with "0.0.0.0". That would make testing much simpler as mysqld would have been started at all and the IP can be checked in the application (test program). There is unfortunately no variable to check which IP version is active, like e.g. "have_ip_version" delivering 4 or 6.
[1 Dec 2009 17:19] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/92326

2936 Alexander Nozdrin	2009-12-01
      A patch for Bug#48915 (After having switched off the ipv6 support in OS,
      mysqld crashed in network_init()).
      
      The problem was that current_thd was not ready at that point in mysqld life,
      so ER() macro could not be used.
      
      The fix is to use ER_DEFAULT() macro, which is intented for such cases.
[1 Dec 2009 17:51] Alexander Nozdrin
Pushed into mysql-next-mr-alik.
[3 Dec 2009 9:09] Bugs System
Pushed into 5.6.0-beta (revid:alik@sun.com-20091202160026-699xnqx8c6a6t2lk) (version source revid:alik@sun.com-20091201165931-364c90gor5bjmlpo) (merge vers: 5.6.0-beta) (pib:13)
[3 Dec 2009 9:10] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091202161413-u81nw1foglcu7nao) (version source revid:alik@sun.com-20091201175258-yqm5qgc2v4czufpf) (merge vers: 6.0.14-alpha) (pib:13)
[16 Dec 2009 2:28] Paul DuBois
Noted in 5.6.0, 6.0.14 changelogs.

If IPv6 support in the operating system was turned off, mysqld
crashed in network_init().
[6 Mar 2010 11:01] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:wlad@sol-20091204200504-9d3d3b6ad75ijkqo) (merge vers: 5.6.0-beta) (pib:16)
[7 Mar 2010 1:33] Paul DuBois
Moved 5.6.0 changelog entry to 5.5.3.
[12 Apr 2010 16:53] Paul DuBois
Correction: No in any released version. No changelog entry needed.