Re: Many wrong debug section in 2.5 and HEAD

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Sun, 17 Aug 2003 16:53:33 +0200

Hi Robert,

Il 15.53 17/08/2003 Robert Collins ha scritto:

>On Sun, 2003-08-17 at 23:30, Serassio Guido wrote:
> > Hi,
> >
> > I have just found that there are many (more than 130) wrongly used
> > debug(50,x) section in both 2.5 and HEAD.
> >
> > If you want, I can build a patch for both squid versions.
> >
> > Only a question: the debug section should always match the section
> > specified in the head of the source file or it can be some exceptions ?
>
>There can be exceptions. I.e.a comms related debug in http.cc may be a
>comms based section.
>
>So, debug (50,x) sections are not wrong simply by virtue of their
>location.
>
>That said, I don't see much point in patching this for 2.5, or even 3.0.
>(I'd rather avoid large unnecessary patches until we have released
>squid-3.0).
>

Sure, but from debug-sections.txt I can read:

section 50 Log file handling

This are some of debug(50.x):

C:\WORK\2.5\src\client_side.c(2735): debug(50, 1)
("parseHttpRequest: NAT open failed: %s\n",
C:\WORK\2.5\src\client_side.c(2758): debug(50, 1)
("parseHttpRequest: NAT lookup failed: ioctl(SIOCGNATL)\n");
C:\WORK\2.5\src\client_side.c(2781): debug(50, 1)
("parseHttpRequest: PF open failed: %s\n",
C:\WORK\2.5\src\client_side.c(2795): debug(50, 1)
("parseHttpRequest: PF lookup failed: ioctl(DIOCNATLOOK)\n");
C:\WORK\2.5\src\client_side.c(2927): debug(50, 2)
("clientReadRequest: FD %d: %s\n", fd, xstrerror());
C:\WORK\2.5\src\client_side.c(2931): debug(50, 2)
("clientReadRequest: FD %d: no data to process (%s)\n", fd, xstrerror());
C:\WORK\2.5\src\client_side.c(3345): debug(50, 1) ("httpAccept:
FD %d: accept failure: %s\n",
C:\WORK\2.5\src\client_side.c(3449): debug(50, 1) ("httpsAccept:
FD %d: accept failure: %s\n",
C:\WORK\2.5\src\client_side.c(3463): debug(50, 5) ("httpsAccept: FD %d
accepted, starting SSL negotiation.\n", fd);

C:\WORK\2.5\src\comm.c(122): debug(50, 1) ("comm_local_port: Failed to
retrieve TCP/UDP port number for socket: FD %d: %s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(142): debug(50, 0) ("commBind: Cannot bind
socket FD %d to %s:%d: %s\n",
C:\WORK\2.5\src\comm.c(188): debug(50, 1) ("comm_open: socket
failure: %s\n", xstrerror());
C:\WORK\2.5\src\comm.c(192): debug(50, 0) ("comm_open: socket
failure: %s\n", xstrerror());
C:\WORK\2.5\src\comm.c(201): debug(50, 1) ("comm_open:
setsockopt(IP_TOS) on FD %d: %s\n",
C:\WORK\2.5\src\comm.c(204): debug(50, 0) ("comm_open:
setsockopt(IP_TOS) not supported on this platform\n");
C:\WORK\2.5\src\comm.c(254): debug(50, 0) ("comm_listen: listen(%d, %d):
%s\n",
C:\WORK\2.5\src\comm.c(369): debug(50, 1) ("commResetFD:
setsockopt(IP_TOS) on FD %d: %s\n", cs->fd, xstrerror());
C:\WORK\2.5\src\comm.c(534): debug(50, 5) ("comm_accept: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(537): debug(50, 3) ("comm_accept: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(540): debug(50, 1) ("comm_accept: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(628): debug(50, 0) ("commResetTCPClose: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(683): debug(50, 1) ("comm_udp_sendto: FD %d,
%s, port %d: %s\n",
C:\WORK\2.5\src\comm.c(767): debug(50, 0) ("commSetNoLinger: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(776): debug(50, 1) ("commSetReuseAddr: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(783): debug(50, 1) ("commSetTcpRcvbuf: FD %d,
SIZE %d: %s\n",
C:\WORK\2.5\src\comm.c(796): debug(50, 0) ("commSetNonBlocking: FD
%d: %s %D\n", fd, xstrerror(), fd_table[fd].type);
C:\WORK\2.5\src\comm.c(802): debug(50, 0) ("FD %d: fcntl F_GETFL:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(806): debug(50, 0) ("commSetNonBlocking: FD
%d: %s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(822): debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n",
fd, xstrerror());
C:\WORK\2.5\src\comm.c(826): debug(50, 0) ("commUnsetNonBlocking: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(840): debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n",
fd, xstrerror());
C:\WORK\2.5\src\comm.c(844): debug(50, 0) ("FD %d: set close-on-exec
failed: %s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(855): debug(50, 1) ("commSetTcpNoDelay: FD %d:
%s\n", fd, xstrerror());
C:\WORK\2.5\src\comm.c(901): debug(50, 2) ("commHandleWrite: FD %d:
write failure: %s.\n",
C:\WORK\2.5\src\comm.c(905): debug(50, 10) ("commHandleWrite: FD %d:
write failure: %s.\n",
C:\WORK\2.5\src\comm.c(913): debug(50, 2) ("commHandleWrite: FD %d:
write failure: %s.\n",

I think that nothing of this is related to log files handling.

This can make very difficult debug something.

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l.
Via Gorizia, 69 10136 - Torino - ITALY
Tel. : +39.011.3249426 Fax. : +39.011.3293665
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Sun Aug 17 2003 - 08:53:51 MDT

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