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

Re: [Xen-devel] [RFC XEN PATCH for-4.13 1/4] libxl: Introduce libxl__ev_child_kill



Anthony PERARD writes ("Re: [RFC XEN PATCH for-4.13 1/4] libxl: Introduce 
libxl__ev_child_kill"):
...
> > > +    if (status) {
> > > +        libxl_report_child_exitstatus(CTX, XTL_ERROR,
> > > +                                      "killed fork (dying as expected)",
> > > +                                      pid, status);
> > > +    } else {
> > > +        LOG(DEBUG, "killed child exit cleanly, unexpected");
> > 
> > I don't think this is entirely unexpected.  Maybe the child was just
> > exiting at the point where libxl__ev_child_kill was called.
> > 
> > And, please check log the actual whole exit status.  "status" is a
> > wait status.  We want to know what signal it died from, whether it
> > core dumped, the exit status, etc.  Probably, you should call
> > libxl_report_child_exitstatus.
> 
> It does ;-).

Oh.  Err.  Yes.

>   But I guess I could call libxl_report_child_exitstatus()
> unconditionally, so even if status=0.

I think that would be fine.  I'm not sure this code knows what set of
exit statuses are plausible so I think calling all kinds of exit
`expected' seems best to me.

> > > @@ -1891,7 +1891,8 @@ static bool ao_work_outstanding(libxl__ao *ao)
> > >       * decrement progress_reports_outstanding, and call
> > >       * libxl__ao_complete_check_progress_reports.
> > >       */
> > > -    return !ao->complete || ao->progress_reports_outstanding;
> > > +    return !ao->complete || ao->progress_reports_outstanding
> > > +        || ao->outstanding_killed_child;
> > >  }
> > 
> > I wonder if this should gain a new debug message.  If the child gets
> > lost or stuck for some reason, it will otherwise require searching the
> > past log to find out why the ao doesn't return.
> 
> Do you mean adding a debug message in libxl__ev_child_kill_deregister()?
> It's probably a good idea.
...
> Or should we also add a debug log in libxl__ao_complete() ?

The latter, yes.  Because that happens at the point where the AO is
otherwise complete.  So if one is reading the log to try to find out
why the thing hasn't completed the debug log will actually say
something about it where you're looking, rather than miles away
somewhere in the scroll.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.