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 [Ping timeout: 264 seconds]
casaca has joined #picolisp
rob_w has joined #picolisp
casaca has quit [Remote host closed the connection]
casaca has joined #picolisp
orivej has joined #picolisp
<beneroth> aw-, I guess you do follow Jepsen? They just did a test on redis (on development builds, on request of redis): https://jepsen.io/analyses/redis-raft-1b3fbf6
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
<aw-> beneroth: seems to target Redis raft, which i've never heard of
orivej has quit [Quit: No Ping reply in 180 seconds.]
<beneroth> yeah seems a new thing.. but I'm a bit confused what it is.
<beneroth> the main point to take away is (once again, often the case with distributed databases): ACID is claimed, but not guaranteed for most configurations
orivej has joined #picolisp
<beneroth> there are certainly use cases where high write-availability is required, and usually in such cases one doesn't need ACID, some missed records are not a problem for every usage (e.g. log/tracking analytics)
<aw-> oh they tried to implement replication in Redis and it fails?
<beneroth> raft = algorithm to coordinate distributed nodes of a distributed database which attempts to looks like a single-node database for users
<beneroth> Redis didn't had replication yet?
<aw-> i dont know
<beneroth> if so, then yes that seems to be their try to become distributed
<aw-> ok
<beneroth> ah it has traditional master-replica replication
<beneroth> so same as pilDB and mainstream SQL's
<beneroth> so this redis-raft is the attempt to turn it into a multi-master system
<beneroth> or at least to re-elect a new master automatically if the current one goes down (that is the main usage of the raft algorithm everywhere)
<aw-> yeah... multi-master is a pipe dream
<beneroth> T
<beneroth> too much accidental complexity
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
casaca has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
casaca has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
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
<tankf33der> hi all
<tankf33der> Regenaxer: news, now i can crash both test-sha256 and test-sha512 without calling sha256 and sha512 functions.
<Regenaxer> Hi tankf33der
<Regenaxer> ok
<Regenaxer> I looked at for and chop yesterday, but can't see any fault
<tankf33der> for ?
<Regenaxer> yes, _for showed up in the gdb backtrace
<tankf33der> test-sha256 crashing this way:
<tankf33der> http://ix.io/2q2u
<Regenaxer> again _for -> _chop
<Regenaxer> But it can also be something *before* that
<tankf33der> yea
<Regenaxer> The register contents are not availatle in the dump?
<tankf33der> searching how to do it
<Regenaxer> great, not sure if it helps
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<tankf33der> http://ix.io/2q2v
<tankf33der> Regenaxer: backtrace full
<tankf33der> info registers
<Regenaxer> great!
<Regenaxer> But not the faulty instruction
<Regenaxer> to see which register it tries to access
<Regenaxer> i.e. the pointer into memory
<tankf33der> warning: Unexpected size of section `.reg-xstate/3424' in core file.
<tankf33der> #0 mark () at picolisp.s:33365
<tankf33der> (gdb) bt
<tankf33der> #0 mark () at picolisp.s:33365
<tankf33der> 33365movq8(%rsi), %rdx
<Regenaxer> ok, %rsi
<Regenaxer> it is 48, which is ASCII 0
<Regenaxer> i.e. not a pointer
<Regenaxer> hmm, no idea
<Regenaxer> The "0" is probably some chopped number
<Regenaxer> So gc finds in memory some character data where it expects a pointer
<Regenaxer> Messed up
<Regenaxer> movq 8(%rsi), %rdx means to store in the CDR of that cell
<Regenaxer> rdx is zero
<Regenaxer> not a legal CDR anyway
<Regenaxer> give up ;)
<tankf33der> http://ix.io/2q2B
<tankf33der> huge progress
<tankf33der> it even reading broken data from file.
<Regenaxer> Two lists of numbers?
<tankf33der> yeap
<tankf33der> and it started reading this NIL hole inside from first lines!
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
<tankf33der> no, wrong
<tankf33der> not read
<tankf33der> but constructed by conc(hexl, hexl, hexl)
<tankf33der> and second hexl returns NIL
<Regenaxer> ok
<tankf33der> and hexl is for-chop
<tankf33der> (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1) (58 98 29 161 18 94 212 170 24 110 220 158 38 240 229 86 5 4 206 139 199 195 9 175 229 211 0 46 56 179 56 181 NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL 10 203 221 204 28 162 83 176 136 186 105 182 148 120 169 79 0)
<tankf33der> OK-test-SHA512
<tankf33der> :
<tankf33der> NILs and without crash!
<tankf33der> uh
<tankf33der> because gc did not touch it
<tankf33der> NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL 10
<tankf33der> and corrupted list is this one with always num as last item in it
<tankf33der> no, all above is wrong.
<tankf33der> give up for today.
<tankf33der> afk.
<Regenaxer> Do you think it is gc related?
<Regenaxer> hmm
<Regenaxer> ok
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
<beneroth> Regenaxer, maybe you could test it by temporarily replacing gc implementation with one which does not do any gc'ing, just adding more memory. if it still crashes, then it's not the gc I would say...
<beneroth> could be it the parser/load ?
<Regenaxer> This we did initially
<beneroth> oh
<Regenaxer> or we do always
<beneroth> okay :)
<Regenaxer> Just start with (gc 400) and it works :)
<beneroth> maybe two errors, one in gc one happening before, canceling each other?
<beneroth> hm
<Regenaxer> could be
<beneroth> heisenterritory
<Regenaxer> T
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> crash in repl of pil21
<tankf33der> http://ix.io/2q38
<Regenaxer> Open paren, then ^C ?
<Regenaxer> no crash here
<Regenaxer> Hmm, "free(): double free" is legal
<Regenaxer> no,
<Regenaxer> legal if NULL
<Regenaxer> Ah, on x84 I see the same
<Regenaxer> on arm (Termux) nothing happens
orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
<Regenaxer> Perhaps I should change the behavior anyway
<Regenaxer> On top level ^C should do the same as ^D
<Regenaxer> hmm, difficult
<Regenaxer> ^D is in readline
<Regenaxer> Then just do nothing on top level ^C
<tankf33der> (map (
<tankf33der> the same.
<Regenaxer> ?
<tankf33der> if press entet and double ctrl-c
<Regenaxer> Yes, why should it be different?
<Regenaxer> it is just in the reader, map does not care, can be foobar
<tankf33der> ok
<tankf33der> what is easy way generate garbage in heap?
<Regenaxer> With 'adr' and 'byte' perhaps
orivej has quit [Ping timeout: 258 seconds]
<tankf33der> ok
orivej has joined #picolisp
<tankf33der> now i can insert debug print i want and insert bytes to heap I need to crash
<tankf33der> double win.
<Regenaxer> Later, in phone conf
<tankf33der> so println costs two bytes :)
<tankf33der> so one println costs two bytes :)
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
libertas has quit [Quit: ZNC - https://znc.in]
libertas has joined #picolisp
<tankf33der> minimal code ever
<tankf33der> http://ix.io/2q3S
<tankf33der> the same backtrace
<Regenaxer> Still on phone
<tankf33der> np
<tankf33der> afk.
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
<Regenaxer> done
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
<Regenaxer> tried hex2L, but did not crash
<Regenaxer> In any case, candidates are 'make', 'for', 'chop', 'link' and 'pack'. Perhaps also 'need'.
<tankf33der> on both archs?
<Regenaxer> Not yet, only on Termux
<tankf33der> you should try x64
<Regenaxer> No problem, I search the source code
<Regenaxer> Just found something
<Regenaxer> in 'pack'
<Regenaxer> ah, no
<Regenaxer> correct
<Regenaxer> I can try, but if it crashes I don't know more
<Regenaxer> It must be one of the aaove functions
<Regenaxer> above
<Regenaxer> Well, plus 'hex'
<Regenaxer> But as the backtrace is always for -> chop, these two are the hottest candidates
<beneroth> I'm sure you two will find it soon
<beneroth> no worries :-)
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
<Regenaxer> Sure! :)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
<Regenaxer> Ha! Suspicion about '_for'
<Regenaxer> ... after listening some podcasts and a few beers
<Regenaxer> released
<Regenaxer> nuff
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<tankf33der> fixed? no more crash?
<Regenaxer> hehe, no guarantee :)
<beneroth> congratulations!
<Regenaxer> I hope I'm not wrong
<Regenaxer> It is a special situation, only in 'for'
<Regenaxer> It was (in 2 places):
<Regenaxer> (? (=0 (& (setq R (loop1 X)) 1)))
<Regenaxer> (safe R)
<Regenaxer> But must be:
<Regenaxer> (? (=0 (& (setq R (loop1 X)) 1)))
<Regenaxer> (safe (setq R (& R -2)))
<beneroth> ah wow
<Regenaxer> i.e. bit one must be cleared before stored on the stack
<beneroth> off by 2
<beneroth> ah
<beneroth> right
<Regenaxer> by one
<beneroth> AND
<Regenaxer> T
<Regenaxer> FFFFFFFFFFFE
<Regenaxer> (well, more F's)
<Regenaxer> 'for' is special, cause it is the only case where bit0 is used as a secondary return value (from 'loop1') which must be cleared eventually as it is not a legal vm pattern
orivej has quit [Ping timeout: 240 seconds]
<Regenaxer> Thus, as this is a very special case, there is hope that the rest of pil21 is OK
orivej has joined #picolisp
<beneroth> ah I see
<tankf33der> i will play
<beneroth> thanks testf33der :)
<beneroth> PicoLisp General of Testing
<Regenaxer> yes, it is all tankf33der's credit
<Regenaxer> He boiled down the test
<tankf33der> old tests ok
<tankf33der> but the same crash
<tankf33der> did you run on x64 ?
<tankf33der> with and without patch ?
<Regenaxer> oh :)
<Regenaxer> Not yet on x86
<Regenaxer> hmm, so this was not the reason?
<tankf33der> i think so
<tankf33der> backtrace the same.
<Regenaxer> :(
<beneroth> well one bug fixed, at least
<beneroth> thanks for your testing tankf33der, you are critical :-)
<Regenaxer> beneroth, right
<Regenaxer> I think more tomorrow
<Regenaxer> In the evening too tired
<tankf33der> afk.
<beneroth> thanks to you too, Regenaxer. amazing what you can do and all put into one day
<tankf33der> see you
<beneroth> see you
<Regenaxer> night all!
<beneroth> good night Regenaxer :)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej_ has quit [Ping timeout: 265 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: 256 seconds]
orivej has joined #picolisp