On Tue, Jan 07, 2014 at 06:56:54PM +0100, Miroslav Lichvar wrote:
>
> It looks like an old bug, which become only visible when so much code
> was added to ptp4l that the port name on stack is overwritten before
> the socket is created.
I agree that the name on the stack is a bug, but I don't think it is
the cause.
I see this issue appear when running ptp4l in slave only mode. I think
this is caused by the new timer code causing this part of port_event()
to trigger:
if (clock_slave_only(p->clock) && p->delayMechanism != DM_P2P &&
port_renew_transport(p)) {
return EV_FAULT_DETECTED;
}
Then ptp4l starts closing and reopening the UDS socket in a rapid
sequence.
Here is a bit of hacked debuggin code that shows the problem. Using
set_tmo_log hides the bug, and set_tmo_random exposes it.
static int port_set_announce_tmo(struct port *p)
{
pr_debug("port_set_announce_tmo %hu announceReceiptTimeout=%d",
portnum(p), p->announceReceiptTimeout);
#if 1
return set_tmo_random(p->fda.fd[FD_ANNOUNCE_TIMER],
p->announceReceiptTimeout, 1, p->logAnnounceInterval);
#else
return set_tmo_log(p->fda.fd[FD_ANNOUNCE_TIMER],
p->announceReceiptTimeout, p->logAnnounceInterval);
#endif
}
Still need more time to figure this out...
Thanks,
Richard
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel