Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGABRT with python3 --with-tcl-tk #12808

Closed
4 tasks done
jkl1337 opened this issue Apr 24, 2017 · 18 comments
Closed
4 tasks done

SIGABRT with python3 --with-tcl-tk #12808

jkl1337 opened this issue Apr 24, 2017 · 18 comments
Labels
10.12 Sierra is specifically affected bug Reproducible Homebrew/homebrew-core bug python Python use is a significant feature of the PR or issue

Comments

@jkl1337
Copy link
Contributor

jkl1337 commented Apr 24, 2017

Please always follow these steps:

To help us debug your issue please explain:

  • What you were trying to do (and why)
    • Install python3 that uses the homebrew tcl-tk (8.6)
  • What happened (include command output)
$ python3
Python 3.6.1 (default, Apr 23 2017, 19:58:06)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.41)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.Tk()
Abort trap: 6
$ 
  • Step-by-step reproduction instructions (by running brew install commands)
$ brew install tcl-tk
$ brew install python3 --with-tcl-tk
$ python3 -c 'import tkinter; tkinter.Tk()'

A similar issue with python2 was opened in #12114, but the user closed it because they reinstalled python against the Apple provided Tcl/Tk, which doesn't resolve the issue.

@agentirons
Copy link

My open issue #12068 may be related, as I get a EXC_BAD_ACCESS (SIGSEGV) with python2 --with-tcl-tk trying to open files with IDLE. As with the other issue you mentioned, Apple's Tcl/Tk doesn't have the same behavior.

@dunn dunn added the python Python use is a significant feature of the PR or issue label Apr 29, 2017
@schiotz
Copy link

schiotz commented May 4, 2017

