<NotThatRPG>
But... invoking `sb-ext:search-roots` caused the dread "GC invariant lost, file "hopscotch.c", line 187" without any explanation of why no GC.
karlosz has joined #commonlisp
gxt__ has quit [Remote host closed the connection]
neon has joined #commonlisp
gxt__ has joined #commonlisp
son0p has joined #commonlisp
<Bike>
:(
karlosz has quit [Quit: karlosz]
dcb has joined #commonlisp
occ has joined #commonlisp
pve has quit [Quit: leaving]
<Bike>
NotThatRPG: i just did a quick test and it sure looks like sbcl _can_ GC uninterned symbols - so i would guess you have a good old fashioned leak
<Bike>
(the test being to gensym in a loop for a few seconds to make a bunch of symbols, check for that with room, run a gc, check again)
avocadoist has quit [Ping timeout: 255 seconds]
kevingal has joined #commonlisp
theBlackDragon has quit [Ping timeout: 264 seconds]
molson has joined #commonlisp
theBlackDragon has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
tyson2 has joined #commonlisp
theBlackDragon has quit [Ping timeout: 248 seconds]
akoana has joined #commonlisp
theBlackDragon has joined #commonlisp
Catie has joined #commonlisp
theBlackDragon has quit [Ping timeout: 248 seconds]
theBlackDragon has joined #commonlisp
samedi has quit [Quit: Leaving]
beach` has joined #commonlisp
beach has quit [Ping timeout: 255 seconds]
kevingal has quit [Ping timeout: 255 seconds]
<qhong>
I have some code that need to work only if current *READTABLE* is a specific readtable (or, the current syntax is a specific syntax)
<qhong>
However there seems no way to test it? Because readtable does not support inheritance, and people copy readtable around (e.g. SLY) which discards object identitiy...
<NotThatRPG>
Thanks, Bike -- Kind of mystified about what is hanging onto these symbols. I will try a smaller case and see if I can get search-roots to work on that.
<nytpu>
qhong: try named-readtables (https://github.com/melisgl/named-readtables) or fall back on duck typing where you expect the readtable to contain the correct entries and don't worry about checking it beforehand
masinter has quit [Ping timeout: 248 seconds]
<NotThatRPG>
qhong: Could you put a "watermark" reader macro in? One that doesn't serve any purpose in the readtable, but just serves as an identifier? Then you could tell if you are working with the readtable you care about or a copy thereof.
NotThatRPG is now known as NotThatRPG_away
masinter has joined #commonlisp
occ has quit [Ping timeout: 268 seconds]
beach` is now known as beach
occ has joined #commonlisp
neominimum is now known as dmho
waleee has quit [Ping timeout: 252 seconds]
dmho is now known as neominimum
neominimum is now known as dmho
akoana has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
shka has joined #commonlisp
kenran has joined #commonlisp
kenran has quit [Remote host closed the connection]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
igemnace has joined #commonlisp
masinter has quit [Ping timeout: 248 seconds]
Posterdati has joined #commonlisp
frgo has quit [Ping timeout: 268 seconds]
poselyqualityles has joined #commonlisp
pve has joined #commonlisp
Cymew has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 248 seconds]
lottaquestions has quit [Remote host closed the connection]
MajorBiscuit has joined #commonlisp
lottaquestions has joined #commonlisp
occ has quit [Ping timeout: 248 seconds]
LW has joined #commonlisp
occ has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
<pve>
pjb: So I gave it a shot with the chatgpt api, here's what I got so far :)
occ has quit [Read error: Connection reset by peer]
azimut has quit [Ping timeout: 255 seconds]
agm has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
Guest63 has joined #commonlisp
aartaka has joined #commonlisp
vn36 has joined #commonlisp
inline__ has quit [Remote host closed the connection]
Guest63 has quit [Quit: Ping timeout (120 seconds)]
aartaka has quit [Ping timeout: 255 seconds]
aartaka has joined #commonlisp
LW has quit [Ping timeout: 248 seconds]
Guest63 has joined #commonlisp
<pjb>
pve: yay! Great!
Guest63 has quit [Client Quit]
<pjb>
pve: that could be a slime contribution!
Guest63 has joined #commonlisp
agm has quit [Ping timeout: 246 seconds]
anddam has quit [Quit: WeeChat 3.8]
Inline has joined #commonlisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
Inline is now known as Guest967
Guest967 has quit [Max SendQ exceeded]
inline__ has joined #commonlisp
vn36 has quit [Quit: leaving]
ns12 has quit [Quit: Ping timeout (120 seconds)]
ns12 has joined #commonlisp
LW has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
Brucio-61 has quit [Ping timeout: 255 seconds]
<pve>
pjb: Thanks. Sure, I guess it could be a contribution.
inline__ has quit [Quit: Leaving]
semarie has quit [Quit: WeeChat 3.8]
Brucio-61 has joined #commonlisp
semarie has joined #commonlisp
Guest63 has quit [Ping timeout: 260 seconds]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
scymtym has joined #commonlisp
mrcom has quit [Quit: Leaving]
samedi has joined #commonlisp
rgherdt has joined #commonlisp
Guest63 has joined #commonlisp
occ has joined #commonlisp
Guest2913 has joined #commonlisp
Guest2913 has quit [Quit: Client closed]
Gnuxie_ has joined #commonlisp
Gnuxie_ has quit [Quit: Leaving]
Bike has quit [Ping timeout: 248 seconds]
agm has joined #commonlisp
Bike has joined #commonlisp
anddam has joined #commonlisp
Bike has quit [Ping timeout: 252 seconds]
anddam has quit [Client Quit]
neon has quit [Remote host closed the connection]
neon has joined #commonlisp
lxi has quit [Ping timeout: 248 seconds]
dlowe has joined #commonlisp
dlowe has quit [Remote host closed the connection]
mrcom has joined #commonlisp
lisp_student005 has joined #commonlisp
anddam has joined #commonlisp
ritchie101 has joined #commonlisp
lisp_student005 has quit [Quit: Client closed]
ritchie101 has quit [Remote host closed the connection]
karlosz has joined #commonlisp
kevingal has joined #commonlisp
masinter has joined #commonlisp
Cymew has quit [Ping timeout: 246 seconds]
agm has quit [Ping timeout: 252 seconds]
agm has joined #commonlisp
agm has left #commonlisp [#commonlisp]
random-nick has joined #commonlisp
Bike has joined #commonlisp
Guest63 has quit [Quit: Client closed]
NotThatRPG_away has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Ping timeout: 252 seconds]
karlosz has quit [Quit: karlosz]
Everything has joined #commonlisp
bjorkintosh has quit [Quit: Leaving]
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
NotThatRPG has joined #commonlisp
<NotThatRPG>
Bike: Hope you don't mind me bothering you again: I did as you suggested. I found the place where these uninterned symbols were created, and recorded them in a weak hash table. There were 66 million.
<Bike>
yeah, you mentioned. too bad search-roots is seemingly busted
<NotThatRPG>
I think that was my bad: I reinvoked it using :gc t and this time it didn't crash.
tyson2 has joined #commonlisp
<NotThatRPG>
But... when I did that w/o :criterion, search-roots found the weak hash table as the root. The second time, with :criterion :static it printed this: "Path to #:?_MPS3965650254: from "main thread" *** (TLS)" Not sure how this is to be interpreted.
* NotThatRPG
goes to look at the source
<NotThatRPG>
I fear that may mean that by examining this value I inadvertently created a new path to the symbol!
<NotThatRPG>
(examining in repl, I mean)
<Bike>
the weak hash table as the root...
<scymtym>
NotThatRPG: do you bind or declare special variables named by those symbols?
<NotThatRPG>
scymtym: No. They are logical variables (as in Prolog), not CL variables
<Bike>
i tried sticking a weak pointer's value in a weak hash table and gc properly axed it
<scymtym>
NotThatRPG: i see. i was asking because i saw "TLS" (thread local storage) in the report. but now i realize that the path was through the *** special variable ("*** (TLS)"), not a special variable you created
<NotThatRPG>
scymtym: They are ephemeral -- as part of unifying an s-expression with a rule, the rule must be standardized. The standardization process involves making a copy of the rule with all the original variables replaced with new variables because unification should not have side effects.
<NotThatRPG>
I re-ran, using a different symbol and making sure I didn't get it printed to the REPL. Now I get a variable name (which I can track down)
jeosol has joined #commonlisp
<NotThatRPG>
or ... which I *can't* track down! It's an earmuff variable that I can't find in my source code. Anyway, this gives me a start.
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
<scymtym>
NotThatRPG: make sure to use (sb-ext:search-roots … :print :verbose) for a much more readable path
<NotThatRPG>
Thanks. I will post the results as a paste, because it's still a little mysterious to me
igemnace has quit [Remote host closed the connection]
<ixelp>
Output from sb-ext:show-roots - Pastebin.com
chipxxx has joined #commonlisp
<Bike>
i am again not familiar with this thing, but i think you're seeing a path
samedi has quit [Remote host closed the connection]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bike>
like, the path goes package -> package-hashtable -> vector (the hash table's) -> the symbol *UNINTERNED* -> a cons
samedi has joined #commonlisp
<Bike>
the package-hashtable is the hash table internal to the package that records all its symbols, i imagine
NotThatRPG has joined #commonlisp
<Bike>
so what is *uninterned* oh your commection died
neon has quit [Ping timeout: 260 seconds]
<NotThatRPG>
Bike: Sorry -- just a glitch
<NotThatRPG>
I was misinterpreting, thinking it was multiple roots instead of a single path.
<NotThatRPG>
So that's a mess -- I made a list of the first 10 values from the hash table of uninterned symbols and that created the path. So this is a Heisenpath. I will retry, being more careful.
<scymtym>
NotThatRPG: if you stash away the symbols for later root searching, wrap the stashed object in SB-EXT:MAKE-WEAK-POINTER
<NotThatRPG>
scymtym: Yes, I did that. All of this is obvious, but having not done this before, I am learning as I go.
<scymtym>
NotThatRPG: i see, sorry. the SHOP::*UNINTERNED* list looked like it had this exact problem
<NotThatRPG>
Yes, indeed it did!
<NotThatRPG>
But since there are 66 million of these there's no problem finding another to examine!
<scymtym>
the number in the square brackets, like [ 232] is the "offset" within the object at the point in the path, i think
LW has quit [Quit: WeeChat 3.6]
LW has joined #commonlisp
chipxxx has quit [Quit: Leaving]
<NotThatRPG>
oh! I thought it was a gc generation.
chipxxx has joined #commonlisp
chipxxx has quit [Remote host closed the connection]
chipxxx has joined #commonlisp
<NotThatRPG>
It seems like hash tables come with simple-vectors alongside. I assume this is the internal storage for the hash table, right?
<scymtym>
yes. or least the gc sees the hash table that way
azimut has joined #commonlisp
<NotThatRPG>
Argh. I get a very helpful path printed from source-roots with :print :verbose. But when I invoke with :print nil to collect the path and investigate it, source-roots returns NIL.
tyson2 has quit [Remote host closed the connection]
Everything has quit [Quit: leaving]
kevingal has quit [Ping timeout: 248 seconds]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
zxcvz has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyson2 has joined #commonlisp
NotThatRPG has joined #commonlisp
cage has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 248 seconds]
<NotThatRPG>
Bike and scymtym : thank you so, so much for all of your help (and patience!) I was able to find and plug a very substantial memory leak!
<scymtym>
NotThatRPG: sure. great that you found it
kevingal has joined #commonlisp
<NotThatRPG>
I can safely say that I would never have found this without your help.
<NotThatRPG>
(both of you)
<Bike>
glad you figured it out
Inline has joined #commonlisp
amoroso has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #commonlisp
NotThatRPG has joined #commonlisp
morganw has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]