From: <Ja...@cs...> - 2005-02-27 22:38:09
Attachments:
100Prisoners.lisp
|
Hi! I've just egun using SBCL 0.8.19 as an alternative to CMUCL on my AMD64 machine runing Ubuntu linux (Hoary array-5). I have noticed some strange behaviour: - un-debuggable errors are signalled, for ex. >> * (run 50 C-0) debugger invoked on a SIMPLE-ERROR in thread 7368: segmentation violation at #X10009C4D04 ... << ending in the message: >> Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded. * >> and the debugger exits abruptly... But when I evaluate the SAME EXPRESSION a second time, it works fine. It is as if sbcl had to run the code once, evaluating all the stuff and crashing, before it could run it again correctly. After crashing once, it can evaluate the same code infinitely, it would seem. The same code works, slower, in CMUCL. Could anyone tell me if this behaviour is common or could it be some error in my code? I attach the file that causes this error. The program implements a functional version of the simple solution to the 100 prisoners enigma. To test it: - load the file evaluate: * (run n c-0) where n is the number of prisoners, the bigger the longer it takes to solve. Example: >> * (time (run 100 C-0)) Evaluation took: 0.839 seconds of real time 0.056992 seconds of user run time 0.027995 seconds of system run time 5 page faults and 23,321,456 bytes consed. ... << Other options are indicated in the code... If there is anything I can do to help debug this, I'd be happy to help out. Cheers, JH |
From: Brian M. <bma...@cs...> - 2005-02-27 22:45:06
|
On Feb 27, 2005, at 4:37 PM, Ja...@cs... wrote: > Hi! > I've just egun using SBCL 0.8.19 as an alternative to CMUCL on my > AMD64 machine runing Ubuntu linux (Hoary array-5). > > I have noticed some strange behaviour: > - un-debuggable errors are signalled, for ex. >>> > * (run 50 C-0) > > debugger invoked on a SIMPLE-ERROR in thread 7368: > segmentation violation at #X10009C4D04 In general, the declaration (safety 0) means what it says. I would recommend running your code without this declaration and seeing if it pops up a condition. Segfaults in code compiled with (safety 0) are probably not useful bug reports unless the code is provably correct. -- Brian Mastenbrook http://www.iscblog.info/ http://www.cs.indiana.edu/~bmastenb/ |
From: Christophe R. <cs...@ca...> - 2005-02-28 07:07:55
|
Ja...@cs... writes: > debugger invoked on a SIMPLE-ERROR in thread 7368: > segmentation violation at #X10009C4D04 > ... > << > ending in the message: >>> > Help! 11 nested errors. SB-KERNEL:*MAXIMUM-ERROR-DEPTH* exceeded. > * >>> > and the debugger exits abruptly... The good news is that this will shortly become rather more debuggable, as there is a patch on sbcl-devel which is likely to remove the debugger confusion. Cheers, Christophe |