Article delegate-en/214 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<199901101737.CAA26051@mail.t3.rim.or.jp>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: delegate5_8_5-os2.zip
10 Jan 1999 19:30:36 GMT ysato@etl.go.jp (Yutaka Sato 佐藤豊)


In message <199901101737.CAA26051@mail.t3.rim.or.jp> on 01/11/99(02:37:14)
you Hiroshi Ueno 上野博 <pxakabth4-h3lluohxmrxr.ml@ml.delegate.org> wrote:
 |Satoh-san,
 |
 |Sorry for CC'ing this mail directly to you. I could not find the
 |mail address of delegate-en ML.

The address is "delegate-en@smtpgate.etl.go.jp" but it's not like
"mailing-list" as no one can subscribe it :-)  The archive is
available at "http://wall.etl.go.jp/delegate/ml/delegate-en.html"

Anyway, I am grateful and admire your prompt and exact diagnosis
as usual.

 |By looking into the core file you sent to me, I found that the
 |core dump occurred because delegated.exe issued fprintf() to a NULL
 |file pointer in rescache.c. Please download delegate5.8.5-os2.zip
...
 |I have no idea of why delegated failed to open an id file with
 |write mode.  As your zip file contains the id file so it was
 |actually created.  One thing I can imagine is that two delegated,
 |http proxy and its private master, tried to open an id file for
 |write simultaneously or one delegated tried to open it for write
 |while another was opening it for read, but I'm not sure.

Another possible but less probable situation is that mkdir() in
OS/2+EMS returns zero even when the creating directory already
exists (which may be created by other user) ...

Although the situation seems too queer to imagine, I must care it
as it exists.  Thus I will modify the code as in the enclosed patch,
which do nothing further in such a queer situation.

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_


*** ../dist/delegate5.8.6/resolvy/rescache.c	Mon Nov  9 18:08:49 1998
--- rescache.c	Mon Jan 11 03:47:49 1999
***************
*** 21,22 ****
--- 21,23 ----
  
+ #include <errno.h>
  #include <stdio.h>
***************
*** 71,72 ****
--- 72,78 ----
  			cfp = fopen(idfile,"w");
