Date: Sat, 1 Aug 1998 11:09:54 -0400 (EDT) From: Daniel Frasnelli <dfrasnel@csee.wvu.edu> To: gljohns@bellsouth.net (Glenn Johnson) Cc: freebsd-ports@FreeBSD.ORG Subject: Re: KnightCap dumps core while searching hash table Message-ID: <199808011509.LAA28771@naur.cs.wvu.edu> In-Reply-To: <199808010401.XAA14122@gforce.bellsouth.net> from Glenn Johnson at "Jul 31, 98 11:01:02 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Greetings, I ran a bit of debugging on KnightCap this morning, and discovered what causes the segfault (and the coredump most likely). Here are the applicable lines from the ktrace/kdump: 409 KnightCap GIO fd 3 wrote 125 bytes "B: -0.21 d=5 n=3581 c=14% q=16% ext=11% trunc=7% mo=83.33% 6.06% 2.27% 0.76% 6.82% hash=11% bad=0% mtd=6 t=0.6 d7d5 nps=7592 " 409 KnightCap RET write 125/0x7d 409 KnightCap CALL open(0x159a0,0x601,0x1b6) 409 KnightCap NAMI "/export/pasiphae/status.txt" 409 KnightCap RET open -1 errno 2 No such file or directory 409 KnightCap PSIG SIGSEGV SIG_DFL As you can see, the lack of a file (/export/pasiphae/status.txt) caused the generation of a segmentation violation. Here are the applicable files and line numbers in the source code: log.c:71: sfile = fopen("/export/pasiphae/status.txt","w"); util.c:742: f = fopen("/export/pasiphae/position.txt", "w"); util.c:769: bullet = fopen("/export/pasiphae/bullet.txt", "a"); util.c:770: blitz = fopen("/export/pasiphae/blitz.txt", "a"); util.c:771: standard = fopen("/export/pasiphae/standard.txt", "a" Technically, these files are only supposed to exist if USE_APPLET is defined (From log.c): #if USE_APPLET sfile = fopen("/export/pasiphae/status.txt","w"); #else sfile = fopen("status.txt","w"); #endif USE_APPLET is defined on line 30 of knightcap.h: 30:#define USE_APPLET 1 This needs to be set to zero, and the package recompiled. I just did so, and it works fine now. If anyone wants to create a patchset or add a delta to one of the current patches, feel free; I'm interested in seeing what USE_APPLET does in the rest of the code before disabling it (in the port). Best regards, Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808011509.LAA28771>