Please note that the Apple-provided Tcl/Tk is known to be slow and buggy (https://www.python.org/download/mac/tcltk/) so it would have real value to be able to build Python (both version 2 and 3) with either ActiveState's Tcl/Tk or Homebrew's.

@jeremy886
Copy link

Same problem for me. Looking for solutions.

% python3 -c 'import tkinter; tkinter.Tk()'
[1] 64587 abort python3 -c 'import tkinter; tkinter.Tk()'

@theli-ua
Copy link

theli-ua commented Jun 6, 2017

not sure how helpfull but here is the backtrace

`(lldb) bt

  • thread mpw: use secure urls #2, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    • frame #0: 0x00007fff93981d42 libsystem_kernel.dylib__pthread_kill + 10 frame #1: 0x00007fff93a6f5bf libsystem_pthread.dylibpthread_kill + 90
      frame mpw: use secure urls #2: 0x00007fff938e7420 libsystem_c.dylibabort + 129 frame #3: 0x00007fff938e7592 libsystem_c.dylibabort_report_np + 181
      frame libtomcrypt: boneyard. #4: 0x00007fff9390df28 libsystem_c.dylib__chk_fail + 48 frame #5: 0x00007fff9390def8 libsystem_c.dylib__chk_fail_overflow + 16
      frame erlang: unixodbc isn't needed. #6: 0x00007fff9390e145 libsystem_c.dylib__strcpy_chk + 83 frame #7: 0x0000000102be8e86 libtk8.6.dylibTk_WmObjCmd + 12920
      frame Add .github templates in homebrew-core #8: 0x0000000102c7479f libtcl8.6.dylibTclNRRunCallbacks + 80 frame #9: 0x00000001003f2b5a _tkinter.cpython-36m-darwin.soTkapp_Call + 415
      frame libsodium 1.0.9 #10: 0x00000001000d277d Python_PyCFunction_FastCallDict + 166 frame #11: 0x000000010013a3f1 Pythoncall_function + 511
      frame libguess 1.2 (new formula) #12: 0x0000000100132baf Python_PyEval_EvalFrameDefault + 5185 frame #13: 0x000000010013ac0c Python_PyEval_EvalCodeWithName + 1903
      frame Update documentation after repository split. #14: 0x000000010013b331 Pythonfast_function + 227 frame #15: 0x000000010013a3c1 Pythoncall_function + 463
      frame youtube-dl 2016.04.01 #16: 0x0000000100132baf Python_PyEval_EvalFrameDefault + 5185 frame #17: 0x000000010013b5d4 Python_PyFunction_FastCall + 122
      frame [makensis] Bump to 2.51 #18: 0x000000010013a3c1 Pythoncall_function + 463 frame #19: 0x0000000100132baf Python_PyEval_EvalFrameDefault + 5185
      frame fswatch 1.9.1 #20: 0x000000010013ac0c Python_PyEval_EvalCodeWithName + 1903 frame #21: 0x000000010013b4fc Python_PyFunction_FastCallDict + 444
      frame "brew search --desc" fails #22: 0x00000001000995d8 Python_PyObject_FastCallDict + 214 frame #23: 0x00000001000996fc Python_PyObject_Call_Prepend + 156
      frame git 2.8.1 #24: 0x0000000100099445 PythonPyObject_Call + 102 frame #25: 0x00000001000e628e Pythonslot_tp_init + 61
      frame Fastd HEAD url broken #26: 0x00000001000e30c6 Pythontype_call + 184 frame #27: 0x000000010009959c Python_PyObject_FastCallDict + 154
      frame add gyazo-cli 0.4.1 #28: 0x000000010013a3ba Pythoncall_function + 456 frame #29: 0x0000000100132baf Python_PyEval_EvalFrameDefault + 5185
      frame brew install mit-scheme failed on 10.11 #30: 0x000000010013ac0c Python_PyEval_EvalCodeWithName + 1903 frame #31: 0x00000001001316f9 PythonPyEval_EvalCode + 43
      frame dummy akka 2.4.2 #32: 0x000000010015a4b8 Pythonrun_mod + 54 frame #33: 0x000000010015a910 PythonPyRun_StringFlags + 120
      frame lldpd 0.9.2 #34: 0x000000010015a860 PythonPyRun_SimpleStringFlags + 69 frame #35: 0x000000010016de26 PythonPy_Main + 2570
      frame redpen 1.5.5 #36: 0x0000000100001e1b Python___lldb_unnamed_symbol1$$Python + 228 frame #37: 0x00007fff93853235 libdyld.dylibstart + 1
      frame README: duplicate more of Homebrew/brew README.md #38: 0x00007fff93853235 libdyld.dylibstart + 1

@stale stale bot added the stale No recent activity label Jun 27, 2017
@stale
Copy link

stale bot commented Jun 27, 2017

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

@jkl1337
Copy link
Contributor Author

jkl1337 commented Jun 27, 2017

Lol it's still an issue.

@stale stale bot removed the stale No recent activity label Jun 27, 2017
@ilovezfs
Copy link
Contributor

@jkl1337 It is?

iMac-TMP:~ joe$ brew linkage python3
System libraries:
  /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
  /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
  /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
  /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
  /usr/lib/libSystem.B.dylib
  /usr/lib/libbz2.1.0.dylib
  /usr/lib/libncurses.5.4.dylib
  /usr/lib/libobjc.A.dylib
  /usr/lib/libpanel.5.4.dylib
  /usr/lib/libz.1.dylib
Homebrew libraries:
  /usr/local/opt/gdbm/lib/libgdbm.4.dylib (gdbm)
  /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (openssl)
  /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (openssl)
  /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/Python (python3)
  /usr/local/opt/readline/lib/libreadline.7.dylib (readline)
  /usr/local/opt/sqlite/lib/libsqlite3.0.dylib (sqlite)
  /usr/local/opt/tcl-tk/lib/libtcl8.6.dylib (tcl-tk)
  /usr/local/opt/tcl-tk/lib/libtk8.6.dylib (tcl-tk)
  /usr/local/opt/xz/lib/liblzma.5.dylib (xz)
iMac-TMP:~ joe$ python3
Python 3.6.1 (default, Jun 27 2017, 07:28:07) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.Tk()
<tkinter.Tk object .>
>>> 
iMac-TMP:~ joe$ 

@ilovezfs
Copy link
Contributor

@jkl1337 ah ok I can reproduce this on 10.12 but not 10.11.

@ilovezfs ilovezfs added 10.12 Sierra is specifically affected bug Reproducible Homebrew/homebrew-core bug labels Jun 27, 2017
@iMichka
Copy link
Member

iMichka commented Jun 27, 2017

@ilovezfs
In the python3 bug, one user found out that

bringing back the --with-x11 removed in 1b5d094 fixes this

I did not have time try this out though.

@ilovezfs
Copy link
Contributor

@iMichka sure … but that's a different tcl-tk.

@gphein
Copy link

gphein commented Jun 28, 2017

Having the same issue on mac 10.12.5. Not sure if this helps, but this is where I am after trying to find more info about whats going wrong. Disclosure: I know nothing about tcl/tk and very little about brew. For me, the error is thrown at line 1958 in /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/init.py (might be off a line or two from me messing with it).

1958:        return self.tk.call('wm', 'protocol', self._w, name, command)

called from:

2051: self.protocol("WM_DELETE_WINDOW", self.destroy)

That calling sequence was from:

import tkinter as tk
tk._test()
Abort trap: 6

self.tk is an instance of _tkinter (created around line 2017), which appears to be a class from /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_tkinter.cpython-36m-darwin.so

which has dependencies on the tcl/tk libraries:

>otool -L /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_tkinter.cpython-36m-darwin.so
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_tkinter.cpython-36m-darwin.so:
	/usr/local/opt/tcl-tk/lib/libtk8.6.dylib (compatibility version 8.6.0, current version 8.6.6)
	/usr/local/opt/tcl-tk/lib/libtcl8.6.dylib (compatibility version 8.6.0, current version 8.6.6)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)

I was hoping to get more info about what's going wrong beyond the "overflow" posted above which is what appears to me, too. I don't know enough about the systems involved so I'm at a loss to dig up more info.

@cemarriott
Copy link

According to the Python site (https://www.python.org/download/mac/tcltk/#activetcl-8-5-17-0), Python 3.6.1 should be using Tcl/Tk version 8.5.x, not 8.6. I have noted that the only version available through Homebrew is 8.6.6. ActiveState provides an 8.5 version of ActiveTcl which would presumably work, however I have not had the chance to test it.

@ilovezfs
Copy link
Contributor

@cemarriott given that the bug doesn't occur on 10.11 that doesn't sound likely to be relevant.

@jkl1337
Copy link
Contributor Author

jkl1337 commented Jun 30, 2017

@cemarriott That page refers to compatibility amongst the various semi-official prebuilt binary versions of python and tcl/tk. And actually that is precisely the reason why this bug is relevant to some of us because it has previously been the one way to get tkinter with tk 8.6 on Mac.

@stale stale bot added the stale No recent activity label Jul 21, 2017
@stale
Copy link

stale bot commented Jul 21, 2017

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

telamonian pushed a commit to telamonian/homebrew-core that referenced this issue Jul 22, 2017
…ith-x11` option. Without --with-x11 `brew test python` and `brew test python3` fail, and some formulae (eg pymol) break
@telamonian
Copy link
Contributor

telamonian commented Jul 22, 2017

@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 #12114.

@stale stale bot removed the stale No recent activity label Jul 22, 2017
@ilovezfs
Copy link
Contributor

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

telamonian pushed a commit to telamonian/homebrew-core that referenced this issue Aug 1, 2017
…y adding devel

build. Also removes semi-function HEAD build
@ilovezfs
Copy link
Contributor

ilovezfs commented Aug 2, 2017

This should be fixed if you

brew install --devel tcl-tk

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.12 Sierra is specifically affected bug Reproducible Homebrew/homebrew-core bug python Python use is a significant feature of the PR or issue
Projects
None yet
Development

No branches or pull requests