From: Michael P. <mi...@ph...> - 2009-12-02 14:58:56
|
Hi I'd like to strace my sbcl core (SBCL 1.0.30, Fedora Core 11, Linux 2.6.30.9-96.fc11.i686.PAE), but cant, as sbcl gives errors like: CORRUPTION WARNING in SBCL pid 5833(tid 3086854928): I would like to trace system calls sbcl is doing. In particular i want to see the IO calls and check whether the IO is being buffered or is byte-by-byte. I'm not sure if there is any other way to do this. Using the sb-sprof & sb-profile facilities I do not seem to be able to get detailed enough information about the underlying system calls. Cheers Mike |
From: Gábor M. <me...@re...> - 2009-12-02 15:48:39
|
On Wednesday 02 December 2009, Michael Pheasant wrote: > Hi > > I'd like to strace my sbcl core (SBCL 1.0.30, Fedora Core 11, Linux > 2.6.30.9-96.fc11.i686.PAE), but cant, as sbcl gives errors like: > > CORRUPTION WARNING in SBCL pid 5833(tid 3086854928): > > I would like to trace system calls sbcl is doing. In particular i > want to see the IO calls and check whether the IO is being buffered > or is byte-by-byte. > > I'm not sure if there is any other way to do this. Using the sb-sprof > & sb-profile facilities I do not seem to be able to get detailed > enough information about the underlying system calls. > > Cheers > > Mike Hello Mike Could you be more specific about what happens and how to reproduce it; I can start a recent sbcl with strace. See "1.3.2 Signal Related Bugs" of http://sbcl.sourceforge.net/manual/Reporting-Bugs.html regards, Gabor |
From: Michael P. <mi...@ph...> - 2009-12-07 06:32:12
|
Hi again Ok, to reproduce the problem, running a lisp prog under strace fails but works ok if you dont run it under strace, make a 4.5Mb test file of 400,000 lines: $ sbcl --noinform --eval '(progn (dotimes (x 400000) (format t "line ~a~%" x)) (quit))' >test-file Then make a script 'test.lisp' with these contents:- ================ (let ((i 0) (len 0)) (with-open-file (s #p"test-file") (do ((line (read-line s nil) (read-line s nil))) ((null line)) (incf i) (incf len (1+ (length line))) (format t "i=~a l=~a~%" i len)))) ================ Then run it as a script, it will read through the whole file, all OK: $ sbcl --script test.lisp ..outputs lots of lines, last one is.. i=400000 l=4688890 *) Now run the same command under strace (output to /dev/null, we dont care) you get the corruption warning:- $ strace -o/dev/null sbcl --script test.lisp ...outputs lots of lines, then... i=180230 l=2051650 i=180231 l=2051662 i=180232 l=2051674 /setting gc_blocked_deferrables heap WP violation? fault_addr=ffffffb9, page_index=-1 CORRUPTION WARNING in SBCL pid 6651: Memory fault at ffffffb9 (pc=0x100138d78c, sp=0x7ffff0cb7630) The integrity of this image is possibly compromised. Exiting. *) Experimenting with files of different line lengths, it is not the number of lines but the size of the file read so far - something to do with triggering garbage collection maybe. *) The above output is from an sbcl-1.0.33 binary I built with '#define QSHOW_SIGNALS 1' in src/nuntime/runtime.h *) The *features* are: (:ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86-64 :UNIX :ELF :LINUX :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD :C-STACK-IS-CONTROL-STACK :LINKAGE-TABLE :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS :CYCLE-COUNTER :COMPLEX-FLOAT-VOPS :FLOAT-EQL-VOPS :INLINE-CONSTANTS :OS-PROVIDES-DLOPEN :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T) *) box is Fedora core 11, uname -a: Linux imb09-02933 2.6.30.9-99.fc11.x86_64 #1 SMP Tue Nov 17 21:30:38 EST 2009 x86_64 x86_64 x86_64 GNU/Linux *) I dont know how to get a backtrace, I am dropped back to the command-line. Anything else, just let me know. Should I log it in launchpad? Cheers Mike 2009/12/3 Gábor Melis <me...@re...>: > On Wednesday 02 December 2009, Michael Pheasant wrote: >> Hi >> >> I'd like to strace my sbcl core (SBCL 1.0.30, Fedora Core 11, Linux >> 2.6.30.9-96.fc11.i686.PAE), but cant, as sbcl gives errors like: >> >> CORRUPTION WARNING in SBCL pid 5833(tid 3086854928): >> >> I would like to trace system calls sbcl is doing. In particular i >> want to see the IO calls and check whether the IO is being buffered >> or is byte-by-byte. >> >> I'm not sure if there is any other way to do this. Using the sb-sprof >> & sb-profile facilities I do not seem to be able to get detailed >> enough information about the underlying system calls. >> >> Cheers >> >> Mike > > Hello Mike > > Could you be more specific about what happens and how to reproduce it; I > can start a recent sbcl with strace. > > See "1.3.2 Signal Related Bugs" of > http://sbcl.sourceforge.net/manual/Reporting-Bugs.html > > regards, > Gabor > |