Re: [Linuxptp-users] ptp4l is dead with Segmentation Fault
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2012-03-08 18:11:57
|
On Thu, Mar 08, 2012 at 03:57:42PM +0900, Takahiro Shimizu wrote: > Hello, > > I am trying ptp4l with hardware clock. > The ieee1588 hardware is Intel EG20T. > The sync seems OK. > However ptp4l is sometimes dead when we transfer many data simultaneously. What do you mean by "many data simultaneously"? > The error is Segmentation Fault. > I checked coredump. > Core was generated by `./ptp4l -i eth7 -m -v'. | Wow, you have a lot of interfaces! ----+ > Program terminated with signal 11, Segmentation fault. > #0 0x002a7f12 in __cmsg_nxthdr () from /lib/libc.so.6 This is strange. It seems that the control buffer is corrupted. Did you modify the receive() function? Can you provide a hex dump of the control[] buffer and the values of 'struct msghdr msg' before and after the call to recvmsg? > The error is occured in receive function in udp.c. > I assumed that errno == EAGAIN is happened many times. > I tried usleep(1000); instead of usleep(1); > > The result seems OK. > My question are: > 1. Did anyone face the same issue? Yes, this issue appears when the driver is very slow to deliver a Tx time stamp. > 2. Is this modification correct? I think it is fine to increase the usleep time for testing, but you should find out why the time stamp is so slow. The better solution (for ptp4l) is to allow changing the value of 'try_again' as command line or config file option. HTH, Richard |