+ 			if( cfp == NULL ){
+ 				debug(DBG_FORCE,"CACHE can't open: %s (%d)\n",
+ 					idfile,errno);
+ 				return NULL;
+ 			}
  			fprintf(cfp,"created by uid=%d pid=%d time=%d\n",


-----------------------------------------------------------------------
Message-Id: <199901101737.CAA26051@rim..jp>
To: pz4aabdyi-h3lluohxmrxr.ml@ml.delegate.org
Cc: ysato@etl.go.jp
Subject: Re: [DeleGate-En] delegate5_8_5-os2.zip 
In-Reply-To: Your message of "Sat, 09 Jan 1999 08:17:15 EST."
	      <199901091300.NAA504262@ibm..> 
Content-Type: multipart/mixed;
 boundary="Multipart_Mon_Jan_11_02:37:11_1999-1"
Content-Transfer-Encoding: 7bit
Date: Mon, 11 Jan 1999 02:37:14 +0900
From: Hiroshi Ueno =?ISO-2022-JP?B?GyRCPmVMbkduGyhC?= <pxakabth4-h3lluohxmrxr.ml@ml.delegate.org>

--Multipart_Mon_Jan_11_02:37:11_1999-1
Content-Type: text/plain; charset=US-ASCII

Satoh-san,

Sorry for CC'ing this mail directly to you. I could not find the
mail address of delegate-en ML.

Dave,

By looking into the core file you sent to me, I found that the
core dump occurred because delegated.exe issued fprintf() to a NULL
file pointer in rescache.c. Please download delegate5.8.5-os2.zip
from my page again and try it. I applied the following temporary
patch and re-make delegated. Please note that this patch is just
for bypassing the current problem and there will be a cause of any
other problems.

Or you may want to try RESOLV=dns instead of RESOLV=cache,dns with
the delegated.exe you are now using as the problem seems to be in
the name resolution caching.

I have no idea of why delegated failed to open an id file with
write mode.  As your zip file contains the id file so it was
actually created.  One thing I can imagine is that two delegated,
http proxy and its private master, tried to open an id file for
write simultaneously or one delegated tried to open it for write
while another was opening it for read, but I'm not sure.


--Multipart_Mon_Jan_11_02:37:11_1999-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="rescache.c.diff"
Content-Transfer-Encoding: 7bit

--- rescache.c.orig	Mon Nov  9 18:08:48 1998
+++ rescache.c	Mon Jan 11 01:54:32 1999
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <errno.h>
 #include "dns.h"
 
 extern char *getTMPDIR();
@@ -68,12 +69,16 @@
 		if( mkdir(cdirg,0777) == 0 ){chmod(cdirg,0777);
 			RES_getconf(conf);
 			sprintf(idfile,"%s/config",cdirg);
-			cfp = fopen(idfile,"w");
+			if( (cfp = fopen(idfile,"w")) != NULL ){
 			fprintf(cfp,"created by uid=%d pid=%d time=%d\n",
 				getuid(),getpid(),time(0));
 			fprintf(cfp,"configuration:\n");
 			fputs(conf,cfp);
 			fclose(cfp);
+			}
+			else
+			  syslog_ERROR(">>>>ID FILE(%s)>>>> not create.[%d]\n",
+				       idfile, errno);
 		}
 		if( mkdir(cdir1,0777) == 0 ) chmod(cdir1,0777);
 

--Multipart_Mon_Jan_11_02:37:11_1999-1
Content-Type: text/plain; charset=US-ASCII


--
Hiro Ueno

>>>>> In <199901091300.NAA504262@ibm..> 
>>>>>    <pz4aabdyi-h3lluohxmrxr.ml@ml.delegate.org> wrote:

> ---------------------------------------------------------------------
> [H:\os2\delegate]delegated -P8074 -vt SERVER=http DGROOT=. 
> ADMIN=pz4aabdyi-h3lluohxmrxr.ml@ml.delegate.org RES_NS=209.194.78.200 RESOLV=cache,dns
> DeleGate/5.8.5 (December 29, 1998)
> AIST Research Product No. 1994-ETL-8715-1
> Copyright (c) 1994-1998 Yutaka Sato
> Copyright (c) 1994-1998 Electrotechnical Laboratry (ETL), AIST, MITI --
> FTP: <URL:ftp://ftp.etl.go.jp/pub/DeleGate/>
> WWW: <URL:http://www.etl.go.jp/~ysato/>
> Mailing-List: <URL:mailto:delegate@etl.go.jp>
>               <URL:http://wall.etl.go.jp/delegate/ml/>
> <DeleGate/5.8.5 by ysato@etl.go.jp> [392] -P8074 READY
> AIST Research Product No. 1994-ETL-8715-1
> Copyright (c) 1994-1998 Yutaka Sato
> Copyright (c) 1994-1998 Electrotechnical Laboratry (ETL), AIST, MITI
> <DeleGate/5.8.5 by ysato@etl.go.jp> [395] -P62796 READY AIST Research
> Product No. 1994-ETL-8715-1
> Copyright (c) 1994-1998 Yutaka Sato
> Copyright (c) 1994-1998 Electrotechnical Laboratry (ETL), AIST, MITI

> Process terminated by SIGSEGV
> core dumped

> [H:\os2\delegate]
> ---------------------------------------------------------------------

> The following error is being recorded in my POPUPLOG.OS2 file:

> ---------------------------------------------------------------------
> 01-08-1999  10:01:49  SYS3175  PID 018b  TID 0001  Slot 00e3
> H:\OS2\DELEGATE\DELEGATED.EXE
> c0000005
> 000db333
> P1=00000001  P2=00000015  P3=XXXXXXXX  P4=XXXXXXXX
> EAX=00000000  EBX=00000000  ECX=0000003c  EDX=00000000
> ESI=02908e60  EDI=0290abe8
> DS=0053  DSACC=d0f3  DSLIM=1fffffff
> ES=0053  ESACC=d0f3  ESLIM=1fffffff
> FS=150b  FSACC=00f3  FSLIM=00000030
> GS=0000  GSACC=****  GSLIM=********
> CS:EIP=005b:000db333  CSACC=d0df  CSLIM=1fffffff
> SS:ESP=0053:02908e48  SSACC=d0f3  SSLIM=1fffffff
> EBP=02908e50  FLG=00012246

> DELEGATED.EXE 0001:000cb333
> ---------------------------------------------------------------------

> Is this of any help in telling me what I am doing wrong.  Please let me
> know if there is any additional information that will help clear this
> problem.

> -- Dave
> -----------------------------------------------------------
> pz4aabdyi-h3lluohxmrxr.ml@ml.delegate.org
> -----------------------------------------------------------



--Multipart_Mon_Jan_11_02:37:11_1999-1--
-----------------------------------------------------------------------

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V