Patrick May | 3 Sep 2005 23:17

sb-bsd-sockets support for multicast

     The system I'm building requires support for multicast.  This
isn't currently provided by sb-bsd-sockets.  Is this feature planned
by the original contributer of the package or should I add it myself
(and send it to the SBCL team for potential inclusion, of course)?

Regards,

Patrick

------------------------------------------------------------------------
Patrick May                            | IntaMission Software Ltd.
                                       | Thames Court, 1 Victoria Street
patrick.may <at> intamission.com            | Windsor, Berkshire, SL4 1YB, UK

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Robert Dodier | 5 Sep 2005 23:37
Picon

can't start sbcl on linux: "ensure_space: failed to validate 536870912 bytes"

Hello,

I'm trying to run sbcl 0.9.4 on Fedora 1-3 (kernel 2.4.22-1.2115.nptl).

I've tried executing sbcl from the rpm and also after rebuilding from
the source code.
In both cases I get this message:

ensure_space: failed to validate 536870912 bytes at 0x09000000

Maybe someone can clarify what this message means.
I'm guessing that sbcl is looking for more memory than what it found --
is there a way to configure it to use less?

For the record, the computer has 256 M memory and 512 M swap.

I searched the mailing list archive and also the web but I wasn't
able to find an answer to this question. Thanks for your help.

Robert Dodier

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Juho Snellman | 6 Sep 2005 16:46
Picon
Picon
Favicon

Re: can't start sbcl on linux: "ensure_space: failed to validate 536870912 bytes"

On Mon, Sep 05, 2005 at 03:37:41PM -0600, Robert Dodier wrote:
> Hello,
> 
> I'm trying to run sbcl 0.9.4 on Fedora 1-3 (kernel 2.4.22-1.2115.nptl).
> 
> I've tried executing sbcl from the rpm and also after rebuilding from
> the source code.
> In both cases I get this message:
> 
> ensure_space: failed to validate 536870912 bytes at 0x09000000
> 
> Maybe someone can clarify what this message means.

It basically means that an attempt to reserve the memory between
0x09000000 and 0x29000000 for SBCL with mmap failed for one reason or
another.

> I'm guessing that sbcl is looking for more memory than what it found --
> is there a way to configure it to use less?

Currently there's no way to attempt to reserve less memory, except by
editing src/compiler/x86/parms.lisp and recompiling.

I gather that earlier versions of SBCL work on that computer? In that
case it's more likely that the problem isn't actually the amount of
memory that's getting allocated, but that something else has already
been mapped somewhere in the region we're trying to reserve. SBCL
versions before 0.9.4 would silently override the earlier mappings,
leading to mysterious segfaults in some situations.

(Continue reading)

Robert Dodier | 7 Sep 2005 04:01
Picon

Re: can't start sbcl on linux: "ensure_space: failed to validate 536870912 bytes"

hello juho,

> Currently there's no way to attempt to reserve less memory, except by
> editing src/compiler/x86/parms.lisp and recompiling.

OK, i set the allocated memory to 128 M and recompiled.
same error about "ensure_space: failed to validate".

>   * Does starting SBCL as "setarch i386 sbcl" or "setarch i386 -R sbcl"
>     help?

that didn't work -- apparently no setarch on this system.

>   * Does "echo 0 > /proc/sys/kernel/exec-shield" (as root) help?

YES! after executing that, sbcl runs successfully.

>   * Does "echo 0 > /proc/sys/kernel/randomize_va_space" (as root) help?

didn't try that.

thanks a lot for your help,

robert dodier

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
(Continue reading)

Lars Rune Nøstdal | 7 Sep 2005 08:53
Picon

Memory leak, or am I doing something stupid?

Hi,

(dotimes (i 150)
  (let ((thread (sb-thread:make-thread (lambda ()
                                         (format t "Hi, I'm ~A.~%" sb-thread:*current-thread*) (finish-output)
                                         (sleep 2)))))
    (sleep 0.01)
    (sb-thread:terminate-thread thread)))

#|
Running the above a couple of times, while:

lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 445541 47812  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 500191 50888  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 664141 58400  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
lars <at> blackbox ~/sbcl $ ps -C sbcl -F
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lars     25530  4301  1 664141 58400  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
(Continue reading)

Lars Rune Nøstdal | 7 Sep 2005 17:56
Picon

Re: Memory leak, or am I doing something stupid?

On Wed, 07 Sep 2005 08:53:12 +0200, Lars Rune Nøstdal wrote:

