Hello, on FreeBSD 13.4 after updating apr1 to version 1.7.5, bareos-webui is not able to authenticate user. Apache throws error "[proxy_fcgi:error] [pid 8084:tid 35662020608] (22)Invalid argument: [remote IP.AD.DR.ES:48532] AH01075: Error dispatching request to : (sending stdin), referer: https://example.com/auth/login It seems there is also some weird behavior with nextcloud, unfortunately not reproducible (I was unable to upload some files, but it had nothing with size or type). After downgrading to 1.7.3, everything started working. Apache version is 2.4.62 with MPM_PREFORK disabled in favour of MPM_EVENT, but reverting it makes no change.
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!