gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: too much static?


From: Camm Maguire
Subject: [Gcl-devel] Re: too much static?
Date: 27 Oct 2005 22:20:18 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Robert Boyer <address@hidden> writes:

> Your observation that one needs to be very explicit about the exact
> configuration one is using in reporting about si::socket bugs is definitely
> accurate and I'll try to do much better.  I may have wasted a lot of
> your time here.
> 
> I should have mentioned that the
> 
>   couldn't open socket:% 
> 
> bug that I got was the result of using a 2.7.0 that was built with your new
> static option and with maximum pages.
> 

Ah yes, now it is clear -- remember those functions we had to disable
for static linking?  One of them was the ip address lookup routine
gethostbyname.  I strongly suspect that the static build cannot lookup
"localhost".   One straightforward partial workaround would be to
enable the code to use supplied ip addresses instead ("127.0.0.1" in
this case), but we really need to figure out how to do this right
without hosing the memory image by loading shared libraries in the
wrong place.  If anyone figures out how to get a static link of
gethostbyname and similar, I'd be most interested.

> When I run the exact same input on a new 2.7.0 built without static and with
> default page sizes, I get the good results you do.  So I'm now on first base
> in trying to understand the amazing si::socket stuff.  Thanks!!!
> 

Great to hear this is working for you.  Just to reiterate, we can
significantly improve on the internals, but the basics can be explored
I believe by this mechanism at the present.

> Would you care for a more refined analysis of whether it is was just the
> static option that is causing the problem (as opposed to, say, the max pages
> option, or something else)?
> 

Well, no need for further work on your part here I'd think.  If you
are interested in the ipaddress workaround option so you can try out
the larger static build in parallel, please let me know and I'll get
this in.  But a proper solution will require a bit of research I'd
think.  

> Perhaps GCL should have a function (si::bug-report-info) that prints out all
> the conceivable possible info about the configuration one is running under
> and the machine one is running on, including all the "./configure" options
> that were used before the make.  The idea is that after giving a very short
> and easily reproducible transcript illustrating an alleged bug, a thoughtful
> user would type (bug-report-info) to get printed into the transcript all that
> jazz.
> 

This is a great idea, but one can only wonder at the thousands of
items that might go in such a report!  Of course, a reasonable subset
is still most useful.    Might be interesting to inhale config.status
(output by configure) into the lisp image if we're not too concerned
about memory.

In general, though, our error system still needs an overhaul.  I've
been addressing it piecemeal thus far in order to use "the devil I
know" to fix the bugs that are already exposed first.  great ideas
like these should go in during the final polish stage before release,
I'd think.

Thoughts/suggestions most welcome!

Take care, 

> Thanks,
> 
> Bob
> 
> 
> GCL (GNU Common Lisp)  2.7.0 ANSI    Oct 24 2005 10:28:12
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
> Binary License:  GPL due to GPL'ed components: (BFD UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> 
> Use (help) to get some basic information on how to use GCL.
> 
> >(defvar *waits* (with-open-file 
>                (s "/dev/random" :element-type '(unsigned-byte 32))
>                (mapcar (lambda (x) (read-byte s)) (make-list 10))))
> (defun complicated-function (x) 
>   (let ((y (nth (mod (si::getpid) 10) *waits*)))
>     (sleep (mod y 30))
>     (cons x (mod y x))))
> (defun one-result (s) 
>   (format s "~s~%" (complicated-function (read s nil 10)))
>   (read s nil 'eof)
>   (bye))
> (defun many-results (s) 
>   (let ((x (read s nil 'eof)))
>     (unless (eq x 'eof)
>       (format s "~s~%" (complicated-function x))
>       (many-results s))
>     (bye)))
> (defun watch (x) 
>   (cond ((some 'streamp x) 
>        (print x)
>        (sleep 1)
>        (watch (mapcar (lambda (x) (if (and (streamp x) (listen x)) (read x 
> nil 'eof) x)) x)))
>       (x)))
> 
> 
> 
> 
> 
> *WAITS*
> 
> >
> COMPLICATED-FUNCTION
> 
> >
> ONE-RESULT
> 
> >
> MANY-RESULTS
> 
> >
> WATCH
> 
> >(setq l1 (si::socket 1927 :server #'one-result :daemon t))
> 
> 912
> 
> >(setq x (mapcar (lambda (x) (si::socket 1927 :host "localhost")) (make-list 
> >10)))
> couldn't open socket:% 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]