NetBSD-Bugs archive

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

kern/39979: Changes on 2008-11-07 00:20 result in hard system hang.



>Number:         39979
>Category:       kern
>Synopsis:       Starting openvpn causes a hard system hang when starting 
>openvpn.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 20 17:30:01 +0000 2008
>Originator:     Sverre Froyen
>Release:        NetBSD 5.99.01
>Organization:
        Viewmark
>Environment:
System: NetBSD abbor.fesk.com 5.99.01 NetBSD 5.99.01 (GENERIC) #4: Thu Nov 20 
09:23:18 MST 2008 
toor%abbor.fesk.com@localhost:/usr/tsrc/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Since the commit
http://mail-index.netbsd.org/source-changes/2008/11/07/msg212329.html
starting openvpn (from pkgsrc) causes the system to hang hard, i.e.,
I cannot even break into the debugger.  A kernel build from sources at
2008-11-07 00:19 work fine, another from 00:30 causes a hang.

The fatal piece of openvpn code appears to be (in misc.c):

    pid = fork ();
    if (pid == (pid_t)0) /* child side */
      {
        execve (cmd, argv, envp);
        exit (127);
      }
    else if (pid < (pid_t)0) /* fork failed */
      ;
    else /* parent side */
      {
        if (waitpid (pid, &ret, 0) != pid)
          ret = -1;
      }

The command being executed is:

/sbin/ifconfig tun0 10.8.1.14 10.8.1.13 mtu 1500 netmask 255.255.255.255 up

I'm guessing that it is the ifconfig command that is the culprit.  I 
can run the command from the shell prompt without error, and I was
able to run openvpn in the debugger *once* without hanging the system,
so I suspect there might be a race condition somewhere.  I turned on
LOCKDEBUG to see if that might catch the error but it made no difference.

>How-To-Repeat:
Build and boot a GENERIC kernel from CVS sources after 2008-11-07 00:30.
Start openvpn. Observe the system hanging.
>Fix:
        Unknown



Home | Main Index | Thread Index | Old Index