freenode/#sbcl - IRC Chatlog
Search
16:09:43
phoe
I have a SBCL thread that just hangs with 100% CPU usage. Its backtrace shows pretty much nothing, https://plaster.tymoon.eu/view/929#929 - how can I debug it?
16:09:46
phoe
I want to figure out where exactly it is and what it's doing, but a lack of a backtrace makes it pretty hard for me.
16:22:47
Shinmera
Fwiw I've encountered that problem too. Thread sapping full core, interrupting it and slime only lists like four frames with no function names
16:29:42
phoe
I'm stress testing my network socket engine where my thread sometimes hangs at 100% CPU usage. And I dont' know what's going in.
16:39:24
phoe
Something weird is going on - when I slime-compile a function using C-c C-c, that other thread unblocks.
16:39:53
phoe
And the logging immediately tells me that this thread was stuck in trying to read from a socket that signaled EBADF.
17:41:05
phoe
I'm stress-testing usocket with SBCL now and it seems that something fishy is going on with the file descriptors. I get a ton of usocket "Condition USOCKET:BAD-FILE-DESCRIPTOR-ERROR was signalled." errors.
17:55:40
phoe
...there's a thread leakage somewhere. For some reason, the list of threads on my OS has just about 15 entries, but SBCL exhausted all thread IDs on my machine.
17:57:20
phoe
I don't think it's my code, is it? The threads I'd create via BT would show up on the #'BT:ALL-THREADS list.
20:54:56
phoe
I am currently debugging this - it might because I'm carelessly calling destroy-thread on thousands of threads
21:02:06
phoe
and given that I've seen totally weird things going on during this denugging I could guess there's some corruption going on
21:02:23
phoe
so, first thing - rewrite this code to not use destroy-thread and instead tell the threads to finish gracefully, somehow
21:13:22
phoe
Does executing a Lisp destroy-thread unwind its stack and execute all unwind-protect cleanup forms?