Hi Guys,

I'm doing a robust test on a ramips 7620a chip, with a customized openwrt 
firmware. I ran into this rare issue recently. 
The system initialization stopped right before /etc/rc.d/ processing. Chances 
are around 5%.

After some debug work, I located the key code that caused the issue.
In procd/rcS.c, static void q_initd_run(...), I added a DEBUG log.

 76     pid = fork();
 77     if (pid < 0)
 78     {
 79         DEBUG(0, "in pid %d, fork failed! %s\n", getpid(), strerror(errno));
 80         return;
 81     }

In /etc/rc.local, I added 2 lines to make the system reboot in 20s.

sleep 20
reboot

Then the system would keep rebooting. After a couple of hours, the system 
stopped rebooting. From the log, I saw: 

procd: q_initd_run(70): start /etc/rc.d/S10boot boot
procd: q_initd_run(79): in pid 1, fork failed! Function not implemented

After it happened, I checked the memory usage, there was more than 6MB free 
memory.

In most cases, fork() in rcS.c works fine. The error "fork Function not 
implemented" is quite suspicious.
Any idea?



======================
Hua Shao
======================


************* Email Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to