[Openmcl-devel] linux process hang
Larry Pells
lpells at acm.org
Thu Feb 3 06:25:16 PST 2005
When I add the following lines to the end of my foreign function definition
code, openmcl doesn't hang.
(dribble "die.out")
(loop for i from 0 to (1- (first (print (array-dimensions
CCL::%PASCAL-FUNCTIONS%)))) do (pprint (aref CCL::%PASCAL-FUNCTIONS% i)))
(dribble)
But if i remove them, it hangs. Another thing that I have noticed, if I use a
copy of my wrapper c library that defines over 13000 wrapper functions,
openmcl hangs on my first test case no matter if I only have a minimalistic
set of foreign functions and callbacks defined. If I use a wrapper c library
with about 100 wrapper functions, then things work as I described in my first
email.
These wrapper libraries wrap Trolltech's Qt C++ classes. (Sorry I didn't
mention it in my first email.) I have written a code generator that
generates both the c wrappers and the lisp interface code.
Also, to clarify hanging, I do a 'ps -Af | grep ppccl' and I see the
following:
larry 9187 9186 0 07:01 pts/10 00:00:00 /usr/local/src/ccl/ppccl
larry 9189 9187 0 07:01 pts/10 00:00:00 [ppccl <defunct>]
I hope this give a clearer picture which will allow uncovering the problem
with opemcl hanging.
Larry
On Wednesday 02 February 2005 23:01, Gary Byers wrote:
> On Wed, 2 Feb 2005, Larry Pells wrote:
> > I am trying to work on some implementing an interface to some foreign
> > functions utilizing uffi as much as possible. I have added enough
> > foreign functions and lisp callback functions to pass complete 2 test
> > cases.
> >
> > When I add about 95 callback functions, openmcl hangs on the return from
> > a callback while executing the first test. If I place stderr output in
> > the c library, nothing is displayed. If I place output (and flush it) in
> > lisp right before returning to c, it is displayed.
> >
> > I am puzzled as to what could be causing openmcl to hang when I add
> > additional callback function that are not being used yet. I am running
> > openmcl 0.14.2-p1 updated and built from CVS
> > ':pserver:cvs at clozure.com:/usr/local/tmpcvs/ccl-0.14' as of a couple of
> > days ago. I am running this on Yellowdog 3.0.1.
> >
> > Any help would be appreciated.
> >
> > Larry
> > _
>
> There's a special variable: CCL::%PASCAL-FUNCTION% (way back when, the
> Mac Toolbox generally followed 68K Pascal calling conventsions) whose
> value should be a a simple-vector; each non-null element of that
> vector should be a 5-element vector (a pointer, a boolean - not used
> under Linux - a lisp function, a symbol, and another boolean, in that
> order). The last few elements of the CCL::%PASCAL-FUNCTIONS% array
> might be empty, and there should be non-empty elements for the handful
> of callbacks that the lisp runtime system uses and for any that you've
> added.
>
> Does that look correct, so far (and as far as you can tell) ?
>
> (Everything that references or modifies the contents of that vector
> should hold a lock while doing so; when the vector fills up, a
> slightly larger one gets allocated, old entries get copied to the
> new vector, and %PASCAL-FUNCTIONS% is updated.)
More information about the Openmcl-devel
mailing list