arigato changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | mac OS and Fedora are not Windows
adamholmberg has quit [Remote host closed the connection]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
antocuni has quit [Ping timeout: 250 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
user24 has joined #pypy
squeaky_pl has joined #pypy
dddddd has quit [Remote host closed the connection]
user24 has quit [Quit: Leaving]
PileOfDirt has quit [Quit: Leaving]
jcea has quit [Quit: jcea]
squeaky_pl has quit [Remote host closed the connection]
arigato has quit [Ping timeout: 252 seconds]
Arfrever has quit [Ping timeout: 250 seconds]
bbot2 has quit [Ping timeout: 272 seconds]
bbot2 has joined #pypy
arigo has joined #pypy
ctismer_argl has quit [Ping timeout: 244 seconds]
froztbyte has quit [Ping timeout: 250 seconds]
ctismer has joined #pypy
froztbyte has joined #pypy
the_rat has quit [Ping timeout: 272 seconds]
forgottenone has joined #pypy
il_ratto has joined #pypy
<mattip> we should add "move to github" to our project ideas list. The issue search is broken
<mattip> , I am sure 'get_terminal_size' problems have been reported before, but a search comes up empty
<mattip> ahh, it seems to be the underscore. Searching for "terminal" returns many results
lritter has quit [Ping timeout: 246 seconds]
lritter has joined #pypy
Kipras_ has quit [Read error: Connection reset by peer]
Kipras_ has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
moei has quit [Quit: Leaving...]
themsay has quit [Ping timeout: 268 seconds]
marvin has quit [Remote host closed the connection]
7YUAAIFAB has joined #pypy
ionelmc has quit [Quit: Updating details, brb]
ionelmc has joined #pypy
7YUAAIFAB has quit [Remote host closed the connection]
marvin_ has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
Trpger has joined #pypy
Trpger has quit [Remote host closed the connection]
antocuni has joined #pypy
dddddd has joined #pypy
lritter has quit [Ping timeout: 250 seconds]
antocuni has quit [Ping timeout: 244 seconds]
moei has joined #pypy
Taggnostr has joined #pypy
tumbleweed_ has quit [Changing host]
tumbleweed_ has joined #pypy
tumbleweed_ is now known as tumbleweed
<mattip> arigo: any ideas about the _cffi_backend failures on py3.5 bencher4?
<mattip> the host python cannot import its own _cffi_backend
xcm is now known as Guest38206
Guest38206 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
xcm has joined #pypy
Taggnostr has quit [Remote host closed the connection]
Taggnostr has joined #pypy
jcea has joined #pypy
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
jacob22_ has quit [Read error: Connection reset by peer]
jacob22__ has joined #pypy
antocuni has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
the_drow has joined #pypy
<the_drow> I'm working on getting grpc to stop crashing and I get the following: https://github.com/grpc/grpc/issues/4221#issuecomment-446608029
<the_drow> I simply run the tests...
<the_drow> So somewhere in a __del__ method they are calling CPython API?
<Alex_Gaynor> Well, a `tp_dealloc`, so it's in a C extension, not python code
<mattip> or in a tp_dealloc
<the_drow> I'm not familiar with tp_dealloc
<the_drow> Is it called after __del__?
<mattip> it's what happens when you call __del__ in C
<cfbolz> the_drow: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dealloc
<the_drow> I can't even tell which object that was
<the_drow> How do you guys debug such cases?
<Alex_Gaynor> I'd just grep the C codebase for `tp_dealloc` and read them all 🤷
<cfbolz> yes, there's probably not a huge amount of them
<the_drow> It's written in Cython
<Alex_Gaynor> Ok, I think it's actually `__dealloc__` because it's Cython
marky1991 has joined #pypy
<the_drow> 7 __dealloc__s
<the_drow> I can manage that
<the_drow> All of the __dealloc__ methods call grpc methods.
<the_drow> I don't see anything using the Python API directly
<Alex_Gaynor> One of them calls CompetionQueue.poll(), which is a "def" function, not a "cdef" one.
<Alex_Gaynor> So that might do it?
marky1991 has quit [Ping timeout: 245 seconds]
<the_drow> I'm not sure
<the_drow> Where do you see it?
<cfbolz> arigo: I fear the math-improvements branch needs some more care :-(
<cfbolz> I keep finding corner cases, and that's not a good sign
<Alex_Gaynor> src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi line 131
<Alex_Gaynor> err, line 142
<Alex_Gaynor> maybe `time.sleep` too, I'm not sure
<mattip> it's ok to call the C-API, just not with the object being deallocated
<the_drow> So it's because they are calling self.backup_shutdown_queue?
<Alex_Gaynor> mattip: Unfortunately I have no clue how Cython compiles some of this stuff :-/
<mattip> could try printing before and after some of those calls
marky1991 has joined #pypy
<the_drow> It'd be nice if PyPy could print the object's class which is violating this assertion.
<the_drow> Should I open an issue about it?
<mattip> or even build the whole thing with "CFLAGS='-O0 -g3'", and then run "gdb --args pypy ..."
<the_drow> grpc's build system is a nightmare
<the_drow> getting this to compile with PyPy was a hacky PITA
vstinner has left #pypy [#pypy]
<the_drow> Alex_Gaynor, you are correct. That is indeed the problem
<Alex_Gaynor> the_drow: the `.poll()`?
<the_drow> Yes
<the_drow> At least, it's that code branch
<Alex_Gaynor> Cool! /me feels good about his code reviewing skills
<Alex_Gaynor> If it's really that, I suspect marking `.poll()` as a `cdef` is the fix.
rubdos has quit [Ping timeout: 268 seconds]
<the_drow> I'm guessing it's also called from Python
xcm has quit [Read error: Connection reset by peer]
<Alex_Gaynor> Might need to refactor it into a `def poll` which calls a `cdef c_poll` or something and have `__dealloc__` call the latter
<the_drow> actually poll calls a cdef and that's it
<mattip> strange, you would think that some kind of memory freeing would be done in __dealloc__, not shutdowns
user24 has joined #pypy
xcm has joined #pypy
<mattip> this seems to be too late to be calling shutdowns
<the_drow> but it works on cpython
<the_drow> and the strangest thing is that the first time I run those tests, they pass in PyPy as well
<the_drow> They don't pass the second time
<the_drow> I found it
<the_drow> It's before poll
<the_drow> In _c_shutdown of the Server class they call cpython.Py_INCREF(server_shutdown_tag)
<the_drow> They need it to be alive for the grpc_server_shutdown_and_notify call
<mattip> ahh, and that is holding a reference to self
<the_drow> How the hack does this work on CPython?
<mattip> which doesn't really exist at this point
<mattip> self has two pieces in PyPy, a PyPy object and a C-API (PyObject) object
<mattip> in cpython there is only the one
<mattip> there are thus two paths to get to __dealloc__
<the_drow> But why would you need self if it's now deallocated?
<mattip> one path via C only, the other via the interpreter
<mattip> the_drow: they need it as a marker for the shutdown call, to know what to shut down
<mattip> but that shutdown call probably goes through the interpreter, which in PyPy needs the (now destroyed) PyPy object
<the_drow> Is there an option to allow this in PyPy somehow?
<the_drow> So the PyObject* isn't destroyed yet? Only it's PyPy parallel?
<mattip> no. Split it into two parts: shutdown, and dealloc. If you try to dealloc before shutdown it is an error
<mattip> the_drow: correct
marky1991 has quit [Ping timeout: 250 seconds]
<the_drow> We can emulate this behaviour too though?
<mattip> no, because if you reach __dealloc__ via the PyPy GC, it is too late, there is no PyPy object to resurrect
marky1991 has joined #pypy
<mattip> but now that I read that, maybe ...
<the_drow> Couldn't we postpone the destruction of the PyPy object after __dealloc__ IF it's a mirror to a PyObject?
<the_drow> mattip, Any idea?
<mattip> the_drow: yeah, that's what I was looking at. I don't think so, but worth a look
<the_drow> FYI they have a PR pending with a fix already
<mattip> that's easier then
<the_drow> Yeh but I guess we should still consider what to do with that kind of code
<the_drow> The whole point of me messing with grpc is to improve cpyext
<the_drow> I don't really care about grpc
<mattip> well, cpyext is a stopgap, people should be using cffi + pure python
<mattip> or cppyy and pure python in this case
<the_drow> But they don't
<the_drow> (It's not that I disagree)
<mattip> right. But how much should we support bad usage of the C-API?
themsay has joined #pypy
<the_drow> It's up to you guys.
<the_drow> I'll open an issue about this and we'll see
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
themsay has quit [Ping timeout: 268 seconds]
antocuni has quit [Ping timeout: 240 seconds]
the_drow has quit [Remote host closed the connection]
themsay has joined #pypy
themsay has quit [Ping timeout: 250 seconds]
Zaab1t has joined #pypy
Zaab1t has quit [Client Quit]
themsay has joined #pypy
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #pypy
themsay has quit [Read error: Connection reset by peer]
themsay has joined #pypy
themsay has quit [Ping timeout: 240 seconds]
themsay has joined #pypy
themsay has quit [Ping timeout: 240 seconds]
Zaab1t has joined #pypy
themsay has joined #pypy
themsay has quit [Read error: Connection reset by peer]
themsay has joined #pypy
Rhy0lite has quit [Quit: Leaving]
marky1991 has quit [Ping timeout: 250 seconds]
forgottenone has quit [Quit: Konversation terminated!]
lritter has joined #pypy
marky1991 has joined #pypy
xdecimal_ has joined #pypy
xdecimal_ has quit [Quit: -a- IRC for Android 2.1.44]
marky1991 has quit [Ping timeout: 250 seconds]
jamesaxl has quit [Quit: WeeChat 2.2]
user24 has quit [Quit: Leaving]
Taggnostr3 has joined #pypy
runciter_ has joined #pypy
danchr_ has joined #pypy
agronholm_ has joined #pypy
altendky has quit [Ping timeout: 250 seconds]
kirma has quit [Ping timeout: 250 seconds]
runciter has quit [Ping timeout: 250 seconds]
danchr has quit [Ping timeout: 250 seconds]
Taggnostr has quit [Ping timeout: 250 seconds]
agronholm has quit [Ping timeout: 250 seconds]
altendky has joined #pypy
il_ratto has quit [Ping timeout: 246 seconds]
il_ratto has joined #pypy
inhahe_ has quit []
inhahe has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
forgottenone has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]