On Thu, Nov 10, 2016 at 05:05:08PM -0800, Joe Stringer wrote: > On 10 November 2016 at 15:57, Ben Pfaff <[email protected]> wrote: > > On Thu, Nov 10, 2016 at 02:55:15PM -0800, Joe Stringer wrote: > >> On 10 November 2016 at 13:42, Ben Pfaff <[email protected]> wrote: > >> > On Thu, Nov 10, 2016 at 01:28:22PM -0800, Joe Stringer wrote: > >> >> Previously, if vswitchd aborted then the log message would only be > >> >> printed to stderr, which may be hidden depending on how OVS is run. > >> >> Use vlog as well so that the error shows up in the logs. > >> >> > >> >> Signed-off-by: Joe Stringer <[email protected]> > >> > > >> > We should only use ovs_abort() in cases where it's potentially risky to > >> > call into vlog. Otherwise we should use vlog_abort(). > >> > > >> > It's easy to choose wrong. Do you see some places where we got it wrong? > >> > >> I was debugging some locking stuff with some WIP code and found that > >> when pthread returns errors, the logs would provide no details on the > >> termination. I suppose that in such cases we treat it as being risky > >> to use vlog (because vlog also does some locking). In that case, > >> atleast I understand the reasoning, could drop this patch. > > > > That was my reasoning, at any rate. I'm worried about deadlocks. > > Ironically, this was the thing I was trying to detect which wasn't > being logged ;)
I guess that we could modify ovs_abort() to start out by calling alarm(10), then delegating back to vlog_abort(). Then, if there's a deadlock, OVS will die from SIGALRM 10 seconds later. That might be a good compromise. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
