Closed paciorek closed 1 year ago
Thanks for reporting and for the detailed troubleshooting. Yes, I can see how this can happen. I've now updated the internal hexpr()
to use limit the deparsing to the first 100 lines, cf. commit daa63f26. That should avoid this problem.
future 1.31.0 fixing this is now on CRAN
This surfaced with use of
future_sapply
but the issue appears to be in the behavior of creating messages infuture:::summarize_size_of_globals
, so I am reporting here.The following either hangs or runs very slowly:
On a small-memory machine, I see memory increasing over time and I get an OOM. On a large-memory machine, it finishes eventually (it takes about 30x as long), but surprisingly I don't see the increasing memory use. I'm not sure why, but I don't think it's important to the main point here.
The root cause appears to be the creation of
msg
in line 438 ofglobals.R
. Execution ofsQuote(hexpr(exprOrg))
involves conversion of a very largecall
object (containing the values inx
) to a string. Side note:msg
of course is not even used if not using the debug flag.This behavior seems undesirable, though I suppose one might not characterize it as a bug in some ways.
Side note: Using
x
as an explicit global variable does not trigger the problem, i.e., this behaves fine:Here's the session info. I'll note that with older versions of
future
(e.g. 1.16.0), the issue does not arise because the messaging is handled somewhat differently.EDIT: I've added a link to the code. /HB 2023-01-21