google-code-export / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
1 stars 1 forks source link

sl.code not set #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I can't reliably reproduce this, but I wanted to at least record it.  Most
of the time, I would get the errors in issue #17.

Technically this is in subversion code, but its all tied into serf.  The
svn checkout in question is about 1000 files.

Build svn with:  serf r1109,  subversion r25246

valgrind --tool=memcheck --partial-loads-ok=yes --num-callers=25 \
 --log-file=/tmp/valsvn \
 --suppressions=/home/dchristian/www/no_crawl/svn-trace/val.sup \
 --gen-suppressions=all \
 ~/bin/svn checkout http://my/internal/repo/crawler

==17427== Warning: invalid file descriptor -1 in syscall close()
==17427== Conditional jump or move depends on uninitialised value(s)
==17427==    at 0x4143EB5: handle_response (util.c:949)
==17427==    by 0x414E468: read_from_connection (context.c:742)
==17427==    by 0x414E5D7: process_connection (context.c:846)
==17427==    by 0x414E806: serf_context_run (context.c:968)
==17427==    by 0x414189C: finish_report (update.c:2138)

Original issue reported on code.google.com by DanChris...@gmail.com on 1 Jun 2007 at 8:45

GoogleCodeExporter commented 9 years ago
ra_serf isn't checking the return code - please try this patch out.

Index: subversion/libsvn_ra_serf/util.c
===================================================================
--- subversion/libsvn_ra_serf/util.c    (revision 25257)
+++ subversion/libsvn_ra_serf/util.c    (working copy)
@@ -911,6 +911,11 @@
     {
       return status;
     }
+  if (!sl.version && (APR_STATUS_IS_EOF(status) ||
+                      APR_STATUS_IS_EAGAIN(status)))
+    {
+      return status;
+    }

   status = serf_bucket_response_wait_for_headers(response);
   if (status)

Original comment by justin.e...@gmail.com on 1 Jun 2007 at 9:54

GoogleCodeExporter commented 9 years ago
A quick look at the stack traces from #16 and #17 shows that this patch may fix 
them
as well.

Original comment by justin.e...@gmail.com on 1 Jun 2007 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by justin.e...@gmail.com on 1 Jun 2007 at 9:55

GoogleCodeExporter commented 9 years ago
This fixes it most times.

Other times (about 1 in 3) it gets hung (valgrind log attached).  Only the first
error shows up before the Ctrl-C to break out of the hang (but this may be a
buffering effect).  It does catch the signal and exit nicely.

Original comment by DanChris...@gmail.com on 1 Jun 2007 at 10:56

Attachments:

GoogleCodeExporter commented 9 years ago
Marking as fixed - the patch was committed in r25271 to Subversion trunk.

Original comment by justin.e...@gmail.com on 9 Jun 2007 at 12:29