[Linuxptp-users] ptp4l is dead with Segmentation Fault
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Takahiro S. <tsh...@gm...> - 2012-03-08 06:57:50
|
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. The error is Segmentation Fault. I checked coredump. [root@Fedora14-LinuxTeam-dev linuxptp-code]# ./ptp4l -i eth7 -m -v Segmentation fault (coredump) [root@Fedora14-LinuxTeam-dev linuxptp-code]# gdb ptp4l core.21111 GNU gdb (GDB) Fedora (7.2-51.fc14) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/okada/work/ieee1588/test-app/linuxptp-code/ptp4l...done. [New Thread 21111] Missing separate debuginfo for Try: yum --disablerepo='*' --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/65/726c76f0ef4466fe3e7f4b0b78d51d49bf149b Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] Loaded symbols for /lib/libpthread.so.0 Core was generated by `./ptp4l -i eth7 -m -v'. Program terminated with signal 11, Segmentation fault. #0 0x002a7f12 in __cmsg_nxthdr () from /lib/libc.so.6 Missing separate debuginfos, use: debuginfo-install glibc-2.13-1.i686 (gdb) where #0 0x002a7f12 in __cmsg_nxthdr () from /lib/libc.so.6 #1 0x0804ec51 in receive (fd=9, buf=0xbff89258, buflen=44, hwts=0x9abe6e0, flags=8192) at udp.c:286 #2 0x0804edda in udp_send (fda=0x9a7b0e0, event=1, buf=0x9abe680, len=44, hwts=0x9abe6e0) at udp.c:343 #3 0x0804ca2c in port_delay_request (p=0x9a7b0d0) at port.c:354 #4 0x0804dd60 in port_event (p=0x9a7b0d0, fd_index=3) at port.c:886 #5 0x0804a3bb in clock_poll (c=0x8051360) at clock.c:316 #6 0x080493da in main (argc=5, argv=0xbff89ad4) at ptp4l.c:195 (gdb) q 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? 2. Is this modification correct? Thanks and Best regards, |