On Sun, 14 Apr 2013 01:26:23 +0200 Juan Jose Garcia-Ripoll <juanjose.garciarip...@gmail.com> wrote:
> On Sat, Apr 13, 2013 at 9:07 PM, Matthew Mondor > <mm_li...@pulsar-zone.net>wrote: > > > Hmm I'll have to do some more tests I guess. It's possible that my git > > tree isn't properly in sync with yours, although "git pull" reports > > that it's up to date. > > > > There were some tiny bugs left out in the new code, which can now compile > files in Windows with data that exceeds 65kb. Testing it on OS X and > Windows seems to work, but I still have to go through the whole release > process. ASDF now loads fine and SLIME also builds fine and works, thanks for the quick fixes! A strange thing was that even after these fixes, at first ASDF loaded fine, but somehow the SLIME build still failed the same way as before. It succeeded several times afterwards. Then I noticed that the crow-httpd build also failed with mmap errors (the httpd I had written for ECL). So I noticed after a few tests that often loading more than one fasl, or even a single one twice in a row failed: $ cat hello.lisp (defun hello () (format t "Hello, world!~%")) $ /usr/local/ecl/bin/ecl [...] > (compile-file "hello") ;;; ;;; Compiling hello. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 ;;; ;;; Compiling (DEFUN HELLO ...). ;;; End of Pass 1. ;;; Emitting code for HELLO. ;;; Finished compiling hello. ;;; #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" NIL NIL > (load "hello") #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" > (hello) Hello, world! NIL > (load "hello") Condition of type: SIMPLE-ERROR LOAD: Could not load file #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" (Error: "mmap of entire address space failed: Permission denied") Available restarts: 1. (RESTART-TOPLEVEL) Go back to Top-Level REPL. Broken at SI:BYTECODES. [Evaluation of: (LOAD "hello")] In: #<process TOP-LEVEL>. >> With the last official release, built with the same gmp and boehm-gc: $ ecl ;;; Loading #P"/usr/pkg/lib/ecl-12.12.1/asdf.fas" ;;; Loading #P"/usr/pkg/lib/ecl-12.12.1/cmp.fas" ECL (Embeddable Common-Lisp) 12.12.1 (git:UNKNOWN) Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya Copyright (C) 1993 Giuseppe Attardi Copyright (C) 2000 Juan J. Garcia-Ripoll ECL is free software, and you are welcome to redistribute it under certain conditions; see file 'Copyright' for details. Type :h for Help. Top level in: #<process TOP-LEVEL>. > (compile-file "hello") ;;; ;;; Compiling hello. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 ;;; ;;; Compiling (DEFUN HELLO ...). ;;; End of Pass 1. ;;; Emitting code for HELLO. ;;; Finished compiling hello. ;;; #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" NIL NIL > (load "hello") ;;; Loading #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" > (load "hello") ;;; Loading #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" #P"/home/mmondor/work/mmsoftware/cl/server/hello.fas" > (hello) Hello, world! NIL > ^D I then assumed that there must be something odd going on with the loader, so used ktrace(1) on the process to get a clue: First load: 8032 1 ecl CALL open(0x26014a8,0,0x2f2f2f2f2f2f2f2f) 8032 1 ecl NAMI "/home/mmondor/work/mmsoftware/cl/server/hello.fas" 8032 1 ecl RET open 5 8032 1 ecl CALL __fstat50(5,0x7f7fffffc7b0) 8032 1 ecl RET __fstat50 0 8032 1 ecl CALL mmap(0,0x1000,1,1,5,0,0) 8032 1 ecl RET mmap 140187598168064/0x7f7ff7fda000 8032 1 ecl CALL munmap(0x7f7ff7fda000,0x1000) 8032 1 ecl RET munmap 0 8032 1 ecl CALL mmap(0,0x201000,5,0x15000002,5,0,0) 8032 1 ecl RET mmap 140187535409152/0x7f7ff4400000 8032 1 ecl CALL mmap(0x7f7ff4600000,0x1000,3,0x12,5,0,0) 8032 1 ecl RET mmap 140187537506304/0x7f7ff4600000 8032 1 ecl CALL mmap(0x7f7ff4601000,0,3,0x1012,0xffffffff,0,0) 8032 1 ecl RET mmap 140187537510400/0x7f7ff4601000 8032 1 ecl CALL mprotect(0x7f7ff4401000,0x1ff000,0) 8032 1 ecl RET mprotect 0 8032 1 ecl CALL close(5) 8032 1 ecl RET close 0 Second load: 8032 1 ecl CALL open(0x2934ce8,0,0x2f2f2f2f2f2f2f2f) 8032 1 ecl NAMI "/tmp/ecl08032a" 8032 1 ecl RET open 5 8032 1 ecl CALL __fstat50(5,0x7f7fffffc7b0) 8032 1 ecl RET __fstat50 0 8032 1 ecl CALL mmap(0,0x1000,1,1,5,0,0) 8032 1 ecl RET mmap 140187598168064/0x7f7ff7fda000 8032 1 ecl CALL munmap(0x7f7ff7fda000,0x1000) 8032 1 ecl RET munmap 0 8032 1 ecl CALL mmap(0,0x201000,5,0x15000002,5,0,0) 8032 1 ecl RET mmap -1 errno 13 Permission denied 8032 1 ecl CALL close(5) 8032 1 ecl RET close 0 Immediately I remembered that /tmp/ is a memory filesystem mounted with a no-exec option, which was probably the issue, as the new ECL uses /tmp/ where it previously used the current directory. So I looked for an option to be able to configure this. As I didn't immediately find it using APROPOS and explicitely loading ASDF and setting ASDF/STREAM:*TEMPORARY-DIRECTORY* didn't help, I looked at the code: In c/ffi/libraries.d: cl_object copy = make_constant_base_string("TMP:ECL"); In lsp/config.lsp.in: (let (x) (cond ((and (setf x (ext:getenv "TMPDIR")) (probe-file x))) ((and (setf x (ext:getenv "TEMP")) (probe-file x))) ((and (setf x (ext:getenv "TMP")) (probe-file x))) (t (setf x #+unix "/tmp" #-unix "./"))) (si::pathname-translations "TMP" `(("**;*.*" ,(format nil "~A/**/*.*" x))))) This uses the UNIX feature which now seems to be OS-UNIX (I've not grepped yet for these but it's not impossible that there are other uses of UNIX). But by setting the TMPDIR environment variable to another directory without execution limitations, everything loads fine again. I also confirm that my own software works fine under the current ECL once the TMPDIR environment variable is set. If that's not already possible, do you think that it would be a good idea to also configure the temporary path via a variable, such that it can be set in ~/.eclrc ? Thanks again, -- Matt ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list