Jan 17 17:33:42 mypisem kernel: pptpctrl[16774]: segfault at 0 ip b76a4340 sp bf9a7ef0 error 4 in libc-2.9.so[b762b000+159000] Jan 17 17:33:43 mypisem kernel: pptpctrl[16786]: segfault at 0 ip b7619340 sp bfb7d280 error 4 in libc-2.9.so[b75a0000+159000] (gdb) bt #0 0xb767ac90 in strncpy () from /lib/libc.so.6 #1 0x0804b815 in strlcpy ( dst=0xbfd586a4 "\364\357\004\b\270\206տi\213\004\b\020\361v\267\244\206տ\224\206տ\031\305\004\b\004st\267\364ot\267\360\206տ\364ot\267\200\314w\267 ", src=0x0, size=16) at compat.c:21 #2 0x0804a775 in main (argc=7, argv=0xbfd58774) at pptpctrl.c:140
(gdb) bt #0 0xb767ac90 in strncpy () from /lib/libc.so.6 #1 0x0804b815 in strlcpy ( dst=0xbfd586a4 "\364\357\004\b\270\206տi\213\004\b\020\361v\267\244\206տ\224\206տ\031\305\004\b\004st\267\364ot\267\360\206տ\364ot\267\200\314w\267 ", src=0x0, size=16) at compat.c:21 #2 0x0804a775 in main (argc=7, argv=0xbfd58774) at pptpctrl.c:140
1) This is encountered when pptpd has approx. > 100 clients, exact value differs from time to time. No more clients may connect due to this bug. 2) This segfault due to there is no local-ip arg after valid (i.e. existent and not-0) presence flag. 3) If load lowers than clients may connect again. My resolution: most probably memory allocation failture, not a software bug: local filled from pptpd.c at lines 637, 753 and 765 - last one is only not checked and maybe null, but this will lead to segfault on strdup in pptpmanager.c:132, but it goes ok. So - strdup is returning NULL, probably.
Thanks for report. And guys, please, read, what is written with BIG BOLD letters :) Setting product correctly.
Created attachment 216940 [details, diff] Proposed patch to syslog memory failture errors on strduping. Please test this patch, it will show, if I'm correct and your problem is memory. This should echo errors into syslog if strdup will return null, preventing pptpctrl from running. Also: this another possible behaviour - it just always run pptpctrl, even if ip-parsing failed last time. Bug-poster should check his logs, if there is any errors about ip-parsing, maybe max-connections reached =)? This patch should notify about last possible error. So logs should provide valuable information on what is happening. Maybe we should also break routines if parsing failed? This shouldn't be very hard...
mclion any progress here?
(In reply to comment #5) > mclion any progress here? Hello. Applying this patch changes are allowed, falls tazhe error.
(In reply to comment #6) > (In reply to comment #5) > > mclion any progress here? Hello. Applying this patch changes have made it, drops the same error.
Forum thread states that the problem was in wrong configuration. That should be fixed too, but in any case without proper backtrace or steps to reproduce this problem I don't know what to do here. Closing for now.