Re: epoll on squid

From: Reuben Farrelly <reuben-squid-dev@dont-contact.us>
Date: Wed, 18 Dec 2002 21:29:44 +1100

Hi David,

At 05:25 PM 17/12/2002 -0500, you wrote:

>I tried everything from scratch, by pulling the branch out of CVS and
>building it myself, but everything worked fine for me still even with
>the new linux kernel 2.5.52 and the newest tarball from squid-3.0-HEAD.

Hrm, I wonder if we are running into glibc problems...I am running an unmodified 2.5.52 kernel too...glibc is the only main difference I guess..

>> 2002/12/18 00:51:21| Loaded Icons.
>> 2002/12/18 00:51:21| commSetSelect: cpoll_ctl(,EPOLL_CTL_MOD,,) failed on
>> fd=14!: (0) Success
>
>The epoll_ctl(,EPOLL_CTL_DEL,,) errors are probably related to the fact
>that it didn't call epoll_ctl(,EPOLL_CTL_ADD,,) previously, but instead
>failed through. Perhaps if we work around it for now by doing this:
>
>Change this:
>if (epoll_ctl(kdpfd, EPOLL_CTL_MOD, fd, &ev) < 0) {
> if(errno == ENOENT) {
>To this:
>if (epoll_ctl(kdpfd, EPOLL_CTL_MOD, fd, &ev) < 0) {
> if((errno == ENOENT) || (errno == 0)

I had to make some small changes ie: (and yes, word wrap is not great in Eudora)

----------------------------------------
--- comm_epoll.cc-orig 2002-12-18 20:45:08.000000000 +1100
+++ comm_epoll.cc 2002-12-18 20:48:40.000000000 +1100
@@ -144,7 +144,7 @@
        ev.events = events;
        if(events) {
                if (epoll_ctl(kdpfd, EPOLL_CTL_MOD, fd, &ev) < 0) {
- if(errno == ENOENT) {
+ if((errno == ENOENT) || (errno == 0)) {
                                debug(5,4) ("commSetSelect: epoll_ctl(,EPOLL_CTL_MOD,,) failed on fd=%d: entry does not exist\n",fd);
                                if (epoll_ctl(kdpfd, EPOLL_CTL_ADD, fd, &ev) < 0)
                                        debug(5,1) ("commSetSelect: cpoll_ctl(,EPOLL_CTL_ADD,,) failed on fd=%d!: %s\n",fd,xstrerror());
------------------------------------------

>If that gets it working for you, let me know, and I will add it into the
>CVS branch.

It gets past the initial fail point, now I get this, and again I can't actually request anything:

2002/12/18 21:07:27| Starting Squid Cache version 3.0-DEVEL for i686-pc-linux-gnu...
2002/12/18 21:07:27| Process ID 18904
2002/12/18 21:07:27| With 1024 file descriptors available
2002/12/18 21:07:27| DNS Socket created at 0.0.0.0, port 32916, FD 6
2002/12/18 21:07:27| Adding nameserver 203.29.67.170 from /etc/resolv.conf
2002/12/18 21:07:27| Adding nameserver 203.29.67.23 from /etc/resolv.conf
2002/12/18 21:07:27| Unlinkd pipe opened on FD 11
2002/12/18 21:07:27| Swap maxSize 1638400 KB, estimated 182044 objects
2002/12/18 21:07:27| Target number of buckets: 9102
2002/12/18 21:07:27| Using 16384 Store buckets
2002/12/18 21:07:27| Max Mem size: 4096 KB
2002/12/18 21:07:27| Max Swap size: 1638400 KB
2002/12/18 21:07:27| Store logging disabled
2002/12/18 21:07:27| Rebuilding storage in /var/spool/squid-1 (CLEAN)
2002/12/18 21:07:27| Rebuilding storage in /var/spool/squid-2 (CLEAN)
2002/12/18 21:07:27| Using Least Load store dir selection
2002/12/18 21:07:27| Set Current Directory to /var/spool/squid
2002/12/18 21:07:27| Loaded Icons.
2002/12/18 21:07:27| Accepting HTTP connections at 203.29.67.170, port 3128, FD 14.
2002/12/18 21:07:27| Accepting ICP messages at 0.0.0.0, port 3130, FD 15.
2002/12/18 21:07:27| Accepting SNMP messages on port 3401, FD 16.
2002/12/18 21:07:27| Accepting WCCP messages on port 2048, FD 17.
2002/12/18 21:07:27| Ready to serve requests.
2002/12/18 21:07:28| Store rebuilding is 6.1% complete
2002/12/18 21:07:32| Done reading /var/spool/squid-1 swaplog (66642 entries)
2002/12/18 21:07:32| Done reading /var/spool/squid-2 swaplog (80319 entries)
2002/12/18 21:07:32| Finished rebuilding storage from disk.
2002/12/18 21:07:32| 146961 Entries scanned
2002/12/18 21:07:32| 0 Invalid entries.
2002/12/18 21:07:32| 0 With invalid flags.
2002/12/18 21:07:32| 146961 Objects loaded.
2002/12/18 21:07:32| 0 Objects expired.
2002/12/18 21:07:32| 0 Objects cancelled.
2002/12/18 21:07:32| 0 Duplicate URLs purged.
2002/12/18 21:07:32| 0 Swapfile clashes avoided.
2002/12/18 21:07:32| Took 5.4 seconds (27190.0 objects/sec).
2002/12/18 21:07:32| Beginning Validation Procedure
2002/12/18 21:07:32| Completed Validation Procedure
2002/12/18 21:07:32| Validated 146961 Entries
2002/12/18 21:07:32| store_swap_size = 1263096k
2002/12/18 21:07:33| storeLateRelease: released 0 objects
2002/12/18 21:08:09| commSetSelect: cpoll_ctl(,EPOLL_CTL_MOD,,) failed on fd=13!: (115) Operation now in progress
2002/12/18 21:08:23| commSetSelect: cpoll_ctl(,EPOLL_CTL_MOD,,) failed on fd=18!: (11) Resource temporarily unavailable

>Also, what build environment and configure options are you using?

Redhat 8, with some updates from rawhide, ie glibc-2.3.1-6, and gcc-3.2.1 I'm pulling all my squid source from CVS too and have all up to date trees checked out. I'm not patching my 2.5.52 kernel, it's just a stock build..

Reuben

-------------------------------------------------------------
Reuben Farrelly West Ryde, NSW 2114, Australia
Received on Wed Dec 18 2002 - 03:29:50 MST

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