On 10/02/2010 14:30, Anurag S. Maskey wrote:
> In ncu_ip.c:nwamd_handle_if_state_event(), what is the reasoning 
> behind the following lines of code?  Can't the NCU be in 
> offline*/initializing state?

I would have thought that wouldn't be a problem since
before plumbing we enqueue a WAITING_FOR_ADDR
event, so it'll be processed before we plumb and configure
addresses. I don't think we can miss IF_STATE events
as a consequence but I'm not 100% sure. Do you see
the log message indicating that you're in offline*/init?

     223             /*
     224              * Enqueue a WAITING_FOR_ADDR aux state change so that
     225              * we are eligible to receive the IF_STATE events
     226              * associated with static, DHCP, DHCPv6 and autoconf
     227              * address assignment.  The latter two can happen
     228              * quite quickly after plumbing so we need to be ready.
     229              */
     230             nwamd_object_set_state(NWAM_OBJECT_TYPE_NCU,
     231                 object_name, NWAM_STATE_OFFLINE_TO_ONLINE,
     232                 NWAM_AUX_STATE_IF_WAITING_FOR_ADDR);
     233

>
>
>        case NWAM_STATE_OFFLINE_TO_ONLINE:
>                if (aux_state != NWAM_AUX_STATE_IF_WAITING_FOR_ADDR &&
>                    aux_state != NWAM_AUX_STATE_IF_DHCP_TIMED_OUT) {
>                        nlog(LOG_DEBUG, 
> "nwamd_ncu_handle_if_state_event: "
>                            "if %s is in invalid aux state %s for 
> IF_STATE "
>                            "events", event->event_object,
>                            nwam_aux_state_to_string(aux_state));
>                        nwamd_event_do_not_send(event);
>                        nwamd_object_release(ncu_obj);
>                        return;
>                }
>                break;
>
> The state machine cycles for a very very very long time before the NCU 
> comes up.  In my sparc test machine, one of the NCUs is cycling 
> through the above code for > 5 minutes and shows no signs of stopping.
Is this using the Automatic NCP? Could you generate a core file
and post it somewhere? Thanks!

Alan

Reply via email to