Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old March 19th 04, 08:06 AM
jake johnson
 
Posts: n/a
Default getting Seg Fault on crafty 19.11 - linux

I've noticed that crafty 19.11 will give me a segmentation fault
frequently when its deep into an endgame and using the 70GB collection
of EMD files I have for it. I'm using Debian Linux 3.0r2 on an AMD
800Mhz with 256MB RAM. I've noticed that whenever I've used the
version 19.3 Windows binaries from Dr. Hyatt's ftp site on my WinXP
installation, its never seg faulted once. I have noticed however that
it will crash without a message if one of the EMD files is faulty. I
discovered the faulty EMD file because crafty running on linux will
give a message referencing the faulty file's name without crashing so
suddenly.

I'm in the process of checking the MD5's of the EMD files in the event
that there may still be some issues with files. I keep these files on
a FAT32 partition that my linux installation mounts and I have to
wonder whether using a non-native partition like this could cause a
seg fault.

If anyone has any help on how I could troubleshoot this seg fault
issue, I'd appreciate it.
  #2   Report Post  
Old March 19th 04, 09:11 AM
Mikko Nummelin
 
Posts: n/a
Default getting Seg Fault on crafty 19.11 - linux

On Fri, 19 Mar 2004, jake johnson wrote:

I've noticed that crafty 19.11 will give me a segmentation fault
frequently when its deep into an endgame and using the 70GB collection
of EMD files I have for it. I'm using Debian Linux 3.0r2 on an AMD
800Mhz with 256MB RAM. I've noticed that whenever I've used the
version 19.3 Windows binaries from Dr. Hyatt's ftp site on my WinXP
installation, its never seg faulted once. I have noticed however that
it will crash without a message if one of the EMD files is faulty. I
discovered the faulty EMD file because crafty running on linux will
give a message referencing the faulty file's name without crashing so
suddenly.

I'm in the process of checking the MD5's of the EMD files in the event
that there may still be some issues with files. I keep these files on
a FAT32 partition that my linux installation mounts and I have to
wonder whether using a non-native partition like this could cause a
seg fault.

If anyone has any help on how I could troubleshoot this seg fault
issue, I'd appreciate it.


First ensure that the fault comes up also when running Crafty as a text
console, i.e. not with XBoard or any other GUI, the things below won't
help otherwise. The instructions below are anyway difficult

A way to check where this seg fault does come from is to debug the
program. Therefore, first look at this place in the Makefile:

linux:
$(MAKE) target=LINUX \
CC=gcc CXX=g++ \
CFLAGS='$(CFLAGS) -Wall -pipe -D_REENTRANT -march=i686 -O3 \
-fbranch-probabilities -fforce-mem -fomit-frame-pointer\
-fno-gcse -mpreferred-stack-boundary=2' \
CXFLAGS=$(CFLAGS) \
LDFLAGS='$(LDFLAGS) -lpthread -lstdc++' \
opt='$(opt) -DFUTILITY -DUSE_ASSEMBLY -DFAST \
-DPOSIX -DSMP -DCPUS=4' \
crafty-make

and add '-g' somewhere among the CFLAGS, perhaps also remove some
optimization flags, but I'm not sure on this one. Also take a look he

crafty: $(objects)
$(CC) $(LDFLAGS) -o crafty $(objects) -lm $(LIBS)

and he

egtb.o: egtb.cpp
$(CXX) -c $(CXFLAGS) $(opts) egtb.cpp

Add '-g' also to them, just after $(CC) and $(CXX). Then compile the
program with these debug-flags on, typing the usual

$ make linux

but don't mess the binary to /usr/bin or /usr/local/bin -areas, just test
it in your home directory. Then, increase the core file size by typing

$ ulimit -c 1024

Then start Crafty with:

$ ./crafty

and try to bring about the segmentation fault. When it happens, start
Crafty with gdb giving core as an additional parameter:

$ gdb ./crafty core

It should now tell, where exactly did the program segfault. Another
approach is to originally start Crafty with gdb by typing

$ gdb ./crafty

(gdb) run

and then bringing about the segfault.


Mikko Nummelin
  #3   Report Post  
Old March 19th 04, 12:11 PM
Mikko Nummelin
 
Posts: n/a
Default getting Seg Fault on crafty 19.11 - linux

To add something to my previous answer, what actually is
important, is to see, whether the segfault originates from 'egtb.cpp' or
some other file. If it was 'egtb.cpp' then most probable cause is
corrupted tablebases. Solution is to re-install the tablebase which was
used when the crash occurred and all further tablebases where the game can
reach from that. I.e. if the corrupt one appears to be 'kpkp', then it is
necessary to re-install all 22 and 21-type tablebases. If the segfault
happens in some other file than 'egtb.cpp' then the most probable cause is
that crafty binary with some particular compilation flags is broken. In
that case it would perhaps be a good thing to point out to prof. Hyatt
where the segfault occurred.


Mikko Nummelin
  #4   Report Post  
Old March 20th 04, 11:27 AM
jake johnson
 
Posts: n/a
Default getting Seg Fault on crafty 19.11 - linux

Mikko Nummelin wrote in message . fi...
To add something to my previous answer, what actually is
important, is to see, whether the segfault originates from 'egtb.cpp' or

[...snip...]

Thank you for your highly detailed (and technical) first post and also
this second post, of course. I'd like to find out where it
originates, too. You're saying that the debug steps described in your
initial post will enable me to find this out? I was hoping to find a
core dump file left over after the seg fault but no such luck.

I have confirmed, however, that my md5sums agree with Dr. Hyatt's so
that is a relief but doesn't solve the problem.

I'll work on those debug steps you mentioned and try to get some
answers.

thanks -
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crafty Compiling How to for Linux AdministratorX rec.games.chess.computer (Computer Chess) 5 March 16th 04 12:26 AM
poor crafty perf after compile on linux 2.6.1 jake johnson rec.games.chess.computer (Computer Chess) 3 March 12th 04 11:54 PM
Crafty 19.11 Solomon Nuffert rec.games.chess.computer (Computer Chess) 1 March 6th 04 12:15 AM
Compiling Crafty 19.5 on linux Neko rec.games.chess.computer (Computer Chess) 14 November 30th 03 12:25 AM
Crafty Learning Robert Hyatt rec.games.chess.computer (Computer Chess) 0 July 9th 03 08:44 PM


All times are GMT +1. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017