Re: async-i/o for 2.4

From: Costas Tavernarakis <taver@dont-contact.us>
Date: Fri, 10 Nov 2000 16:59:29 +0200

Hi,

I updated, and tried again as you suggested.
I had to delete the swap_state files and have them rebuilt, as squid kept
segfaulting (propably because the files were not cleanly writtern), so
it took some time before i was able to test shutdown and respond to you.

It seems squid now shuts down ok.

What worries me, though, is that now i keep getting a lot of messages such
as:
2000/11/10 15:58:33| aio_queue_request: WARNING - Queue congestion
2000/11/10 15:58:35| aio_queue_request: WARNING - Queue congestion
in cache_log...
It seems to me request_queue2 now gets used more than it should,
even while the cache is not seeing production load yet! Maybe
pthread_mutex_trylock failes due to too many active queue operations
(or too many threads, as i have 10 independent cache_dirs).

Could we have multiple request queues, such as one per cache_dir,
with separate sets of threads for each cache_dir, or something alike?

On Thu, Nov 09, 2000 at 11:54:56PM +0100, Henrik Nordstrom wrote:
> Fixed a quite nasty bug today which may well have caused your
> shutdown/aioSync problem. Can you please update and try againg.
>
> /Henrik
>
>
> Costas Tavernarakis wrote:
> >
> > On Mon, Nov 06, 2000 at 10:19:31PM +0100, Henrik Nordstrom wrote:
> > > Costas Tavernarakis wrote:
> > >
> > > > I've been trying out your 2.4 async i/o fixes on Solaris 8, and it seems to
> > > > be working fine for me (although the cache hasn't seen a production load
> > > > yet). I've only had an issue where 2.4+asyncio failed to shut down properly,
> > > > but i can't tell if it's related to async i/o. It was before your yesterday
> > > > fixes, i'll see if it happens again and keep you posted with details.
> > >
> > > The changes yesterday was quite important. Squid fell over if async-io
> > > detected a single problem, such as a missing cache file, out of space or
> > > similar problems..
> >
> > I said i'd get back to you about my shutdown issue, as it may be of interest.
> > Although it seems to be asyncio-related, it's perfectly acceptable if you
> > discard this as it propably does not belong in a message addressed to your
> > personal mailbox, or if you forward it.
> >
> > I'm sort-of testing this cache as a default parent of my production one.
> > Often (but NOT always), when i issue squid -k shutdown, squid hangs.
> >
> > In cache_log, i get:
> > 2000/11/05 18:18:27| Preparing for shutdown after 0 requests
> > 2000/11/05 18:18:27| Waiting 30 seconds for active connections to finish
> > 2000/11/05 18:18:27| FD 30 Closing HTTP connection
> > 2000/11/05 18:18:27| FD 31 Closing HTTP connection
> > 2000/11/05 18:18:27| Shutting down...
> > 2000/11/05 18:18:27| FD 32 Closing ICP connection
> > 2000/11/05 18:18:27| FD 33 Closing SNMP socket
> > 2000/11/05 18:18:27| Closing unlinkd pipe on FD 11
> > 2000/11/05 18:18:27| aioSync: flushing pending I/O operations
> >
> > Then, the squid process goes on to use 100% of one cpu (25% CPU usage on a
> > 4-cpu system, compared to 3-4% under normal circuimstances). At that time,
> > truss shows nothing else going on, but squid beeing in a loop of time_tick():
> >
> > signotifywait() = 14
> > lwp_sigredirect(1, SIGALRM, 0xFF00FC4C) = 0
> > Received signal #14, SIGALRM [caught]
> > sigprocmask(SIG_SETMASK, 0xFF0EF010, 0x00000000) = 0
> > alarm(1) = 0
> > sigprocmask(SIG_SETMASK, 0xFF0FADE0, 0x00000000) = 0
> > setcontext(0xFFBEF358)
> > ...
> >
> > getting a core image (how nice solaris has gcore),
> > gdb gives the following backtrace:
> >
> > #0 0x89d3c in aio_poll_queues ()
> > #1 0x89f1c in aio_sync ()
> > #2 0x88b4c in aioSync ()
> > #3 0x77f38 in storeDirSync ()
> > #4 0x576f8 in SquidShutdown ()
> > #5 0x3c1a8 in eventRun ()
> > #6 0x5701c in main ()
> >
> > [if you want the core file itself, i can make it available to you,
> > but it's 46MB compressed AND squid was NOT compiled with -g].
> > I can recompile with gcc and -g, if you want.
> >
> > Top at this time continues to report 164 threads just like normal run-time.
> >
> > >
> > > > Before you commit the changes, though, (and this IS minor), please change
> > > > some C++ styled comments in aiops.c to C styled ones, as it breaks non-gcc
> > > > compilers.
> > >
> > > Granted. Was not aware that there was any C++ style comments there.. Ah,
> > > there is not actually. Those are from Adrian and are already in the HEAD
> > > version.. but I fix them when I commit the rest of it.
> >
> > Correct. I'm sorry to nag you about it.
> >
> > --
> > ========================================================================
> > Costas Tavernarakis OTEnet S.A. Internet Service Provider
> > E-mail: taver@otenet.gr Home Phone: 01-8842522
> > Cellular Phone: +30-97-7272714 Work Phone: 01-3826199
> > ========================================================================
>

-- 
========================================================================
 Costas Tavernarakis               OTEnet S.A. Internet Service Provider
 E-mail: taver@otenet.gr		          Home Phone: 01-8842522
 Cellular Phone: +30-97-7272714                   Work Phone: 01-3826199
========================================================================
Received on Fri Nov 10 2000 - 08:16:32 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:57 MST