FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Appveyor build failing · Issue #9176 · matplotlib/matplotlib · GitHub

Repository navigation

Appveyor build failing #9176

Closed
Closed

Description

The appveyor build is failing fairly consistently on the python 3.5 build (eg. see https://ci.appveyor.com/project/matplotlib/matplotlib/build/1.0.2957/job/dqhano9lykge7ffb#L1375). The actual failure is somewhere in test_artist:

lib\matplotlib\tests\test_artist.py ...ssCommand exited with code -1073740791

Activity

  1. added this to the milestone on Sep 23, 2017
  2. tacaswell commented on Oct 4, 2017

    Member

    @kbrose did a bunch of work to speed up the path simplifications in #8776

  3. dopplershift commented on Oct 4, 2017

    Contributor

    It should be noted, though, that PR passed AppVeyor at the time.

  4. dopplershift commented on Oct 5, 2017

    Contributor

    There's #9282 that I just opened--at least as far as test_artist.py...-1073740791 is concerned. I went looking back through the AppVeyor logs and noticed that when my jsanimation PR went in is when these started happening. I swear when I saw the first one I looked and checked that the failure wasn't related to my changes (i.e. previous builds on master had the same problem). Apparently I was wrong (my bad).

    At any rate while I think I have the failing test identified...I have no idea why it's causing the problem.

  5. Kojoley commented on Oct 5, 2017

    Member

    @cgohlke these exceptions are properly handled (other way python would crash), I do not why, but faulthandler on python 3.6 prints every C++ exception. I have even checked this under debugger + after rewriting convert_rect(py_converters.cpp) to not use exceptions these messages do not show.

  6. tacaswell commented on Oct 5, 2017

    Member

    Adding '-v' seems to also change the behavior #9229

  7. kbrose commented on Oct 6, 2017

    Contributor

    So to clarify, does it look like this is related to the changes I made, or unrelated? If people suspect my modifications may have caused some of the problems I can try to find some time to dig into it.

  8. Kojoley commented on Oct 6, 2017

    Member

    Crash 1

    I have some success in reproducing the crash in test_artist.py. It always happens in lib/matplotlib/tests/test_artist.py::test_cull_markers. The smallest set of tests required (for me) to trigger the crash is following:

    lib/matplotlib/tests/test_agg.py::test_marker_with_nan PASSED
    lib/matplotlib/tests/test_agg.py::test_long_path PASSED
    lib/matplotlib/tests/test_animation.py::test_save_animation_smoketest[html-html] PASSED
    lib/matplotlib/tests/test_animation.py::test_movie_writer_registry PASSED
    lib/matplotlib/tests/test_artist.py::test_cull_markers
    

    And it happens only with specific PYTHONHASHSEED. With 1 2 4 7 8 11 13 15 ... it crashes, while with 3 5 6 9 10 12 14 16 ... does not. Reordering the tests seems to affect something so it does not crash too.

    if (fseek(def->fp, offset, SEEK_SET) == -1) {

    Stack trace
      Name Language Info
      ucrtbase.dll!__crt_debugger_hook�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!__acrt_call_reportfault�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_invoke_watson�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_invalid_parameter�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_invalid_parameter_noinfo�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_get_osfhandle�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_locking�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!freopen_s�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!freopen_s�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!freopen_s�() Unknown Non-user code. Symbols loaded.
    » ft2font.cp35-win_amd64.pyd!read_from_file_callback(FT_StreamRec_ * stream, unsigned long offset, unsigned char * buffer, unsigned long count) Line 349 C++ Symbols loaded.
      [External Code] Annotated Frame
      ft2font.cp35-win_amd64.pyd!FT2Font::set_text(unsigned __int64 N, unsigned int * codepoints, double angle, int flags, std::vector<double,std::allocator > & xys) Line 625 C++ Symbols loaded.
      ft2font.cp35-win_amd64.pyd!PyFT2Font_set_text(PyFT2Font * self, _object * args, _object * kwds) Line 686 C++ Symbols loaded.
      [External Code] Annotated Frame
      backend_pdf.py!get_text_width_height_descent Line 2173 Python Symbols loaded.
      text.py!_get_layout Line 354 Python Symbols loaded.
      text.py!get_window_extent Line 970 Python Symbols loaded.
      axis.py!_get_tick_bboxes Line 1055 Python Symbols loaded.
      axis.py!draw Line 1115 Python Symbols loaded.
      artist.py!draw_wrapper Line 55 Python Symbols loaded.
      image.py!_draw_list_compositing_images Line 138 Python Symbols loaded.
      _base.py!draw Line 2401 Python Symbols loaded.
      artist.py!draw_wrapper Line 55 Python Symbols loaded.
      image.py!_draw_list_compositing_images Line 138 Python Symbols loaded.
      figure.py!draw Line 1294 Python Symbols loaded.
      artist.py!draw_wrapper Line 55 Python Symbols loaded.
      backend_pdf.py!print_pdf Line 2592 Python Symbols loaded.
      backend_bases.py!print_figure Line 2258 Python Symbols loaded.
      figure.py!savefig Line 1813 Python Symbols loaded.
      test_artist.py!test_cull_markers Line 143 Python Symbols loaded.
      python.py!pytest_pyfunc_call Line 143 Python Symbols loaded.
      pluggy.py!execute Line 614 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py! Line 334 Python Symbols loaded.
      pluggy.py!_hookexec Line 339 Python Symbols loaded.
      pluggy.py!call Line 745 Python Symbols loaded.
      python.py!runtest Line 1171 Python Symbols loaded.
      runner.py!pytest_runtest_call Line 112 Python Symbols loaded.
      pluggy.py!execute Line 614 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py! Line 334 Python Symbols loaded.
      pluggy.py!_hookexec Line 339 Python Symbols loaded.
      pluggy.py!call Line 745 Python Symbols loaded.
      runner.py! Line 182 Python Symbols loaded.
      runner.py!init Line 196 Python Symbols loaded.
      runner.py!call_runtest_hook Line 182 Python Symbols loaded.
      runner.py!call_and_report Line 162 Python Symbols loaded.
      runner.py!runtestprotocol Line 82 Python Symbols loaded.
      runner.py!pytest_runtest_protocol Line 68 Python Symbols loaded.
      pluggy.py!execute Line 614 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py!init Line 265 Python Symbols loaded.
      pluggy.py!_wrapped_call Line 248 Python Symbols loaded.
      pluggy.py!execute Line 613 Python Symbols loaded.
      pluggy.py! Line 334 Python Symbols loaded.
      pluggy.py!_hookexec Line 339 Python Symbols loaded.
      pluggy.py!call Line 745 Python Symbols loaded.
      main.py!pytest_runtestloop Line 169 Python Symbols loaded.
      pluggy.py!execute Line 598 Python Symbols loaded.
      pluggy.py! Line 333 Python Symbols loaded.
      pluggy.py!_hookexec Line 336 Python Symbols loaded.
      pluggy.py!call Line 743 Python Symbols loaded.
      main.py!_main Line 142 Python Symbols loaded.
      main.py!wrap_session Line 99 Python Symbols loaded.
      main.py!pytest_cmdline_main Line 138 Python Symbols loaded.
      pluggy.py!execute Line 598 Python Symbols loaded.
      pluggy.py! Line 333 Python Symbols loaded.
      pluggy.py!_hookexec Line 336 Python Symbols loaded.
      pluggy.py!call Line 743 Python Symbols loaded.
      config.py!main Line 39 Python Symbols loaded.
      init.py!test Line 1388 Python Symbols loaded.
      tests.py! Line 11 Python Symbols loaded.

    Crash 2

    This crash happened to me several times upon stopping pytest with Ctrl+C

    fclose(handle);

    if (mpl_PyFile_DupClose(def->py_file, def->fp, def->offset)) {

    Stack trace
      Name Language Info
      ucrtbase.dll!_invoke_watson�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_invalid_parameter�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_invalid_parameter_noinfo�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!_locking�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!fsetpos�() Unknown Non-user code. Symbols loaded.
      ucrtbase.dll!fsetpos�() Unknown Non-user code. Symbols loaded.
    » ft2font.cp35-win_amd64.pyd!mpl_PyFile_DupClose(_object * file, _iobuf * handle, __int64 orig_pos) Line 136 C++ Symbols loaded.
      ft2font.cp35-win_amd64.pyd!close_file_callback(FT_StreamRec_ * stream) Line 364 C++ Symbols loaded.
      [External Code] Annotated Frame
      ft2font.cp35-win_amd64.pyd!FT2Font::~FT2Font() Line 530 C++ Symbols loaded.
      [External Code] Annotated Frame
      ft2font.cp35-win_amd64.pyd!PyFT2Font_dealloc(PyFT2Font * self) Line 541 C++ Symbols loaded.
      python35.dll!lru_list_elem_dealloc(lru_list_elem * link) Line 633 C Symbols loaded.
      [Inline Frame] python35.dll!lru_cache_clear_list(lru_list_elem * link) Line 1034 C Symbols loaded.
      python35.dll!lru_cache_tp_clear(lru_cache_object * self) Line 1133 C Symbols loaded.
      python35.dll!delete_garbage(_gc_head * collectable, _gc_head * old) Line 867 C Symbols loaded.
      python35.dll!collect(int generation, __int64 * n_collected, __int64 * n_uncollectable, int nofail) Line 1019 C Symbols loaded.
      [Inline Frame] python35.dll!_PyGC_CollectNoFail() Line 1605 C Symbols loaded.
      python35.dll!PyImport_Cleanup() Line 481 C Symbols loaded.
      python35.dll!Py_Finalize() Line 579 C Symbols loaded.
      [Inline Frame] python35.dll!Py_Exit(int) Line 1474 C Symbols loaded.
      python35.dll!handle_system_exit() Line 617 C Symbols loaded.
      python35.dll!PyErr_PrintEx(int set_sys_last_vars) Line 629 C Symbols loaded.
      [Inline Frame] python35.dll!PyErr_Print() Line 523 C Symbols loaded.
      python35.dll!PyRun_SimpleFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 417 C Symbols loaded.
      python35.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 81 C Symbols loaded.
      python35.dll!run_file(_iobuf * fp, const wchar_t * filename, PyCompilerFlags * p_cf) Line 328 C Symbols loaded.
      python35.dll!Py_Main(int argc, wchar_t * * argv) Line 778 C Symbols loaded.
      [External Code] Annotated Frame
  9. cgohlke commented on Oct 6, 2017

    Contributor

    @Kojoley are your builds using Appveyor or freetype built with setup_external_compile.py?

    In that case, crashes are not really unexpected. See comments at #6969 (diff)

  10. Kojoley commented on Oct 6, 2017

    Member

    @cgohlke I cannot catch what are you saying. Freetype builds successfully by setup_external_compile all the time for me with every python version I had tried (2.7, 3.4, 3.5, 3.6).

  11. cgohlke commented on Oct 6, 2017

    Contributor

    When using setup_external_compile on Python 3.5 and 3.6, freetype is built with the Visual Studio 2010 compiler, which uses a different C runtime than Python and the rest of the matplotlib C extensions, which are built with Visual Studio 2015. This can cause strange crashes.

  12. Kojoley commented on Oct 6, 2017

    Member

    You are right about different runtimes and it might be a root cause if ft2font would not be a mpl python extension that builds with setuptools. It should not be hard to build freetype with VS2017 (using cmake or convert/upgrade project) so I will check this.

  13. cgohlke commented on Oct 6, 2017

    Contributor

    Yes, the ft2font Python extension is built with VS2015, but the freetype library is built with VS2010 and linked into the ft2font extension.

  14. 13 remaining items

  15. Kojoley commented on Oct 11, 2017

    Member

    Maybe I was fooled by GitHub

    but my latest conda's Python 3.6.2 does not have the fix.

  16. cgohlke commented on Oct 11, 2017

    Contributor

    Python 3.6.3 contains this bug fix. Unfortunately it also contains a faulthandler version that prints all the caught C++ exception messages. Probably it should be disabled on Appveyor for that version?

  17. Kojoley commented on Oct 11, 2017

    Member

    Indeed Python 3.6.3 does have it.

  18. Kojoley commented on Oct 11, 2017

    Member

    Probably it should be disabled on Appveyor for that version?

    As we see, on windows faulthandler is completely useless, so I would just remove it from appveyor, for a while at least.

  19. anntzer commented on Oct 11, 2017

    Contributor

    Can we replace 3.5 by 3.4 on Appveyor?

  20. cgohlke commented on Oct 11, 2017

    Contributor

    Can we replace 3.5 by 3.4 on Appveyor?

    3.4 contains that bug too.

  21. Kojoley commented on Oct 11, 2017

    Member

    I am for removing 3.5 from appveyor, but patch -u -p 1 -i ...\1224.patch -d path\to\python could be used if we leave it.

    What about faulthandler and C++ exceptions there is a thread https://bugs.python.org/issue31701 and a fix python/cpython#3929

  22. anntzer commented on Oct 11, 2017

    Contributor

    If I understand correctly we did not see the bug before because it's due to a change in the CRT? or something else?

  23. Kojoley commented on Oct 11, 2017

    Member

    @anntzer I had seen problems with descriptors a year ago and that's why pytest-xdist is not activated on appveyor. Nothing changed to CRT, it just sometimes crashes on a bad value, while other time not (we do not know what happens here, because it is distributed without sources). When I installed debug python (python_d) and run simple pip install . on mpl sources it crashed python (thanks to versioneer). After some time I figured that subprocess.Popen with PIPE's would crash the python_d.

  24. tacaswell commented on Oct 12, 2017

    Member

    👍 to dropping 3.5 from the test matrix and documenting this issue in the windows install docs.

  25. dstansby commented on Oct 14, 2017

    MemberAuthor

    Thanks a lot to everyone who chased this one!

  26. tacaswell commented on Oct 15, 2017

    Member

    Thanks @Kojoley and @cgohlke !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL