Homebrew-core: python --with-tcl-tk crashes, buffer overflow error

Created on 6 Apr 2017  Â·  15Comments  Â·  Source: Homebrew/homebrew-core

Please always follow these steps:

  • [x] Confirmed this is a problem with only one, specific formula and not Homebrew/brew? If it's a general Homebrew/brew problem please file this issue at https://github.com/Homebrew/brew/issues/new
  • [x] Ran brew update and retried your prior step?
  • [x] Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • [x] Ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link? https://gist.github.com/0f94790ebaa91323ab885ddfe587cd6a

To help us debug your issue please explain:

  • What you were trying to do (and why)

    • Trying to install python 2.7 with TK interface

    • The purpose is to run pyraf in OSX

  • What happened (include command output)

    • installed tcl-tk with brew install tcl-tk without error

    • added export PATH="/usr/local/opt/tcl-tk/bin:$PATH" to .bash_profile and sourced it

    • installed python with brew install python --with-tcl-tk without error

    • test by running python -m Tkinter => crash with Abort trap: 6

  • What you expected to happen

    • Tkinter does not crash

  • Step-by-step reproduction instructions (by running brew install commands)

    • brew install tcl-tk

    • brew install python --with-tcl-tk

    • python -m Tkinter

Additional info:

  • OSX Sierra
  • Retried after installing all OS patch and Xcode patches
  • Brew doctor reported nothing

Apple crash info:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
detected buffer overflow

Stack trace: --unfortunately could not figure out how to install debug symbols

frame #0: 0x00007fff90801d42 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff908ef5bf libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00007fff90767420 libsystem_c.dylib`abort + 129
frame #3: 0x00007fff90767592 libsystem_c.dylib`abort_report_np + 181
frame #4: 0x00007fff9078df28 libsystem_c.dylib`__chk_fail + 48
frame #5: 0x00007fff9078def8 libsystem_c.dylib`__chk_fail_overflow + 16
frame #6: 0x00007fff9078e145 libsystem_c.dylib`__strcpy_chk + 83
frame #7: 0x00000001025cbe86 libtk8.6.dylib`Tk_WmObjCmd + 12920
frame #8: 0x000000010265779f libtcl8.6.dylib`TclNRRunCallbacks + 80
frame #9: 0x00000001005eea92 _tkinter.so`Tkapp_Call + 425
frame #10: 0x0000000100116623 Python`PyEval_EvalFrameEx + 9903
frame #11: 0x0000000100113d7f Python`PyEval_EvalCodeEx + 1621
frame #12: 0x000000010011c58d Python`fast_function + 298
frame #13: 0x0000000100116557 Python`PyEval_EvalFrameEx + 9699
frame #14: 0x000000010011c528 Python`fast_function + 197
--snip--
frame #37: 0x00007fff906d3235 libdyld.dylib`start + 1
frame #38: 0x00007fff906d3235 libdyld.dylib`start + 1
10.12 bug python

Most helpful comment

Reopening as requested.

All 15 comments

Issue went away after brewing python without --with-tcl-tk

@poernahi
Could you please reopen this issue, as it is a real issue. The version of Tcl/Tk provided by Apple is slow and buggy (https://www.python.org/download/mac/tcltk/), using the homebrew-built version should be better. But of course not when it crashes.

Reopening as requested.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Can also be reproduced with:

python
import Tkinter
Tkinter._test()

@tdsmith I think this is what is making pymol crash in homebrew-science

Is anyone working on this?

Seconded – this is still very much an issue. I also get this error with iMichka's minimal example.

Is anyone working on this?

No. Someone experiencing the issue will need to.

bringing back the --with-x11 removed in 1b5d0948b0 fixes this for iMichka's example (and pymol as well, which is my main concern).

What was the justification for removing that option? The commit references something seemingly irrelevant to me.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@cowsandmilk's suggestion to readd (and use) the --with-x11 option in the tcl-tk formula fixed these issues for me. I've made a pull request with the revised formula. This apparently also fixes #12808.

I've closed that PR but an actual fix for these issues would be most welcome.

This should be fixed if you

brew install --devel tcl-tk

this did not work for me ilovezfs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

bantl23 picture bantl23  Â·  3Comments

yuna9 picture yuna9  Â·  4Comments

xeoneux picture xeoneux  Â·  3Comments

oli-laban picture oli-laban  Â·  3Comments