Christopher Kohlhoff | 9 Dec 03:13 2007

asio 0.3.9 released

I have just released 0.3.9. This release focuses on bug fixes and
improvements to the implementation. The interface is source-compatible
with version 0.3.8. Bug reports are appreciated as I want to get asio
as stable as possible before boost 1.35.

The changes and bug fixes of note are:

* Fixed a problem in the io_service::poll()/poll_one() implementation
  where the demultiplexing task was being "lost" from the task queue.
  This caused async socket operations to continue indefinitely after
  the initial poll.

* Fixed the posix_fd_set_adapter class to support Mac OS X Leopard.

* Use GetModuleHandleA rather than GetModuleHandle to avoid a broken
  compile when UNICODE is #defined.

* Fixed a memory leak that occurred when an io_service is allowed to
  destruct with unfinished async_wait operations.

* Added a new timer implementation for Windows (when using I/O
  completion ports) to eliminate the need for an additional thread.

* Fixed the solaris /dev/poll reactor to work correctly in threaded
  applications.

* Added a workaround for a Microsoft Visual C++ iterator problem where
  allowing the destruction of an iterator to an already-destroyed
  string object resulted in a crash.

(Continue reading)

Juraj Ivančić | 8 Dec 16:35 2007
Picon

Re: PA_RISC HP-UX 11.11 port

Christopher Kohlhoff wrote:
> Jurko Gospodnetić wrote:
>>    Hi.
>>
>>    We are try to get ASIO working on PA_RISC HP-UX 11.11 and wanted to 
>> send you the changes we found needed in ASIO in order for it to compile:
>>
>>    1. select() is not declared in its usual sys/select.h header file but 
>> instead in sys/time.h. This is the same on more recent HP-UX releases.
> 
> Do you know how it differs from 11.31? That version of HP-UX is 
> currently working.

PA_RISC HP-UX 11.11 does not have sys/select.h header at all. Man page 
states that sys/time.h should be included:

<manpage>
select(2)

       select - synchronous I/O multiplexing

SYNOPSIS
       #include <sys/time.h>

       int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set
       *errorfds, struct timeval *timeout);

..

  Hewlett-Packard Company    - 2 -   HP-UX Release 11i: November 2000
(Continue reading)

Olaf van der Spek | 9 Dec 10:13 2007
Picon

Re: asio 0.3.9 released

On Dec 9, 2007 3:13 AM, Christopher Kohlhoff <chris@...> wrote:
> I have just released 0.3.9. This release focuses on bug fixes and

That's fast. Thanks. ;)

>   http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=560165

Apprently SF is having troubles with the mirrors. This one works for me:

http://osdn.dl.sourceforge.net/sourceforge/asio/asio-0.3.9.tar.bz2

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
gchen | 9 Dec 22:00 2007
Picon

Re: asio 0.3.9 released

Christopher Kohlhoff wrote:
> I have just released 0.3.9. This release focuses on bug fixes and

Nice.

> 
> * Added a new timer implementation for Windows (when using I/O
>   completion ports) to eliminate the need for an additional thread.
> 

Ever consider using the Windows' native timer-queue timer directly?
This one: http://msdn2.microsoft.com/en-us/library/ms682485.aspx

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Stefan Arentz | 9 Dec 22:45 2007
Picon

Re: Some embedded http server ideas

On Dec 7, 2007 11:37 PM, Michael Dickey <mike@...> wrote:
> Stefan,
>
> It's sounding more and more familiar ;-)
>
> I like and think I will adopt within Pion your idea for letting users
> bind resources to functions instead of requiring the use of classes.
>
> Since me and several other people have already gone down this path
> before, producing both a very stable and feature-complete HTTP
> implementation, I'd like one more time to encourage you to consider
> joining our efforts rather than re-inventing the wheel. =)

I know, but I am very stubborn :-)

 S.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Stefan Arentz | 9 Dec 22:55 2007
Picon

Re: Some embedded http server ideas

