SLIME has been working perfectly for me for some time. But the other day, I encountered some odd behavior. I hit M-. for slime-edit-definition. The function was a simple one, in another file in the project. But the busy mouse pointer appeared, my notebook cooling fan came on, and SLIME ran until memory was exhausted about 2 minutes later. SBCL totally crashed, and dropped into it's own debugger. For all the other functions in the exact same file, there is no problem. On my other system, no problem. Now I'll try to fill in some details:
SBCL 0.9.15~ Ubuntu Dapper Drake Emacs gtk-snapshot CVS SLIME (from last week)
Because my app is a web app and I've had issues connecting with SLIME, I generally start SBCL in a terminal, load the project, then run slime-connect in emacs, and this works fine. Once the operation begins to consume CPU and memory, I can disconnect within emacs to stop it from totally crashing, then I have to start over. This happens ONLY on my Linux box, not my MacBook.
I'll be happy to provide any other details.
Jonathon McKitrick -- My other computer is your Windows box.
* Jonathon McKitrick [2006-10-19 16:52+0200] writes:
SLIME has been working perfectly for me for some time. But the other day, I encountered some odd behavior. I hit M-. for slime-edit-definition. The function was a simple one, in another file in the project. But the busy mouse pointer appeared, my notebook cooling fan came on, and SLIME ran until memory was exhausted about 2 minutes later. SBCL totally crashed, and dropped into it's own debugger.
Are you saying that Emacs crashed too, or just SBCL?
[...] Once the operation begins to consume CPU and memory, I can disconnect within emacs to stop it from totally crashing, then I have to start over.
Can you evaluate (swank:find-definitions-for-emacs "<fun-name>") in the terminal and maybe interrupt it before it crashes and send a stacktrace?
I'll be happy to provide any other details.
The last form in the *slime-events* buffer could be interesting.
Helmut.
On Fri, Oct 20, 2006 at 06:44:24PM +0200, Helmut Eller wrote: : * Jonathon McKitrick [2006-10-19 16:52+0200] writes: : Are you saying that Emacs crashed too, or just SBCL?
The CPU runs, the cursor spins, spare cycles and virtual memory disappear. In the terminal where I started sbcl and swank, I see this:
--- some output snipped --- * Heap exhausted during garbage collection: 0 bytes available, 8 requested. Total bytes allocated=536533696 fatal error encountered in SBCL pid 5694(tid 3077311392): Heap exhausted, game over. LDB monitor ldb> --- end ---
Meanwhile, the cursor in emacs is still spinning, waiting on output from the pipe to swank, I assume. I have to hit 'q' to break from the sbcl debugger prompt.
The last entry in slime-events is:
(:emacs-rex (swank:find-definitions-for-emacs "delete-user") ":ajax" t 17)
Running find-definitions-for-emacs in the terminal returns NIL.
I'm not quite sure how to break into slime/swank. Hitting Ctrl-C opens a window and shows a stack trace, but it seems to just be the REPL loop.
How can I extract more details?
Jonathon McKitrick -- My other computer is your Windows box.
* Jonathon McKitrick [2006-10-20 19:53+0200] writes:
How can I extract more details?
I assumed that find-definitions-for-emacs crashes. Perhaps you have to qualify the name: (find-definitions-for-emacs "ajax::delete-user"). If find-definitions-for-emacs actually returns nil, you can try to set swank:*log-events*. But I would be surprised if the bug is in some other place.
Helmut.
On Sat, Oct 21, 2006 at 11:24:52AM +0200, Helmut Eller wrote: : * Jonathon McKitrick [2006-10-20 19:53+0200] writes: : : > How can I extract more details? : : I assumed that find-definitions-for-emacs crashes. Perhaps you have : to qualify the name: (find-definitions-for-emacs "ajax::delete-user"). : If find-definitions-for-emacs actually returns nil, you can try to set : swank:*log-events*. But I would be surprised if the bug is in some : other place.
I get the same result. In the log, the last item is the call to find-definitions-for-emacs, then the 'heap exhausted' message.
Jonathon McKitrick -- My other computer is your Windows box.
* Jonathon McKitrick [2006-10-23 21:01+0200] writes:
: I assumed that find-definitions-for-emacs crashes. Perhaps you have : to qualify the name: (find-definitions-for-emacs "ajax::delete-user"). : If find-definitions-for-emacs actually returns nil, you can try to set : swank:*log-events*. But I would be surprised if the bug is in some : other place.
I get the same result. In the log, the last item is the call to find-definitions-for-emacs, then the 'heap exhausted' message.
I think the bug is somewhere near swank-backend:find-definitions. Can you trace all functions in the swank-backend and sb-introspect packages to see which function doesn't return normally?
Helmut.
On Thu, Oct 26, 2006 at 04:33:17PM +0200, Helmut Eller wrote: : Can you trace all functions in the swank-backend and sb-introspect : packages to see which function doesn't return normally?
Is there an easy way to trace an entire package?
Jonathon McKitrick -- My other computer is your Windows box.
Jonathon McKitrick writes:
On Thu, Oct 26, 2006 at 04:33:17PM +0200, Helmut Eller wrote: : Can you trace all functions in the swank-backend and sb-introspect : packages to see which function doesn't return normally?
Is there an easy way to trace an entire package?
(eval `(trace ,@(let ((funs '()) (p (find-package "SWANK-BACKEND"))) (do-external-symbols (s p) (when (and (fboundp s) (eq (symbol-package s) p) (not (macro-function s)) (not (special-operator-p s))) (push s funs))) funs)))
On Thu, Oct 26, 2006 at 04:33:17PM +0200, Helmut Eller wrote: : * Jonathon McKitrick [2006-10-23 21:01+0200] writes: : : > : I assumed that find-definitions-for-emacs crashes. Perhaps you have : > : to qualify the name: (find-definitions-for-emacs "ajax::delete-user"). : > : If find-definitions-for-emacs actually returns nil, you can try to set : > : swank:*log-events*. But I would be surprised if the bug is in some : > : other place. : > : > I get the same result. In the log, the last item is the call to : > find-definitions-for-emacs, then the 'heap exhausted' message. : : I think the bug is somewhere near swank-backend:find-definitions. : Can you trace all functions in the swank-backend and sb-introspect : packages to see which function doesn't return normally?
I'm going to have a trace of >770 lines. Is there a good way to filter/pre-process the output? Where shall I send it?
Jonathon McKitrick -- My other computer is your Windows box.
* Jonathon McKitrick [2006-10-27 21:54+0200] writes:
I'm going to have a trace of >770 lines. Is there a good way to filter/pre-process the output? Where shall I send it?
We only need the last or last few calls to decide which function didn't return normally. I think/hope that this is a SBCL bug and not SLIME problem. But it's hard to tell without a reproducible test case.
Helmut.