Coder Social home page Coder Social logo

Seqfault in on_trait_change about traitlets HOT 10 CLOSED

ipython avatar ipython commented on July 22, 2024
Seqfault in on_trait_change

from traitlets.

Comments (10)

jenshnielsen avatar jenshnielsen commented on July 22, 2024

BTW the Matplotlib build log is in https://travis-ci.org/matplotlib/matplotlib/jobs/103175772

from traitlets.

jenshnielsen avatar jenshnielsen commented on July 22, 2024

Looking over Matplotlib log we only seem to see it with python 3 (Specifically python 3.5) On the branches where the docs are build with python 2.7 this doesn't happen.

from traitlets.

jenshnielsen avatar jenshnielsen commented on July 22, 2024

Im also seeing it in a fresh conda environment

In [1]:
Do you really want to exit ([y]/n)? y
Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Current thread 0x00007fff7844b000 (most recent call first):
  File "/Users/jhn/miniconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 1136 in on_trait_change
  File "/Users/jhn/miniconda3/lib/python3.5/site-packages/IPython/core/extensions.py", line 64 in __del__
/Users/jhn/miniconda3/bin/python.app: line 3:  4033 Abort trap: 6           /Users/jhn/miniconda3/python.app/Contents/MacOS/python "$@"

from traitlets.

minrk avatar minrk commented on July 22, 2024

I can see this, too sometimes. Seems like it has to be a bug in Python 3.5, even if it's triggered by a change in traitlets. I'll try to see if I can figure out what caused it.

from traitlets.

jenshnielsen avatar jenshnielsen commented on July 22, 2024

@minrk Thanks, It sounds plausible that it's a bug in Python 3.5

from traitlets.

minrk avatar minrk commented on July 22, 2024

I just need to narrow it down to what's the exact cause. I've seen it, but I cannot reproduce it reliably, which makes it harder to find what is the relevant change. I can only reproduce the error about 1% of the time, which suggests to me that it might be threading related.

from traitlets.

minrk avatar minrk commented on July 22, 2024

I think I found it: the cause appears to be the deprecation warning that we throw, since on_trait_change is deprecated. I'm guessing it's the inspection used to show the warning message that's failing.

Unfortunately, I don't know a way to fix this in traitlets, since it seems like the only thing we are doing is a simple warning.

Fortunately, though, the __del__ call here that's the direct cause is unnecessary and already removed in master (ipython/ipython#9040). My proposal is to backport this fix and immediately release IPython 4.0.3, while we work with CPython to figure out the upstream bug.

from traitlets.

jenshnielsen avatar jenshnielsen commented on July 22, 2024

@minrk Sounds good to me

from traitlets.

minrk avatar minrk commented on July 22, 2024

Released IPython 4.0.3 with the patch. Hopefully that should tide us over while we work out what's up with Python 3.5.

from traitlets.

jenshnielsen avatar jenshnielsen commented on July 22, 2024

@minrk Thanks, I will upgrade and see what happens.

from traitlets.

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.