On Dec 8, 2007 3:42 PM, Darren Garvey <darren.garvey@...> wrote:
> Hi Stefan,
>
> FWIW, I've been considering the problems with your approach in relation to
> the CGI library I'm working on (Chris Kohlhoff guided me through the GSoC
> with it - just don't blame him for the flaws!). Even though it doesn't
> tackle HTTP and is unfortunately (still) not finished yet, I've kept in mind
> the requirements of that protocol so that I don't go making a hierarchy that
> can't incorporate HTTP, if it ever gets that mature.
>
> I think there are a few issues that a HTTP server needs to address:
>
> * Responses should be buffered. As the status header is the first to be
> returned with HTTP and there's no way you can be sure that something isn't
> going to break half-way through constructing a response (eg. an exception
> could be thrown), writing buffered responses should be the default. Sounds
> like we agree about this.

I'll respond to your other points later, I'm focussing on a small part for now.

I have a simple http/1.0 server up and running that includes a very
basic http::server::response object with basically the same
functionality as Java's HttpServletResponse.

I can now write handlers like:

void hello_world_request_handler(const http::server::request& req,
http::server::response& response)
{
   response.content_type("text/plain");
(Continue reading)

Olaf van der Spek | 9 Dec 23:07 2007
Picon

Re: Some embedded http server ideas

On Dec 9, 2007 10:55 PM, Stefan Arentz <stefan.arentz@...> wrote:
> I have a simple http/1.0 server up and running that includes a very

Why not 1.1?
What about keep alive? Pipelining? Content Encoding?
Writing your own server and client is nice, but it's a recipe for bugs
and incompatibilities.

Olaf

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
James Talbut | 10 Dec 10:09 2007

Re: Why does do_one use a one second timeout and loop whan called in blocking mode?

That's very simplistic and fails to take paging into account.
If the thread being switched to has had its context paged out the switch
will take multiple orders of magnitude longer (and a 1s timeout is just
long enough to permit the context to be paged out on an over stressed
machine).
Note that this might not be paging to disc, it might simply be a case of
reading from main memory rather than cache, which again can take an
order of magnitude longer.
And this might well happen at a time when the system is busy trying to
do something else (obviously it won't happen when it's receiving data).

There is also an issue with receiving unreliable packets.
If a bunch of threads are all started at the same time they will all
timeout at the same time - potentially giving a window when no threads
are available to receive packets.

These aren't major issues, but they are issues in some circumstances.

Jim

> -----Original Message-----
> From: asio-users-bounces@... [mailto:asio-users-
> bounces@...] On Behalf Of Matt Gruenke
> Sent: 06 December 2007 00:21
> To: asio-users@...
> Subject: Re: [asio-users] Why does do_one use a one second timeout and
> loop whan called in blocking mode?
> 
> I think context switch times are generally on the order of
microseconds.
(Continue reading)

Christopher Kohlhoff | 10 Dec 11:07 2007

Re: SSL crashes under load


On Fri, 7 Dec 2007 10:37:02 -0500, "Ken Thompson"
<kenthompson1@...> said:
> First,
> The last stack trace that is within my application is point at the return
> of:
>    static int SSL_accept(SSL *ssl)
>    {
>      typename Mutex::scoped_lock lock(ssl_mutex_);
> --->   return ::SSL_accept(ssl);
>    }
> 
> (Sorry Olaf, I meant to send this to the asio list but sent it to you
> by accident)
> 
> The exception is:
> First-chance exception at 0x730e5244 (msvcr80.dll) in CoreStorage.exe:
> 0xC0000005: Access violation reading location 0x093bac2f.
> Unhandled exception at 0x730e5244 (msvcr80.dll) in CoreStorage.exe:
> 0xC0000005: Access violation reading location 0x093bac2f.

I guess that means the SSL pointer is somehow corrupt. Please try 0.3.9
to see if it has the issue, and if so can you try creating a small
program to reproduce it so I can take a look. Thanks.

Cheers,
Chris

-------------------------------------------------------------------------
SF.Net email is sponsored by:
(Continue reading)

Christopher Kohlhoff | 10 Dec 11:09 2007

Re: PA_RISC HP-UX 11.11 port


On Sat, 08 Dec 2007 16:35:51 +0100, "Juraj Ivan&#269;i&#263;"
> I'll try to run ASIO tests with manually defined ip_mreq header and will 
> post the results here.

That would be very helpful, thanks.

Cheers,
Chris

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Gmane