Commit Graph
4924 Commits
Author SHA1 Message Date
Nils Durner 81c9c75f92 fix plibc check 2011-11-26 19:41:25 +00:00
Nils Durner ae76a24c03 fix mingw 2011-11-25 14:15:00 +00:00
Christian Grothoff 6f2414ef4c check NULL 2011-11-24 14:11:55 +00:00
Christian Grothoff 6a7d557041 fix 2011-11-23 08:19:12 +00:00
Christian Grothoff 8b58c898ee fix compile errors 2011-11-22 08:57:45 +00:00
Christian Grothoff 6cf74917a7 added flag for 'Date:' suppression 2011-11-21 17:52:44 +00:00
Christian Grothoff 46e0cc9954 releasing 0.9.17 2011-11-19 19:09:10 +00:00
Christian Grothoff 7c75a906a6 fixing 1914 2011-11-18 19:18:24 +00:00
Christian Grothoff 841845233e testcase for 1901 2011-11-13 13:12:04 +00:00
Christian Grothoff 7c88233a64 trying to fix issue with 'connectin: close' header duplicated in footer reported by Dirk on mailinglist 2011-11-13 12:36:59 +00:00
Christian Grothoff 7e0cf71fae old release diff 2011-11-13 12:34:54 +00:00
Christian Grothoff fd9430bbef typo 2011-11-04 18:44:29 +00:00
Christian Grothoff 98d2c01bcf docu 2011-11-04 09:03:24 +00:00
Christian Grothoff 58aa522a09 fix 2011-11-03 17:15:45 +00:00
Christian Grothoff 7333727189 fixing shutdown issue on OS X -- 1760 2011-11-03 09:29:31 +00:00
Christian Grothoff 7b9cf32e4e fix testcase, do not sleep if client is inactive 2011-11-01 18:12:26 +00:00
Christian Grothoff 4eb568c37c send connection:close always if we shutdown socket for reading, see mantis #1760 2011-11-01 17:52:48 +00:00
Christian Grothoff fcf8127533 LRN: treat EAGAIN as EINTR 2011-10-27 12:17:14 +00:00
Christian Grothoff 15927a0e89 no iberty on unix 2011-10-13 19:49:37 +00:00
Christian Grothoff a7fd3c7f54 speed up test case, print performance 2011-10-12 09:25:52 +00:00
Christian Grothoff 932f1bfbbd fixing #1824 2011-10-12 08:42:49 +00:00
Christian Grothoff da7e8ad76d fixing #1824 2011-10-12 08:41:49 +00:00
Christian Grothoff 2160c66589 LRN: w32 test case fixes 2011-10-07 17:51:10 +00:00
Christian Grothoff 7a4bb2a0f7 bump version 2011-09-30 15:58:44 +00:00
Christian Grothoff 65f549493a fixing 1811 2011-09-30 15:57:34 +00:00
Christian Grothoff fe7ed03a63 use 127.0.0.1 instead of localhost for testcurl/*.c;
performs far better on OS X and Solaris-style kernels

Will Bryant (<will.bryant@gmail.com>) writes:

On 21/09/2011, at 20:14 , Christian Grothoff wrote:

> > On the OpenIndiana performance, do you have something like 'strace' where you 
> > could monitor what's going on? Most likely the code hangs blocking in some 
> > syscall for longer than it should...

It has truss, and for the record, it showed no slow calls.

The problem turned out to be the tests using "localhost", which was picking the primary interface for the box, not the loopback interface.

Changing perf_get_concurrent.c to use 127.0.0.1 makes it vastly faster - it went from ~35 requests/sec to 12,000-15,000 requests/sec.

It makes a big difference on OS X too - from 115-140 requests/sec on my old macbook to 600-3600 requests/sec (variation here mainly due to the large amount of other stuff I have running).

Patch attached.
2011-09-29 15:04:50 +00:00
Christian Grothoff b6f6b9a5cc release0.9.15 2011-09-28 06:41:03 +00:00
Christian Grothoff 01541405d9 addressing odd URL format described by Daniel Chiaramello on the MHD mailinglist today 2011-09-27 11:13:04 +00:00
Christian Grothoff 89c4f48827 w32/plibc patch from LRN 2011-09-26 20:28:50 +00:00
Christian Grothoff 80057ce48e curl check 2011-09-26 20:28:16 +00:00
Christian Grothoff 10117d2445 make sure to clean up response ASAP 2011-09-26 19:25:25 +00:00
Christian Grothoff 7c9073a4c9 update 2011-09-26 19:24:42 +00:00
Christian Grothoff 29dae094f2 report failure to exec curl 2011-09-26 19:16:59 +00:00
Christian Grothoff c36962f2c1 fix 2011-09-21 07:58:16 +00:00
Christian Grothoff 41be6325c8 From:
Will Bryant <will.bryant@gmail.com>
  To: 
libmicrohttpd development and user mailinglist <libmicrohttpd@gnu.org>
  Date: 
Today 03:01:54 AM
  Attachments: 
 0001-use-separate-ports-for-subsequent-tests-in-the-perf-.patch
   
So patch attached to use sequential port number assignments in those two perf test programs - with that and the earlier pipe shutdown patch, OS X passes all tests now.

OpenIndiana also passes all the perf tests, leaving just the SIGPIPE matter.  Incidentally, performance is terrible there.  I would be interested to know why - my OpenIndiana box has a modern Intel Q9505 and gets in the region of 35 requests/s in each perf test, whereas my aging Intel Core 2 Duo macbook gets 600-900 despite having half the cores.  Of course we only expect the non-concurrent test to use about 1 of the cores, but both that and the concurrent test actually use only about 1% of a single CPU.  This is puzzling as OpenIndiana has the very performant and scalable sunos/solaris-derived kernel and libc, so something odd is definitely going on.

Regarding the SIGPIPE, do you think a signal handler should be installed in all test programs, to implement the recommended behavior for applications, or only in those that need it?

I am sitting on the fence.  I think the argument for the latter would be that one would not normally expect SIGPIPE to occur during tests that do not test out error/abort behavior, but I don't think it would normally be harmful.

(I haven't implemented the configure script integration to set the HAVE_LISTEN_SHUTDOWN conditional define for Linux etc. - can you help there?  I have, for what it's worth, checked that Linux does also work using the pipe technique instead, so that seems well-portable.)

Cheers,
Will
2011-09-21 07:47:35 +00:00
Christian Grothoff 7ef544c9be From:
Will Bryant <will.bryant@gmail.com>
  To: 
libmicrohttpd development and user mailinglist <libmicrohttpd@gnu.org>
  Date: 
Yesterday 03:59:23 PM
  Attachments: 
 0001-use-a-pipe-to-signal-shutdown-to-select-and-poll.patch
   
I attach my current work.  I have attempted to preserve and restore as much of the 'old' pipe shutdown code that was present in earlier versions of the library, but have removed the sections that aren't relevant now that there is a socket-by-socket client shutdown procedure.

On OS X, all the 'regular' tests pass.  The two perf test programs both fail on a random subset of the tests with "Failed to bind to port 1081: Address already in use" (or the other ports that the perf tests use).

I initially thought that this was a problem with this patch, but after I couldn't find any problem with it I tried backporting the perf test programs to the older 0.9.7 version of libmicrohttpd, which is before the listening socket shutdown code went in, and it turned out that the older versions failed in the same way.

On OpenIndiana (oi_151a - but should behave the same as other SunOS/Solaris/OpenSolaris/Illumos kernels), the same problem occurs.  (I haven't tried the backport there too.)

Linux is known to have slightly different behavior for the SOL_REUSEADDR option which might explain this, but it's quite possible that this is just a timing issue with the cleanup of the client threads in these perf test programs (if you wait for 1s between the tests then the problem goes away).  

On OS X, using both debugging printfs and shelling out to lsof -itcp, I have confirmed that the listening socket has been closed successfully before the error occurs.   So I am starting to suspect that it is not possible to bind to an address that was used as a server socket until all the client sockets have also been cleaned up - but that's just a theory at this point.

Anyway, as far as this patch goes, OS X looks a lot healthier - as healthy as it was in 0.9.7 (0.9.8 and 0.9.9 both failed to build entirely).

There is one further test failure on openindiana, which I believe is not related to this patch - all the same 'regular' tests pass except daemontest_get_response_cleanup, which dies due to an unhandled SIGPIPE when trying to write to the socket after killing the curl process:

Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 2 (LWP 2)]
0xfed634f7 in __so_send () from /lib/libc.so.1
(gdb) bt
#0  0xfed634f7 in __so_send () from /lib/libc.so.1
#1  0xfed511d7 in _so_send () from /lib/libc.so.1
#2  0xfe7dcb26 in send () from /lib/libsocket.so.1
#3  0xfef56d29 in send_param_adapter (connection=0x20, other=0xfe99080f, i=0) at daemon.c:764
#4  0xfef54a0b in do_write (connection=0x8073ad0) at connection.c:1495
#5  0xfef54f6f in MHD_connection_handle_write (connection=0x8073ad0) at connection.c:1909
#6  0xfef57b3c in MHD_select (daemon=0x80737a8, may_block=0) at daemon.c:1367
#7  0xfef57ff4 in MHD_select_thread (cls=0x80737a8) at daemon.c:1615
#8  0xfed5f0f3 in _thrp_setup () from /lib/libc.so.1
#9  0xfed5f3a0 in ?? () from /lib/libc.so.1
#10 0xfe9a0240 in ?? ()
#11 0x00000000 in ?? ()
(gdb) info threads
* 4 Thread 2 (LWP 2)  0xfed634f7 in __so_send () from /lib/libc.so.1
  3 LWP    2          0xfed634f7 in __so_send () from /lib/libc.so.1
  2 Thread 1 (LWP 1)  0xfed63e87 in __waitid () from /lib/libc.so.1
  1 LWP    1          0xfed63e87 in __waitid () from /lib/libc.so.1
(gdb) thread 2
[Switching to thread 2 (Thread 1 (LWP 1))]#0  0xfed63e87 in __waitid () from /lib/libc.so.1
(gdb) bt
#0  0xfed63e87 in __waitid () from /lib/libc.so.1
#1  0xfed515bd in waitid () from /lib/libc.so.1
#2  0xfed00035 in waitpid () from /lib/libc.so.1
#3  0x08051423 in kill_curl (pid=4479) at daemontest_get_response_cleanup.c:70
#4  0x0805157d in main (argc=1, argv=0x6b) at daemontest_get_response_cleanup.c:141

0001-use-a-pipe-to-signal-shutdown-to-select-and-poll.patch
2011-09-21 07:47:03 +00:00
Christian Grothoff 211920f3ef trying to fix Regis's problem 2011-09-19 12:06:46 +00:00
Matthias Wachs e9cf773a0a fixing implications of new early response cleanup code -CG 2011-09-16 17:42:16 +00:00
Christian Grothoff 9f7422a6f6 fixing 1766 2011-09-14 11:44:18 +00:00
Christian Grothoff 24a401fd5b fix 2011-09-13 14:07:25 +00:00
Christian Grothoff aee7bbd414 for Regis (see ML) 2011-09-13 07:48:31 +00:00
Christian Grothoff 1e2bfba091 stuff 2011-09-13 07:46:29 +00:00
Christian Grothoff a8541b843e release 0.9.14 2011-09-12 08:21:16 +00:00
Christian Grothoff 779abe3a66 indenting header more nicely, adding MHD_set_connection_option 2011-09-12 08:15:12 +00:00
Christian Grothoff 9877c2f9c6 use GNUTLS_SESSION instead of the un-implemented GNUTLS_CLIENT_CERT 2011-09-10 05:31:04 +00:00
Christian Grothoff 443486f69e use GNUTLS_SESSION instead of the un-implemented GNUTLS_CLIENT_CERT 2011-09-10 05:30:02 +00:00
Christian Grothoff 6136f0adf6 testcase 2011-09-09 13:21:25 +00:00
Christian Grothoff 5edea01df8 bump 2011-08-18 09:10:07 +00:00
Christian Grothoff 764c0fd56b bugfix 2011-08-18 09:08:53 +00:00
Christian Grothoff ecd561acd9 new testcase 2011-08-18 08:56:18 +00:00