Code Monkey home page Code Monkey logo

Comments (5)

eliotwrobson avatar eliotwrobson commented on July 3, 2024 1

For now, I think disabling the warning is the easiest thing to do (this is pretty easy using a warning filter). In the past I've mentioned potentially using the asyncio framework in Python to replace this usage of os.fork() if we switch to TCP for communicating with the Python process, maybe worth considering if it avoids potential deadlocks? I'm not even completely sure why this fork gets used, but ripping out the usage might be kinda overkill in this case.

from prairielearn.

eliotwrobson avatar eliotwrobson commented on July 3, 2024

Where are you seeing this error, are you running things locally? I didn't think that the PL servers were on 3.12 yet.

from prairielearn.

nwalters512 avatar nwalters512 commented on July 3, 2024

I was able to trace this back to pyarrow, which spins up a thread for jemalloc_bg_thd. How I was able to do this:

  • Run a PL container
  • Pop another shell into it
  • Run top | grep python3 to identify the process PID
  • Run top -H -p <PID> to see all the threads, which shows the following:
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                          
 2015 root      20   0 1682688 304124  87808 S   0.0   1.9   0:01.92 python3                                          
 2046 root      20   0 1682688 304124  87808 S   0.0   1.9   0:00.00 jemalloc_bg_thd 

As Eliot points out, this isn't yet a problem, as we don't support Python 3.12. However, it will be a problem as soon as we decide to support that version. Probably the right thing to do is to disable this specific deprecation warning?

In principal pyarrow allows us to change the memory pool implementation that's used. I tried pa.set_memory_pool(pa.system_memory_pool()), but that didn't stop the jemalloc thread.

from prairielearn.

nwalters512 avatar nwalters512 commented on July 3, 2024

fork() is used to ensure a clean execution environment every time we execute code. We will not be getting rid of it.

from prairielearn.

nishanthkarthik avatar nishanthkarthik commented on July 3, 2024

Where are you seeing this error, are you running things locally? I didn't think that the PL servers were on 3.12 yet.

Right, I am using the native development setup for PL. I use archlinux, so my packages are rolling. I can just ignore the warnings in Python but I wasn't sure if error: Unexpected STDERR data meant a hard stop somewhere.

from prairielearn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.