> Hi,
> 
> (dotimes (i 150)
>   (let ((thread (sb-thread:make-thread (lambda ()
>                                          (format t "Hi, I'm ~A.~%" sb-thread:*current-thread*) (finish-output)
>                                          (sleep 2)))))
>     (sleep 0.01)
>     (sb-thread:terminate-thread thread)))
> 
> 
> #|
> Running the above a couple of times, while:
> 
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 445541 47812  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 500191 50888  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 664141 58400  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
(Continue reading)

Gábor Melis | 7 Sep 2005 18:05

Re: Memory leak, or am I doing something stupid?

On Wednesday 07 September 2005 08:53, Lars Rune Nøstdal wrote:
> Hi,
>
> (dotimes (i 150)
>   (let ((thread (sb-thread:make-thread (lambda ()
>                                          (format t "Hi, I'm ~A.~%"
> sb-thread:*current-thread*) (finish-output) (sleep 2)))))
>     (sleep 0.01)
>     (sb-thread:terminate-thread thread)))
>
>
> #|
> Running the above a couple of times, while:
>
> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08
...
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> lars     25530  4301  1 558625 61412  0 08:06 pts/3    00:00:08
> /usr/bin/sbcl .....................
> etc.
>
>
> Until SBCL refuses to create more threads. Calling (gc :full t) seems
> to fix it, and I can continue creating more threads.

Currently you can not have more than ~500 hundred threads at the same 
time. This includes finished but not gc'ed threads so the above 
behaviour is normal. 
(Continue reading)

Cyrus Harmon | 7 Sep 2005 18:08

bivalent streams question


I'm exploring the relatively new bivalent streams in SBCL and I am  
trying to do the following:

(defun bivalent-stream-test-1 ()
   (with-open-file (foo #p"foo"
                        :direction :output :if-does-not-exist :create
                        :if-exists :overwrite
                        :element-type :default)
     (format foo "bogus!~&")
     (write-byte 131 foo)
     (write-sequence #(137 80 78 71 13 10 26 10) foo)))

The format and the write-byte succeed, but the write-sequence fails  
with the error:

The value 137 is not of type CHARACTER.
    [Condition of type TYPE-ERROR]

...

Backtrace:
   0: (SB-IMPL::OUTPUT-CHAR-LATIN-1-FULL-BUFFERED #<SB-SYS:FD-STREAM  
for "file /Users/sly/projects/cyrusharmon.org/tes$
   1: ((LABELS SB-IMPL::OUTPUT-SEQ-IN-LOOP))
   2: (SB-IMPL::ANSI-STREAM-WRITE-SEQUENCE #(137 80 78 71 13 10 26  
10) #<SB-SYS:FD-STREAM for "file /Users/sly/project$
   3: (WRITE-SEQUENCE #(137 80 78 71 13 10 26 10) #<SB-SYS:FD-STREAM  
for "file /Users/sly/projects/cyrusharmon.org/tes$
   4: (BIVALENT-STREAM-TEST::BIVALENT-STREAM-TEST-1)
(Continue reading)

Gábor Melis | 7 Sep 2005 18:19

Re: Re: Memory leak, or am I doing something stupid?

On Wednesday 07 September 2005 17:56, Lars Rune Nøstdal wrote:
>
> It seems doing (gc :full t) only helps a bit; some memory is still
> leaking.

That's possible. In 0.9.4.1 there was a related fix but it might not be 
perfect. GC conservatism doesn't help, either.

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Lars Rune Nøstdal | 7 Sep 2005 18:18
Picon

Re: Memory leak, or am I doing something stupid?

On Wed, 07 Sep 2005 17:56:55 +0200, Lars Rune Nøstdal wrote:

> On Wed, 07 Sep 2005 08:53:12 +0200, Lars Rune Nøstdal wrote:
> 
>> Hi,
>> 
>> (dotimes (i 150)
>>   (let ((thread (sb-thread:make-thread (lambda ()
>>                                          (format t "Hi, I'm ~A.~%" sb-thread:*current-thread*) (finish-output)
>>                                          (sleep 2)))))
>>     (sleep 0.01)
>>     (sb-thread:terminate-thread thread)))
>> 
>> 
>> #|
>> Running the above a couple of times, while:
>> 
>> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
>> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
>> lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
>> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
>> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
>> lars     25530  4301  1 390891 44732  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
>> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
>> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
>> lars     25530  4301  1 445541 47812  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
>> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
>> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
>> lars     25530  4301  1 500191 50888  0 08:06 pts/3    00:00:08 /usr/bin/sbcl
>> lars <at> blackbox ~/sbcl $ ps -C sbcl -F
(Continue reading)


Gmane