mistwang,
I don't believe the problem is with the perl environment setup in the chroot. The reason is that if I execute the script as a CGI vs lsws it works fine. I seem to be only getting the failure when attempting to use the lsperld.fpl script to run it as fastcgi.
After running lsperld.fpl as you suggested and comparing the output from each I could only find one small difference. Running in the chroot the strace revealed "--- SIGCHLD (Child exited) @ 0 (0) ---". This was the only difference from the entire trace. I compared line by line and verified each lib reference that was used.
lsperld.fpl run outside of chroot
Code:
listen(3, 5) = 0
access("/chroot/opt/lsws/fcgi-bin/lsperld.fpl", X_OK) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11, <ignored>, <ignored>, 0x40044748) = 20335
shutdown(3, 1 /* send */) = 0
select(4, [3], NULL, NULL, {2, 0}
) = 0 (Timeout)
close(3) = 0
exit_group(0) = ?
lsperld.fpl run inside the chroot environment
Code:
listen(3, 5) = 0
access("/opt/lsws/fcgi-bin/lsperld.fpl", X_OK) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11, <ignored>, <ignored>, 0x40044748) = 20315
--- SIGCHLD (Child exited) @ 0 (0) ---
shutdown(3, 1 /* send */) = 0
select(4, [3], NULL, NULL, {2, 0}
) = 0 (Timeout)
close(3) = 0
exit_group(0) =
I'm not sure what I should be looking for now, however I think if I can find another fastcgi script I'll validate it against my environment setup. If it works then I know the problem is with lsperld.fpl somewhere..