freenode/#lisp - IRC Chatlog
Search
9:30:40
momozor
Hi, can I get some feedback of the code in https://github.com/momozor/Saurna/blob/master/src/main.lisp.
11:37:16
puchacz
for example, for exponential decay I can write in Mathematica: FindFit[points, a Exp[-x b], {a, b}, x]
11:59:50
thijso
Shinmera: what implementations have you tested verbose on? On SBCL my code runs without errors, but on ECL it looks like verbose is messing with other threads, namely a thread running a usocket UDP server. After a few seconds that thread dies with an unknown error...
12:00:28
thijso
And this is only when adding in verbose for logging. Without it, the code works on ECL as expected.
12:02:43
thijso
Well, the error I get is kinda weird as well: "The condition Not a condition type: NIL occurred with errno: 0." and " [Condition of type USOCKET:UNKNOWN-ERROR]"
12:02:46
Shinmera
Verbose does use a background thread to do the logging in. ECL might not like it if it's printing from there and from another thread at the same time.
12:03:38
thijso
Well, now the question becomes, do I start digging, or give up and just do my own debug logging... ;)
12:04:16
thijso
Hey... the main thread was still running and now it says: "Attempted to recursively lock #<lock (nonrecursive) "MESSAGE-LOCK" 0x55a7b1b55360> which is already owned by #<process "verbose-thread" 0x55a7b0a2b400>
12:05:41
Shinmera
Only idea I have about that is that condition-wait doesn't release the lock for some reason
12:06:25
thijso
Sure. I'm gonna be away for couple of hours, but I'll check the logs when I get back.
12:26:29
Shinmera
It seems like ECL is, under some circumstances, returning NIL from condition-wait with the lock still held.
14:42:32
thijso
The 'attempted to recursively lock..' error seems to be gone, indeed, but I still get the 'Condition of type: UNKNOWN-ERROR' at the start in the udp processing thread, Shinmera... Looks like I'll need to do some debugging there
14:44:01
thijso
The error message with that one is: "The condition Not a condition type: NIL occurred with errno: 0." Somehow the udp thread is getting signalled with a condition NIL? Is that how I need to read that error?
14:45:05
thijso
Just weird that it crops up only if I include verbose as a dependency. Even without calling any code in there. But I think it always starts up threads, right? Is there a way to turn that off?
14:48:23
thijso
On the other hand, eventually I would like to use the threading stuff in verbose as well, otherwise the benefit is next to zero...