I've been fighting this problem for months now. When using cURL to connect to a API over SSL in my chroot'd web server, the application appeared to hang perpetually. After additional investigation, I discovered that it eventually get's the content but takes FOREVER to finish (approximately an hour). Restarting Apache without mod_chroot and everything works as expected. So I definitely had a problem with my jail.
Common cause of SSL/cURL/chroot was misplaced certificates or missing libraries. As stated in my article about creating a chroot'd environment for apache, strace is your pal. I ran a few straces and was noticing the following at the point of connecting to the API:
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
6923 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
6923 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
6923 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
6923 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
6923 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
6923 waitpid(-1, 0xbfdb0248, WNOHANG|WSTOPPED) = 0
Recent comments
37 weeks 6 days ago
38 weeks 4 days ago
42 weeks 6 hours ago
42 weeks 6 hours ago
1 year 6 weeks ago
1 year 14 weeks ago
1 year 21 weeks ago
1 year 25 weeks ago
1 year 32 weeks ago
1 year 32 weeks ago