Frequently Asked Questions for FreeBSD 2.X : Networking : I can't make ppp work. What am I doing wrong ? : Ppp gets a seg-fault, but I see no ppp.core file
Previous: Ppp ignores the `\' character in my chat script
Next: The process that forces a dial in auto mode never connects

10.7.19. Ppp gets a seg-fault, but I see no ppp.core file

Ppp (or any other program for that matter) should never dump core. Because ppp runs with an effective user id of 0, the operating system will not write ppps core image to disk before terminating it. If, however ppp is actually termating due to a segmentation violation or some other signal that normally causes core to be dumped, and you're sure you're using the latest version (see the start of this section), then you should do the following:

          $ tar xfz ppp-*.src.tar.gz
          $ cd ppp*/ppp
          $ echo STRIP= >>Makefile
          $ echo CFLAGS+=-g >>Makefile
          $ make clean all
          $ su
          # make install
          # chmod 555 /usr/sbin/ppp
        

You will now have a debuggable version of ppp installed. You will have to be root to run ppp as all of its privileges have been revoked. When you start ppp, take a careful note of what your current directory was at the time.

Now, if and when ppp receives the segmentation violation, it will dump a core file called ppp.core. You should then do the following:

          $ su
          # gdb /usr/sbin/ppp ppp.core
          (gdb) bt
          .....
          (gdb) f 0
          .....
          (gdb) i args
          .....
          (gdb) l
          .....
        

All of this information should be given alongside your question, making it possible to diagnose the problem.

If you're familiar with gdb, you may wish to find out some other bits and pieces such as what actually caused the dump and the addresses & values of the relevant variables.


Frequently Asked Questions for FreeBSD 2.X : Networking : I can't make ppp work. What am I doing wrong ? : Ppp gets a seg-fault, but I see no ppp.core file
Previous: Ppp ignores the `\' character in my chat script
Next: The process that forces a dial in auto mode never connects