nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje is now known as Guest20731
tbodt has joined #pypy
amaury has quit [Ping timeout: 240 seconds]
Demeisen has quit [Quit: leaving]
Demeisen has joined #pypy
pilne has quit [Quit: Quitting!]
tilgovi has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
commandoline has joined #pypy
ArneBab_ has joined #pypy
ArneBab has quit [Ping timeout: 245 seconds]
<kenaan> rlamy py3.5 dc9dca0f58fb /pypy/module/cpyext/test/test_version.py: Work around issue #2560
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
<kenaan> rlamy py3.5 e3545a45e827 /pypy/module/cpyext/include/patchlevel.h: Fix PY_VERSION inconsistency
jcea1 has joined #pypy
jcea has quit [Read error: Connection reset by peer]
jcea1 is now known as jcea
inad922 has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
tilgovi has quit [Ping timeout: 246 seconds]
inad922 has quit [Ping timeout: 240 seconds]
tilgovi has joined #pypy
tilgovi has quit [Ping timeout: 240 seconds]
jamadden has quit [Quit: Leaving.]
tilgovi has joined #pypy
<njs> anyone know why getsockopt(tsocket.IPPROTO_TCP, tsocket.TCP_NODELAY) on pypy3 nightlies would return b""? (it should be 1 or 0)
<njs> err, s/tsocket/socket/
tilgovi has quit [Ping timeout: 240 seconds]
mattip has joined #pypy
<mattip> ronan: there is a test failure on own tests, in test_strbufobject.py::AppTestStringObject::()::test_buffer
<njs> ahhhh it's because pypy doesn't know that passing buffersize=0 to getsockopt is supposed to be a special case that's equivalent to not passing buffersize at all
tilgovi has joined #pypy
<mattip> ronan: it "grew" sometime in PyBuffer-backport, and is because W_StringBufferObject blindly takes the typedef of W_BytesObject,
<mattip> where W_BytesObject's __buffer__ is specific to that class, not from W_AbstractBytesObject
<mattip> well, at least that is the first problem :)
realitix has joined #pypy
tilgovi has quit [Ping timeout: 272 seconds]
<mattip> looking at numpy remaining failures, there is a strange one where x.__int__() calls a different c-function than int(x)
<mattip> x = np.clongdouble(np.inf); x.__int__(); int(x)
<mattip> the first calls clongdouble_int() which does not raise a warning, the second calls clongdoubletype_int() which raises a warning
<mattip> the problem occurs when, after calling PyType_Ready, numpy reassigns the tp_as_number functions
<mattip> in add_scalarmath
mattip has left #pypy ["bye"]
tilgovi has joined #pypy
tilgovi has quit [Ping timeout: 246 seconds]
dmalcolm has quit [Ping timeout: 246 seconds]
dmalcolm has joined #pypy
amaury has joined #pypy
tilgovi has joined #pypy
commandoline has quit [Quit: Bye!]
commandoline has joined #pypy
oberstet has joined #pypy
mihaid has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
amaury has quit [Quit: Konversation terminated!]
cstratak has joined #pypy
marr has joined #pypy
mattip has joined #pypy
<mattip> the difference is in the lookup, the first case explicity calls __getattr__('__int__'), where the second doesn't
<mattip> s/explicitly/makes a call to/
antocuni has joined #pypy
lritter has joined #pypy
lritter has quit [Read error: Connection reset by peer]
girish946 has joined #pypy
lritter has joined #pypy
tilgovi has quit [Remote host closed the connection]
arigato has joined #pypy
commandoline has quit [Quit: Bye!]
commandoline has joined #pypy
<realitix> Hello arigato, congratulation for europython !
<danchr> arigato: you could use the original name of the OS — Mac OS X — which has the nice advantage of being both old school and unambiguous ;)
<arigato> danchr: yes, that's done
<arigato> realitix: thanks!
<kenaan> antocuni faster-rstruct-2 acd0aa896e2d /rpython/rlib/rstruct/nativefmttable.py: rpython fix for 32 bit
commandoline has quit [Quit: Bye!]
commandoline has joined #pypy
girish946 has quit [Ping timeout: 240 seconds]
<kenaan> antocuni faster-rstruct-2 1a6ceca7adce /pypy/module/pypyjit/test_pypy_c/test_struct.py: fix the expected JIT ops after the recent W_BytearrayObject changes
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5946 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4623 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/3955 [antocuni: force build, faster-rstruct-2]
antocuni has quit [Ping timeout: 240 seconds]
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
vkirilichev has joined #pypy
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
mat^2 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
jacob22_ has quit [Quit: Konversation terminated!]
jamadden has joined #pypy
Tiberium has joined #pypy
palecsan has joined #pypy
<palecsan> Hello, I have a question regarding the Multiprocessing issue (https://bitbucket.org/pypy/pypy/issues/1538). Do you have any clues how can I investigate the usage of locks and semaphores in PyPy? I am curios why it hangs for random periods of time in sem_wait() system call, inside RPyThreadAcquireLockTimed() function. I tried the same code in my own
<palecsan> C application and no freeze happens, even for a very large number of concurrent threads
<arigato> well, then you have to figure out what the difference is
<arigato> thanks for helping with this old issue, btw
<palecsan> you are welcome! I was wondering if there is any other place I should be paying attention, or something particular that is implemented in PyPy
<arigato> the GIL is done in a different way than CPython
<arigato> but that's also as C files, in thread_gil.c
<arigato> and I think it should not matter for multiprocessing in the default, multiple-processes mode, because it doesn't start threads, I think
<arigato> (I may be wrong)
<palecsan> In multiprocessing, besides the processes that are forked, you have 3 threads
<arigato> ah, ok
<palecsan> one for monitoring the processes, one for task sending and one for result retrieval
<arigato> so the way the GIL works is by a combination of a semaphore and polling
<palecsan> and an interesting observation is that if I switch from "import multiprocessing" to "import multiprocessing.dummy as multiprocessing" and use the pure thread version of this, everything works flawless
<palecsan> with multiprocessing.dummy it's even faster than CPython
<arigato> so what's the CPU usage?
<arigato> does it seem that the CPU is mostly idle (when it should not be)?
<palecsan> with my script it does not stress the CPU, it's a rather small workload, with a single process
<palecsan> it's just enough for me to see that from time to time it freezes
<arigato> well, the issue is that something is slow
<arigato> so the question is, is it slow (or freezing) while burning CPU time, or it is slow/freezing while being idle
<palecsan> it is freezing and the CPU is idle in those small periods
<arigato> then it might be the GIL
<palecsan> it just waits for a lock somewhere
<arigato> and the sem_wait eventually returns because of a timeout, right?
<palecsan> it's sem_wait, not sem_timedwait
<arigato> ah
<arigato> but how do the idle periods of time end?
<arigato> (if you can easily know it)
<palecsan> that's a good question! I tried with many tools (like perf, DRD, Helgrind) and none is really helpfull
<palecsan> the only tool that somehow said there is a possible data race condition is Helgrind
<palecsan> but don't know how (or if there is a tool for this) to see how the sem_wait time ends
<arigato> if I'm right in suspecting the GIL implementation, it's a call to pthread_cond_timedwait() in thread_pthread.c
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4623 [antocuni: force build, faster-rstruct-2]
<arigato> but would that internally call sem_wait? or sem_wait_timeout?
girishj has joined #pypy
<arigato> you can try to edit thread_pthread.c:mutex2_lock_timeout() to sleep for "delay * 100" instead of "delay",
<arigato> and see if it makes the issue1538 example suddenly 100 times slower
<palecsan> thanks! will try it and come back with the update
<palecsan> also I'll take a look at the GIL implementation and pthread_cond_timedwait
<palecsan> to see what calls it does
girish946 has quit [Ping timeout: 240 seconds]
girishj has quit [Client Quit]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5946 [antocuni: force build, faster-rstruct-2]
cwillu_at_work has quit [Ping timeout: 260 seconds]
cwillu_at_work has joined #pypy
antocuni has joined #pypy
amaury has joined #pypy
palecsan has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
james has joined #pypy
james is now known as Guest38760
<cfbolz> antocuni: are you ok with killing the fastpath in ctypes, given that it produces bugs to have it?
<cfbolz> ahm sorry
<cfbolz> didn't see that you just commented ;-)
jacob22_ has joined #pypy
<antocuni> cfbolz: sure :)
<cfbolz> cool, so I'll merge
<cfbolz> (mihai just fixed your complaints)
* antocuni looking
Guest38760 has quit [Remote host closed the connection]
<cfbolz> off-topic: this is pretty cool: telnet mapscii.me
<antocuni> cfbolz: ok please merge :)
<kenaan> Dodan pypy_ctypes_nosegfault_nofastpath 96435a57d046 /: fixed ctypes segfault by removing fastpath. Test in test_segfault.py
<kenaan> Dodan pypy_ctypes_nosegfault_nofastpath a0c92b42599a /pypy/module/test_lib_pypy/ctypes_tests/test_segfault.py: Test_segfault.py now throws ctypes.ArgumentError
<kenaan> Dodan pypy_ctypes_nosegfault_nofastpath 5823134aebb6 /pypy/module/test_lib_pypy/ctypes_tests/: Removed test_segfault.py. The test was in test_functions.py in test_argument_conversion_a...
<kenaan> cfbolz default 8b4ebb4d87c8 /: Merged in Dodan/pypy_ctypes/pypy_ctypes_nosegfault_nofastpath (pull request #547) fixed ctypes segfault by removi...
james has joined #pypy
james is now known as Guest81763
Guest81763 has quit [Remote host closed the connection]
yuyichao_ has quit [Ping timeout: 272 seconds]
<realitix> Is pypy taking advantage of mypy notation instead of guessing types when available ?
<LarstiQ> no
<dash> realitix: pypy doesn't have to guess, it knows :)
<realitix> ^^ !
marr has quit [Read error: Connection reset by peer]
<kenaan> antocuni faster-rstruct-2 ca5fc3f48609 /rpython/translator/c/test/test_llop.py: bah, the two tests shared the same cache, which means that they worked if invoked separately but broke ...
inad922 has joined #pypy
arigato has quit [Quit: Leaving]
marky1991 has joined #pypy
vkirilic_ has joined #pypy
vkirilichev has quit [Ping timeout: 260 seconds]
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<cfbolz> arigato (for the logs): this is Microsoft Research's time travel debugger for javascript: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/GrayBoxTTD.pdf
yuyichao_ has joined #pypy
pilne has joined #pypy
* LarstiQ feels obliged to mention http://debug.elm-lang.org/
realitix has quit [Quit: Leaving]
pilne has quit [Client Quit]
<cfbolz> LarstiQ: yep, but in a sense that is a much easier language to target
<LarstiQ> yeah, bit cheating
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/3955 [antocuni: force build, faster-rstruct-2]
<fijal> cfbolz: have you seen LogRocket?
<cfbolz> fijal: nope?
<fijal> their marketing material claims you can reproduce a debugging session from a log
<fijal> I'm not sure how well it works
<cfbolz> I'd like to see the paper ;-)
<fijal> it's a product
<fijal> so in a sense it's better than a paper cause you can actually try it ;-)
<cfbolz> fijal: so is the microsoft js time travel debugger ;-)
<dash> fijal: that's great but will it work in _theory_? :-)
arigato has joined #pypy
arigato has quit [Ping timeout: 260 seconds]
oberstet has quit [Ping timeout: 268 seconds]
vkirilic_ has quit [Remote host closed the connection]
<antocuni> uhm, my branch fails with an RPython AssertionError inside pyjitpl.py:_opimpl_getfield_gc_any_pureornot, but only on 32 bit :(
<cfbolz> ugh
<cfbolz> antocuni: those are all heapcache.py asserts
<antocuni> cfbolz: yes, I think it's this one: assert ConstFloat(resvalue).same_constant(upd.currfieldbox.constbox())
<cfbolz> antocuni: which test fails?
<antocuni> almost every lib-python test fail sooner or later
<antocuni> well, maybe not "every", but lots of them
<cfbolz> did you change stuff in the JIT? or do they all use structs
kipras`away is now known as kipras
<antocuni> I added support for llop.gc_store_indexed a bit everywhere, but it's an operations which was already supported by the backends
<cfbolz> ok, but is it treated like a getfield by the frontend?
<antocuni> I added support for it to the codewriter, blackhole etc, and it's an llop which is used only by rstruct
<antocuni> uhm, good point, let me check
<antocuni> nope, it doesn't seems so
<antocuni> ah and also what I addes is a STORE, not a LOAD (which was already there)
* antocuni tries with lldebug
<cfbolz> antocuni: is it possible to use gc_store_indexed to access a field that is later read by a regular getfield?
<antocuni> I suppose that in theory it might be possible if you pass the right offset to it, but in practice it is used only to read from arrays
<cfbolz> anyway, that's what the bug looks like: somebody is changing an object with an operation that the heapcache doesn't know about
<antocuni> or maybe there is some precision loss somewhere (since we are talking about floats)?
<antocuni> uhm, I suppose that I could run own tests on linux32 in the meantime
<antocuni> maybe they catches something
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-32/builds/5193 [antocuni: force build, faster-rstruct-2]
jcea has quit [Quit: jcea]
amaury has quit [Ping timeout: 240 seconds]
jcea has joined #pypy
<cfbolz> antocuni: do I see it correctly that so far the frontend never produced this op?
<antocuni> gc_store_indexed you mean?
<cfbolz> yes
<antocuni> yes, I think that before my branch, it was produced only by jit.backend.llsupport.rewrite
marr has joined #pypy
<cfbolz> right. so there are basically a few places that need to be taught about this new op
<cfbolz> antocuni: eg writeanalyze.py
mat^2 has quit [Quit: Leaving]
<antocuni> cool, thanks for the pointer. The question is why it does not happen on 64 bit, of course
<cfbolz> luck? different alignment? who knows
<cfbolz> anyway, will poke around the branch a bit to think of other places that need fixing
<antocuni> thank you
<antocuni> ah, maybe it is related to the fact that longlong2float behaves differently on 32 and 64 bits
arigato has joined #pypy
WGH has joined #pypy
inad922 has quit [Ping timeout: 240 seconds]
<antocuni> I am a bit confused. I am in gdb after I got the RPython assertion error, inside pypy_g__opimpl_getfield_gc_any_pureornot___153_f
<cfbolz> antocuni: and?
<antocuni> I print the value of "l_self_23719->mif_inst_jitcode->jc_inst_name->rs_chars", which should show me the name of the current jitcode
<antocuni> which is fastfunc_descr_abs_1
<antocuni> so far so good
<antocuni> but if I look at the jitcode inside the usession dir, I get this one: https://paste.lugons.org/?916f180e6db2458e#PqKG3ksQTDt2EecPaZbECr1nGUu+3V7qiKVWj+ujh80=
<antocuni> which does NOT contain any getfield_gc at all
amaury has joined #pypy
<antocuni> also, l_self_23719->mif_inst_pc == 13, which according to the jitcode is not a valid pc at all
<cfbolz> antocuni: there are other ways to end up in 18:50:17 <antocuni> I am a bit confused. I am in gdb after I got the RPython assertion error, inside pypy_g__opimpl_getfield_gc_any_pureornot___153_f
<cfbolz> But I am not seeing any of the other ones in the jitcode either
<antocuni> plus, the pc looks wrong
<antocuni> cfbolz: the jitcode opcode is 102, which corresponds to pypy_g_handler_getfield_gc_f_pure_1
<antocuni> the most likely thing is that jc_inst_name is wrong?
<cfbolz> antocuni: what are the two different values m
<antocuni> cfbolz: the ones which cause the assertion error?
<cfbolz> Yes
<antocuni> they are stored as long long, 4134304457926115328 and 4885473209836634112
<cfbolz> So not particularly similar
<antocuni> which, according to longlong2float, correspond to 2.465190328815662e-32 and 4.1343044579261153e+18
<antocuni> which are a bit suspicious as values
<cfbolz> Indeed
<antocuni> I got there by running test_cmath.py btw
<cfbolz> Anyway, I would fix writeanalyze as the first step. Because atm the effect Infos are just wrong
<antocuni> yes, makes sense
<antocuni> I'll do that and hope that it's enough to solve
* antocuni off for now
<antocuni> cfbolz: thanks!
<cfbolz> antocuni: I am sure there are other such problems somewhere
<antocuni> yes, I suppose I need to fix heapcache as well
<cfbolz> antocuni: maybe, yes. Or at least test that the new op invalidates the heapcache
<cfbolz> (it should, but well)
<antocuni> I'll try
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-32/builds/5193 [antocuni: force build, faster-rstruct-2]
<antocuni> uhm, the own tests didn't find anything :(
<antocuni> or maybe yes
<antocuni> not sure it's related though
antocuni has quit [Ping timeout: 258 seconds]
jacob22_ has quit [Quit: Konversation terminated!]
<Cheery> I consider coming up with modular arithmetic references, for 8,16,32,64,128,256,512 bit numbers.
<Cheery> I just wonder if I can subtype them from integers and non-negative integers.
<Cheery> I guess the approach is incorrect in most sense of the uses.
amaury has quit [Ping timeout: 260 seconds]
jacob22_ has joined #pypy
cstratak has quit [Quit: Leaving]
<Cheery> Also the way it all would work bothers me.
<Cheery> the usual approach would be to make everything use 'long' on the system.
<Cheery> But autovectorization would actually work better if it had awareness about the ranges of the numbers.
Tiberium has quit [Ping timeout: 240 seconds]
vkirilichev has joined #pypy
arigato has quit [Read error: Connection reset by peer]
amaury has joined #pypy
vkirilichev has quit [Remote host closed the connection]
arigato has joined #pypy
<arigato> mattip: hi
Taggnostr2 has joined #pypy
Taggnostr has quit [Ping timeout: 268 seconds]
<dash> any advice on debugging rffi-using code with gdb? I'm trying to nail down some buffer ownership issues
arigato has quit [Quit: Leaving]
jacob22_ has quit [Ping timeout: 240 seconds]
vkirilichev has joined #pypy
jacob22_ has joined #pypy
pilne has joined #pypy
vkirilichev has quit [Remote host closed the connection]
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje has quit [Killed (niven.freenode.net (Nickname regained by services))]
lritter has quit [Ping timeout: 268 seconds]
antocuni has joined #pypy
amaury has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 260 seconds]
marky1991 has quit [Ping timeout: 255 seconds]
antocuni has quit [Ping timeout: 240 seconds]