https://redmine.lighttpd.net/
https://redmine.lighttpd.net/favicon.ico?1366732741
2009-07-09T23:49:01Z
lighty labs
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6152
2009-07-09T23:49:01Z
stbuehler
<ul><li><strong>File</strong> <a href="/attachments/959">fix-mod-scgi-2024.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/959/fix-mod-scgi-2024.patch">fix-mod-scgi-2024.patch</a> added</li><li><strong>Category</strong> changed from <i>core</i> to <i>mod_scgi</i></li><li><strong>Target version</strong> set to <i>1.4.24</i></li></ul><p>would be nice if you could try the attached patch and report back if it works. thx!</p>
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6153
2009-07-10T00:27:11Z
mbj
<ul></ul><p>Appliet your patch, recompiled, problem gone.<br />Thx for your really fast response!</p>
<p>Not tested this on the production maschine, test was on a funtoo/x86 unstable with lighttpd-1.4.x -svn.<br />The problem was reproducable without the patch in this environment.</p>
<p>Relevant strace (after patch):</p>
<pre>
connect(5, {sa_family=AF_FILE, path="/home/mbj/tmp/scgi.sock"...}, 25) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(2000), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
writev(5, [{"915:CONTENT_LENGTH\000171853\0SCGI\0001\0"..., 920}], 1) = 920
open("/var/tmp/lighttpd-upload-57l88a", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
sendfile64(5, 6, [0], 171853) = 106496
time(NULL) = 1247185051
poll([{fd=3, events=POLLIN}, {fd=-1}, {fd=5, events=POLLOUT}], 3, 1000) = 1 ([{fd=5, revents=POLLOUT|POLLERR|POLLHUP}])
sendfile64(5, 6, [106496], 65357) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
write(2, "2009-07-10 02:17:31: (mod_scgi.c."..., 1542009-07-10 02:17:31: (mod_scgi.c.2325) [REPORT ME] connection was dropped after accept(). reconnect() denied: write-offset: 107416 reconnect attempts: 0
) = 154
write(2, "2009-07-10 02:17:31: (mod_scgi.c."..., 892009-07-10 02:17:31: (mod_scgi.c.2393) fcgi-server disabled: 0 /home/mbj/tmp/scgi.sock
) = 89
close(5) = 0
time(NULL) = 1247185051
poll([{fd=3, events=POLLIN}, {fd=-1}, {fd=-1}], 3, 1000) = 0 (Timeout)
time(NULL) = 1247185052
poll([{fd=3, events=POLLIN}, {fd=-1}, {fd=-1}], 3, 1000) = 0 (Timeout)
time(NULL) = 1247185053
poll([{fd=3, events=POLLIN}, {fd=-1}, {fd=-1}], 3, 1000) = 0 (Timeout)
time(NULL) = 1247185054
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
write(2, "2009-07-10 02:17:33: (mod_scgi.c."..., 912009-07-10 02:17:33: (mod_scgi.c.2087) fcgi-server re-enabled: 0 /home/mbj/tmp/scgi.sock
... normal 1sec event loop...
</pre>
<p>1. try stderr printout:<br /><pre>
2009-07-10 02:17:02: (log.c.172) server started
2009-07-10 02:17:06: (mod_scgi.c.2639) error: unexpected close of scgi connection for / (no scgi process on host: , port: 0 ?)3
2009-07-10 02:17:06: (mod_scgi.c.2478) emergency exit: scgi: connection-fd: 4 fcgi-fd: 5
</pre></p>
<p>2. try stderr printout:</p>
<pre>
2009-07-10 02:19:41: (log.c.172) server started
2009-07-10 02:19:54: (mod_scgi.c.2325) [REPORT ME] connection was dropped after accept(). reconnect() denied: write-offset: 107416 reconnect attempts: 0
2009-07-10 02:19:54: (mod_scgi.c.2393) fcgi-server disabled: 0 /home/mbj/tmp/scgi.sock
</pre>
<p>sever.configuration:</p>
<pre>
server.modules = ( "mod_scgi" )
server.port = 2000
server.document-root = "."
scgi.server = ( "/" => ((
"socket" => "/home/mbj/tmp/scgi.sock",
"check-local" => "disable",
"disable-time" => 1
)))
</pre>
<p>just wondering about the stderr printouts, 1. time was differend from the next ones? Indeterminism???</p>
<p>Regarts</p>
<p>Markus</p>
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6173
2009-07-13T14:11:06Z
stbuehler
<ul></ul><p>There are different places where errors are handled, so yes, indeterminism.</p>
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6175
2009-07-13T14:15:04Z
stbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset r2585.</p>
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6216
2009-07-22T18:05:22Z
jbj
<ul></ul><p>stbuehler wrote:</p>
<blockquote>
<p>Applied in changeset r2585.</p>
</blockquote>
<p>hi stbuehler, sorry if its wrong place to ask. But the same problem (broken pipe) will also be in mod_proxy while uploading right?</p>
Lighttpd - Bug #2024: Infinite Syscall loop on broken SCGI connection while performing upload.
https://redmine.lighttpd.net/issues/2024?journal_id=6227
2009-07-23T23:42:08Z
stbuehler
<ul></ul><p>Yes, right. see r2596.</p>