2010-10-13 09:15:17 pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Vlad Orlov (RUSSIAN FEDERATION)
Message: 94467
I'm using uClinux 2009R1-RC6 on BF533 board. pppd-2.4.4 is fully configured and runs normally - but only if /etc/ppp/ip-up is not present.
When the script is there (I copied it from ppp-2.4.4/scripts/ip-up.local.add file), pppd crashes with "Jump to NULL address" trying to execute it.
Trace analyzing showed that the crash occurs in safe_fork_tail() function in ppp-2.4.4/pppd/main.c:
1557 if (pid > 0) {
1558 /* parent */
1559 close(pipefd[1]);
1560 /* this read() blocks until the close(pipefd[1]) below */
1561 complete_read(pipefd[0], buf, 1);
1562 close(pipefd[0]);
1563 return pid;
1564 }
It somehow returns to 0x00000000. I suppose this happens when pppd calls safe_fork_tail() from run_program(), but I don't know for sure.
Crash log is in the attachment.
pppd-crash.log
QuoteReplyEditDelete
2010-10-13 09:53:31 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Mike Frysinger (UNITED STATES)
Message: 94472
post your ppp config files and the command line you're using to execute pppd
QuoteReplyEditDelete
2010-10-14 02:17:55 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Vlad Orlov (RUSSIAN FEDERATION)
Message: 94501
Here's the contents:
root: /> ls -R /etc/ppp
/etc/ppp:
chap-secrets chatscripts options pap-secrets peers
/etc/ppp/chatscripts:
beeline-gprs-connect-chat gprs-disconnect-chat
/etc/ppp/peers:
beeline-gprs
Scripts files are in the attachments, except for chap-secrets - it's empty as I'm using PAP, not CHAP.
The command line I'm using to connect to ISP is:
pppd call beeline-gprs &
pap-secrets
options
beeline-gprs-connect-chat
gprs-disconnect-chat
beeline-gprs
QuoteReplyEditDelete
2010-10-29 03:21:35 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Vlad Orlov (RUSSIAN FEDERATION)
Message: 95393
so... no idea about what this could be?
QuoteReplyEditDelete
2010-10-29 05:37:47 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Sonic Zhang (CHINA)
Message: 95395
Which binary format do you build? FDPIC or FLAT?
Could you try to enlarge the stack of the ppp?
QuoteReplyEditDelete
2010-11-01 05:08:14 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Vlad Orlov (RUSSIAN FEDERATION)
Message: 95439
I'm using FLAT.
Stack size is already increased. If I leave it at default value (that is, 4096), pppd fails runtime stack checking (-mstack-check-l1).
So I've increased it first to 8192, then to 65536. No good - pppd keeps crashing at executing ip-up anyway.
I doubt that it's the stack problem...
QuoteReplyEditDelete
2010-11-02 18:26:45 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Mike Sinkovsky (RUSSIAN FEDERATION)
Message: 95495
I think it is fork/vfork problem, not stack.
I too tried to run pptp client on blackfin - no success.
If application logic heavy related on parent/child concurrency, I do'nt know how to port it to nommu processor.
QuoteReplyEditDelete
2010-11-02 23:13:52 Re: pppd jumps to null address while trying to exec /etc/ppp/ip-up script
Sonic Zhang (CHINA)
Message: 95503
You can change all fork calls into pthread create calls other than simple vfork.