Summary: | devel/apr1: proxy_fcgi:error after updating to 1.7.5 | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Tomáš Čiernik <tomas> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-apache (Nobody) <apache> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | brnrd, g.teley, jkim | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(apache) |
||||
Version: | Latest | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
URL: | https://bz.apache.org/bugzilla/show_bug.cgi?id=69410 | ||||||
Attachments: |
|
Description
Tomáš Čiernik
2024-10-16 10:36:29 UTC
I may add to this the following: https://forums.freebsd.org/threads/apache-2-4-reverse-proxy-error-22-invalid-argument.95429/ Not fcgi, but the same error. Reverting to previous version solved it. After some investigation I figured out suspicious behavior on TimeOut declaration. After decrease its value to 2147 proxy_fcgi error disappeared. "decrease TimeOut value to 2147" is the fix "decrease TimeOut value to 2147" is just a workaround. I experienced a similar problem and I found the following upstream PR: https://bz.apache.org/bugzilla/show_bug.cgi?id=69410 I started bisecting commits to find the culprit and I found reverting this commit fixes my problem: https://svn.apache.org/viewvc?view=revision&revision=1909335 This patch to be specific: https://svn.apache.org/viewvc/apr/apr/branches/1.7.x/support/unix/waitio.c?r1=1909335&r2=1909334&view=patch I believe the upstream patch is correct but it causes regressions for certain applications, which depend on the previous (mis)behavior, i.e., waiting forever rather than failing almost immediately. Created attachment 255205 [details] Fix poll(2) usage To my surprise, this patch was enough to fix the problem for me. It seems APR follows Linux poll() behavior, i.e., if timeout is negative, it is infinite. We do not allow any negative timeout other than INFTIM(-1). It seems POSIX does not define this. https://man7.org/linux/man-pages/man2/poll.2.html https://pubs.opengroup.org/onlinepubs/009696799/functions/poll.html A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=efc00d9fd418d84a1f88c3b74a2d07bd41df7f91 commit efc00d9fd418d84a1f88c3b74a2d07bd41df7f91 Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2024-11-16 11:20:26 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2024-11-16 11:20:26 +0000 devel/apr1: Fix poll(2) timeout issue Fix by jkim PR: 282137 Reported by: Tomáš Čiernik <tomas ciernik sk> devel/apr1/Makefile | 2 +- devel/apr1/files/patch-support_unix_waitio.c (new) | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) Thanks for providing the solution jkim! |