ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
<Regenaxer> hex2L does not crash here, neither Termux/arm nor Debian/x86
<tankf33der> this code crash
<tankf33der> did you run all file ?
<Regenaxer> yes, I believe you
<Regenaxer> only hex2L
<tankf33der> come on
<tankf33der> run all
<Regenaxer> Why?
<Regenaxer> What do I know when it crashes?
<Regenaxer> This one crashes on at least one of your systems, right? : http://ix.io/2q3S
<Regenaxer> So we know at least one of these functions is faulty
<Regenaxer> Making it crash again does not help
<Regenaxer> What I can do is simplifying it more to see if it crashes then
<Regenaxer> thus reducing the candidates
<Regenaxer> or I modify src/gc.l to force more collections
<Regenaxer> OK, this I'll do now
<tankf33der> and me diff for gc.l
<tankf33der> and show me diff for gc.l
<Regenaxer> yeah
<Regenaxer> hex2L still passes
<Regenaxer> gc.l
<Regenaxer> 276c276
<Regenaxer> < (unless P
<Regenaxer> > (when (val $Jam)
<Regenaxer> 316c316
<Regenaxer> < (unless P
<Regenaxer> ---
<Regenaxer> ---
<Regenaxer> > (when (val $Jam)
<Regenaxer>
<Regenaxer> main.l
<Regenaxer> 1312a1313
<Regenaxer> > (set $Jam YES)
<Regenaxer> oops
<Regenaxer> In gc.l only cons and consSym
<Regenaxer> I put more $Jam's
<Regenaxer> It gets awfully slow, but no crash
<Regenaxer> Really strange, in the past (when writing pil64) this kind of test always immediately detected gc problems
<Regenaxer> Cause it forces a collection at each operation, thus eliminating the heisenbug situation
<Regenaxer> http://ix.io/2q73
elioat has quit [Remote host closed the connection]
<Regenaxer> In any case, the fix yesterday for 'for' was correct and necessary
<Regenaxer> Was just not the reason for the crash it seems
rob_w has joined #picolisp
<tankf33der> i cant repeat crash from work, it is void linux, llvm10
<tankf33der> it was crash in home on archlinux (manjaro), llvm10
<tankf33der> booting archlinux on work
<Regenaxer> tough
<Regenaxer> If it does not crash with the gc.l changes1 I think it is probably not a gc~heisenbug
<tankf33der> alpine linux - crash
<tankf33der> archlinux - crash
<tankf33der> void linux - ok
<tankf33der> all llvm10
<Regenaxer> gc~heisenbug means gc runs at random time and crashes
<Regenaxer> Now gc runs *always*, so it must always crash
<tankf33der> centos8, llvm7 - ok
<Regenaxer> Not ok, cause something is wrong ;)
<Regenaxer> Can you reduce hex2L more?
<tankf33der> :)
<tankf33der> run under modified gc.l ?
<Regenaxer> yes
<tankf33der> i will try asap.
<Regenaxer> Makes crash a lot more probable
<Regenaxer> (if it is indeed a gc issue)
<Regenaxer> I mean, we know it crashes inside gc, but the reason may not be an unsaved item in some function, but another reason (heap layout etc.)
<tankf33der> now it crashed on void linux with gc modified.
<Regenaxer> Good! So now reduce the number of functions
<tankf33der> ha, this is not hex2L
<tankf33der> http://ix.io/2q7e
<tankf33der> crashes with modified gc
<tankf33der> with gc modified i found a lot of crashes in pil21-tests repo code
<Regenaxer> great
<tankf33der> http://ix.io/2q7h
<tankf33der> crash with modified gc
<tankf33der> again setq and 1024
<Regenaxer> wow
<Regenaxer> only 'for' is left
<Regenaxer> *really* strange
<Regenaxer> No crash here (9.0.1 on Termux and Debian)
<Regenaxer> With 'cons' etc. modified
<Regenaxer> I wonder why any consing is called at all
<Regenaxer> Only arithmetics with shorts
<Regenaxer> Does it really crash *while* running this code?
<Regenaxer> Or before or after?
<Regenaxer> I think the for loop itself does no consing and thus can't trigger gc
<Regenaxer> hmm, no
<Regenaxer> N1 gets big
<Regenaxer> So the problem is in bignum arithmetics!
<Regenaxer> But why only llvm 10?
<tankf33der> http://ix.io/2q7o
<tankf33der> more simpler
<tankf33der> last print is:
<tankf33der> N 953
<Regenaxer> but N1 gets big
<tankf33der> i am running modified gc only on voidlinux on llvm10
<tankf33der> running on all machines is harder.
<tankf33der> this is not llvm10 issue.
<Regenaxer> No crash here
<tankf33der> x64 ?
<Regenaxer> yes
<Regenaxer> and arm
<tankf33der> i dont remember your llvm version
<Regenaxer> 9.0.1
<Regenaxer> on both
<tankf33der> let me modify gc on centos
<Regenaxer> ok
<Regenaxer> Now only bignums can be the reason, but hex2L had no bignums
<Regenaxer> Makes no sense
<Regenaxer> Then it must be a more general problem
<tankf33der> http://ix.io/2q7e
<Regenaxer> OR stil 'for'
<tankf33der> did you miss this code ?
<tankf33der> no bignum
<Regenaxer> T
<tankf33der> both crashed on centos8, llvm7
<tankf33der> with modified gc.
<Regenaxer> So the *only* common factor is 'for'
<Regenaxer> But (for N <cnt> ...) is the simplest case of 'for'
<Regenaxer> What if you use 'while' instead of 'for'?
<tankf33der> no crash
<Regenaxer> wow
<Regenaxer> Sure that with 'while' it never crashes?
<Regenaxer> Unbalanced parenthesis in http://ix.io/2q7e
<Regenaxer> So it crashed before this was detected?
<tankf33der> i will try in hour
<Regenaxer> ok
aw- has quit [Remote host closed the connection]
aw- has joined #picolisp
<tankf33der> http://ix.io/2q7D
<tankf33der> while-need - crash
<tankf33der> backtrace -
<tankf33der> http://ix.io/2q7E
<aw-> tankf33der: great work helping Regenaxer to test pil21, it's really admirable
<tankf33der> :)
<Regenaxer> Great, that rules out 'for' too
<Regenaxer> So it is a general problem, not related to a specific function
<Regenaxer> I hope I don't need to rewrite *everything*
libertas has quit [Ping timeout: 260 seconds]
<Regenaxer> Now in 'cons', not inside 'gc'
<Regenaxer> Do you have the asm instruction?
<tankf33der> #0 cons () at picolisp.s:33923
<tankf33der> 33923 movq (%rax), %rcx
<Regenaxer> thx
<Regenaxer> Null pointer
libertas has joined #picolisp
orivej has joined #picolisp
<Regenaxer> Can't reproduce a crash with all variants
<Regenaxer> Perhaps it really depends on the llvm version?
<tankf33der> i dont think so
<tankf33der> already repeated on llvm7
<tankf33der> today
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
<beneroth> Regenaxer, nothing to worry or do about, but I just found out that (rel foo (+IdxFold +Ref +String)) (notice the +Ref, which is wrong/should not be there) leads to immediate segfault (during the +index construction)
<beneroth> pil64
<beneroth> dunno if this is acceptable or if I should investigate and maybe we can adapt some T message to give an error instead of ugly segfault
<beneroth> I guess somehow a symbol which is not a func gets executed somehow
<Regenaxer> Thanks beneroth!
<Regenaxer> Perhaps you can look with 'traceAll' to see where it fails
<beneroth> ok will investigate
<beneroth> later today
<beneroth> must be in +index construction
<Regenaxer> As you say, nothing to worry about ;)
<beneroth> T
<beneroth> just cost me some time now, I was so happy to having finished import parsing and db schema, and then it just.. segfaults xD
<Regenaxer> yes, the +IdxFold calls the +Ref indexing several times
<beneroth> yeah question is which T message causes the segfault :)
<beneroth> it's an invalid combination, but immediate segfault is a bit harsh :)
<Regenaxer> Ah, still in T ?
<beneroth> I believe so
<Regenaxer> so not yet indexing
<Regenaxer> ok
<Regenaxer> no worry
<beneroth> yes, just loading of the schema definition
<beneroth> no data operation
orivej_ has quit [Ping timeout: 256 seconds]
<tankf33der> (loop
<tankf33der> (let L (list 1))
<tankf33der> )
<tankf33der> this is smallest thing i can create which crash on modified gc.
<tankf33der> crash on ~54K iteration.
elioat has joined #picolisp
<beneroth> maybe its the memory allocation
<tankf33der> or races between gc and stack operations.
<tankf33der> or heap corruption while racing between gc and stack.
<beneroth> that sounds very mean
<Regenaxer> yeah
<Regenaxer> Memory allocation does not happen in the above loop
<Regenaxer> Just adding and removing stack structures (binding 'L' in this case)
<Regenaxer> Unfortunatel none of the cases crash here
<Regenaxer> I take a closer inspection of 'gc' itself latea
<Regenaxer> later
<tankf33der> ok
orivej has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> found more small code to crash with modified gc.
<tankf33der> smallest.
<tankf33der> (need 100000 1)
<tankf33der> or
<tankf33der> (range 1 100000)
<Regenaxer> You are fantastic!
<Regenaxer> However, both don't crash here :(
<tankf33der> even on x64?
<tankf33der> it was debian, right
<tankf33der> ?
<tankf33der> http://ix.io/2q9F
orivej has quit [Quit: No Ping reply in 180 seconds.]
<tankf33der> backtrace
orivej has joined #picolisp
<tankf33der> afk.
<Regenaxer> Yes, debian/x86
<tankf33der> x86 or x64
<tankf33der> uname -a
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> i never sucsessfully compiled pil21 on x86 or sparc, only x64
<Regenaxer> well, to be exact, it is x86_64
<Regenaxer> or x86-64
<Regenaxer> all descendants from Intel 8086
<Regenaxer> then 80186 (embedded only iirc), 80286, 80386, 80486, then 80586 (Peitium)
<Regenaxer> *Pentium
<Regenaxer> thus the whole family is called x84
<tankf33der> this how debian feel it
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
<ym> Hi. Is there a documentation about Prolog-like part of PicoLisp?
<ym> Or brief introduction here https://software-lab.de/doc/ref.html#pilog is complete if I familiar with Prolog?
rob_w has quit [Quit: Leaving]
<tankf33der> ym: no documentation
<tankf33der> just code
<tankf33der> try search for pilog functions in this repo
<ym> Ok, thank you.
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #picolisp