NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/49284: sysinst segfaults when configuring network manually



>Number:         49284
>Category:       install
>Synopsis:       sysinst segfaults when configuring network manually
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 14 09:40:00 +0000 2014
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, releng daily build of 201410140110Z
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

About a week ago, during the period of build breakage between CVS
dates 2014.10.07.21.50.36 and 2014.10.08.05.44.03, sysinst started
segfaulting during installation when the network is configured
manually (as opposed to using autoconfiguration).  The segfault
occurs at the point where the network configuration has been entered
and approved by answering "yes" to the question "Are they OK?".

Most of the changes made during the period in case involved the libc
time facilities, with the commit message "Sync with tzcode2014h".
I suspect the crash happens when sysinst calls ctime() as part
of setting up /etc/resolv.conf, in src/usr.sbin/sysinst/net.c:

               scripting_fprintf(f, ";\n; BIND data file\n; %s %s;\n",
                    "Created by NetBSD sysinst on", ctime(&now));

This suspicion is supported by the presence of a zero-byte resolv.conf
after the crash.

I have only been able to reproduce this when booting from the install
media, and not by running sysinst on an already-installed system.
This makes the problem hard to track down since the install media lack
debugging tools.

>How-To-Repeat:

Assuming the 201410140110Z build is still on nyftp:

  pkg_add qemu
  ftp http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201410140110Z/amd64/installation/cdrom/boot-com.iso
  qemu-system-x86_64 -nographic -cdrom boot-com.iso

Then answer the prompts as follows:

  Terminal type (just hit ENTER for 'vt220'): vt220
  a: Installation messages in English         
  Keyboard type a: unchanged
  e: Utility menu
  c: Configure network
  a: wm0
  network media type: autoselect
  Perform autoconfiguration? b: No
  Your host name: foo
  Your DNS domain: bar
  Your IPv4 number: 10.0.0.2
  IPv4 Netmask [0xff000000]: 255.0.0.0
  IPv4 gateway: 10.0.0.1
  Select DNS server: a: google-public-dns-a.google.com (IPv4)
  Are they OK? a: Yes

After selecting the final "Yes", you will see:

  [1]   Segmentation fault      ${cmd}
  To return to the installer, quit this shell by typing 'exit' or ^D.
  #                 

>Fix:



Home | Main Index | Thread Index | Old Index