python3-tkinter dumps core
$ uname -a
OS400 XXXXXX 4 7 00210006989W Os
$ cat tksamp.py
# tksamp.py
import tkinter as tk
window = tk.Tk()
greeting = tk.Label(text="Hello, Tkinter")
greeting.pack()
window.mainloop()
$ python3 tksamp.py
Cannot create fontset
Cannot create fontset
Illegal instruction (core dumped)
Comments (29)
-
reporter -
Account Deactivated Although this link are mainly focusing on the machine learning, but making the tkinter works is a sidecar. https://www.ibmsystemsmag.com/IT-Strategy/11/2019/How-to-Start-ml-on-IBM-i?utm_content=105130364&utm_medium=social&utm_source=twitter&hss_channel=tw-488711278
You can find detail instructions on how to make the SSH support the X forwarding to your laptop.
-
reporter @Gavin Gan Zhang, your response is not relevant to the reported bug. X Windowing System applications are already working on the affected platforms. This is a bug in the tkinter implementation on IBM i.
-
Account Deactivated Oh, yeah. Sorry. Forget to reply that your sample program works on my side. I can see this window displayed on my laptop.
-
Account Deactivated BTW, from that document, I mentioned a few pre-req PTFs, please make sure you have them installed on your system.
-
reporter These are up-to-date 7.4 LPARs.
-
reporter Maybe tkinter has X lib dependencies that do not get followed by yum?
-
Account Deactivated can you show me the output on your system for this command:
”yum list installed|grep python3” -
reporter
$ yum list installed|grep python3 python3.ppc64 3.6.9-2 @ibm python3-Pillow.ppc64 5.0.0-5 @ibm python3-asn1crypto.noarch 0.24.0-1 @ibm python3-bcrypt.ppc64 3.1.4-6 @ibm python3-cffi.ppc64 1.11.5-3 @ibm python3-cryptography.ppc64 2.8-0 @ibm python3-dateutil.noarch 2.7.5-0 @ibm/7.3 python3-devel.ppc64 3.6.9-2 @ibm python3-ibm_db.ppc64 2.0.5.12-0 @ibm python3-idna.noarch 2.8-1 @ibm python3-itoolkit.ppc64 1.6.1-1 @ibm python3-jinja2.noarch 2.11.2-1 @ibm python3-lxml.ppc64 4.2.1-3 @ibm/$releasever python3-markupsafe.ppc64 1.1.1-1 @ibm python3-numpy.ppc64 1.15.4-0 @ibm/7.3 python3-pandas.ppc64 0.22.0-4 @ibm/$releasever python3-paramiko.noarch 2.6.0-1 @ibm python3-pip.noarch 9.0.1-3 @ibm python3-psutil.ppc64 5.5.1-0 @ibm/7.3 python3-pycparser.ppc64 2.19-2 @ibm python3-pynacl.ppc64 1.2.1-3 @ibm/$releasever python3-pyodbc.ppc64 4.0.27-0 @ibm python3-pytz.noarch 2018.5-3 @ibm python3-pyyaml.ppc64 5.3.1-1 @ibm python3-pyzmq.ppc64 17.1.2-0 @ibm/7.3 python3-rpm.ppc64 4.13.0.1-18 @ibm python3-scikit-learn.ppc64 0.19.1-6 @ibm/7.3 python3-scipy.ppc64 1.1.0-0 @ibm/7.3 python3-setuptools.noarch 36.0.1-3 @ibm python3-six.noarch 1.10.0-1 @ibm python3-tkinter.ppc64 3.6.9-2 @ibm python3-wheel.noarch 0.29.0-3 @ibm
BTW I checked both 7.4 LPARs for the PTF your article mentioned:
MF65746 Permanently applied
on one LPAR, but not present on the other LPAR. In any case, both result the same.
-
Account Deactivated both python3 and python3-tkinter on my system is 3.6.10-3. Can you try upgrade python3-tkinter firstly?
And also , please help to check tcl and tk on your system as below:
yum list installed|grep tcl
yum list installed|grep tk -
reporter Updated. Trying …
$ yum list installed | grep tk python3-tkinter.ppc64 3.6.12-1 @ibm tk.ppc64 8.6.8-3 @ibm tk-devel.ppc64 8.6.8-3 @ibm $ yum list installed | grep tcl tcl.ppc64 8.6.8-3 @ibm tcl-devel.ppc64 8.6.8-3 @ibm
-
reporter Same result. Core dumped.
-
Account Deactivated hmmm. I would like to check the vlog generated by the core dump. You can help to collect the vlog 4700/0012 generated when the error occur.
-
reporter I am not sure how to do that.
-
Account Deactivated if you do not want a formal CPS, then, you can try :
STRDST , option 1, 5 , 1(for display) and 2(for dump).and then you can collect the spool files dumped .
-
reporter Hmm, well, I do not have that level of access on either LPAR.
Thank you for your assistance. -
Account Deactivated Do you know the power chip type of your LPAR?
-
reporter
8286-41A EPX0
That’s a Power8 https://www.ibm.com/support/knowledgecenter/POWER8/p8hdx/8286_41a_landing.htm
-
Account Deactivated My system is also P8. and works fine.
Did you try to upgrade the python3 as well?
-
reporter $ python --version Python 3.6.12
-
@Jack Woehr , are you daring enough go grab a stack trace from the core dump via
gdb
or has this whole environment poofed at this point? -
reporter I could set that up, but it’s not going to happen today.
-
reporter Tried to install gdb on 7.4 and got this:
Downloading Packages: gdb-7.9.1-4.ibmi7.2.ppc64.rpm | 8.2 MB 00:00:25 Running Transaction Check Transaction Check time: 0.070 Running Transaction Test Transaction Check Error: file /QOpenSys/pkgs/share/info/bfd.info from install of gdb-7.9.1-4.ppc64 conflicts with file from package binutils-gnu-2.32-3.ppc64
-
reporter Eh, binutils from qseco.fr, removed it and installed gdb from IBM repo.
Stack trace from tkinter crash:
GNU gdb (GDB) 7.9.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc64-ibm-aix6.1". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/JWOEHR/tk_dev/bin/python...done. warning: core file may not match specified executable file. Core was generated by `python3'. Program terminated with signal SIGILL, Illegal instruction. #0 0x0000000000000000 in ?? () (gdb) bt full #0 0x0000000000000000 in ?? () No symbol table info available. #1 0x0900000005f11bd0 in XmbTextExtents () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #2 0x0900000005f14fc0 in _GetStatusArea@AF11_4 () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #3 0x0900000005f14f20 in _aixStatusStartNothing () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #4 0x0900000005f0c634 in _aixIndDraw () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #5 0x0900000005f0d27c in IMStatusRefresh@AF17_3 () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #6 0x0900000005f0aac4 in _XaixSetToIM () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #7 0x0900000005f09bf0 in _XimAIXCreateIC () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #8 0x0900000005edaf20 in XCreateIC () from /QOpenSys/usr/lib/libX11.a(shr_64.o) No symbol table info available. #9 0x0900000005a84e10 in Tk_HandleEvent () from /QOpenSys/pkgs/lib/libtk8.6.so No symbol table info available. #10 0x0900000005a85108 in WindowEventProc () from /QOpenSys/pkgs/lib/libtk8.6.so No symbol table info available. #11 0x0900000005d4f038 in Tcl_ServiceEvent () from /QOpenSys/pkgs/lib/libtcl8.6.so No symbol table info available. #12 0x0900000005d4f524 in Tcl_DoOneEvent () from /QOpenSys/pkgs/lib/libtcl8.6.so No symbol table info available. #13 0x0900000005a69470 in _tkinter_tkapp_mainloop () from /QOpenSys/pkgs/lib/python3.6/lib-dynload/_tkinter.so No symbol table info available. #14 0x0900000003e9407c in _PyCFunction_FastCallDict () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #15 0x0900000003e94590 in _PyCFunction_FastCallKeywords () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #16 0x0900000003e241b0 in call_function () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #17 0x0900000003e26764 in _PyEval_EvalFrameDefault () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #18 0x0900000003e22d90 in PyEval_EvalFrameEx () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #19 0x0900000003e23b50 in _PyEval_EvalCodeWithName () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #20 0x0900000003e23d38 in fast_function () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #21 0x0900000003e24098 in call_function () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #22 0x0900000003e26764 in _PyEval_EvalFrameDefault () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #23 0x0900000003e22d90 in PyEval_EvalFrameEx () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #24 0x0900000003e23b50 in _PyEval_EvalCodeWithName () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #25 0x0900000003e24340 in PyEval_EvalCodeEx () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #26 0x0900000003e243bc in PyEval_EvalCode () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #27 0x0900000003e54d54 in run_mod () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #28 0x0900000003e5872c in PyRun_FileExFlags () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #29 0x0900000003e58984 in PyRun_SimpleFileExFlags () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #30 0x0900000003e58fec in PyRun_AnyFileExFlags () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #31 0x0900000003f59304 in Py_Main () from /QOpenSys/pkgs/lib/libpython3.6m.so No symbol table info available. #32 0x00000001000006f4 in main (argc=2, argv=0xffffffffffffaa0) at ./Programs/python.c:69 argv_copy = 0x18000e2d0 argv_copy2 = 0x18000e310 i = 2 res = -1376 oldloc = <incomplete type> (gdb) info threads Id Target Id Frame * 1 process 1 0x0000000000000000 in ?? () (gdb) quit
-
@Jack Woehr was able to load this onto the COMMON demo system for others with creds to be able to access and recreate.
I observed the following, when I had X enabled:
Launching of
xterm
itself failed with two warnings coming from X font initialization (much like the tkinter failure here):Preparation of font set "*" for XIM failed. Preparation of default font set "*" for XIM failed.
Launching of
aixterm
had similar behavior, with two warnings related to font-loading failures1363-009 The aixterm command cannot open font -dt-interface user-medium-r-normal-l*-*-*-*-*-*-*-*-*. 1363-009 The aixterm command cannot open font -*-roman-medium-r-normal--8-50-100-100-c-*-ISO8859-1.
So, I suspect at a minimum, all three failures (tkinter, aixterm, and xterm) have the same root cause. I also suspect that aixterm and xterm have some way of handling so that this failure is non-fatal, but not so for tkinter. This is just a hunch, not supported by advanced debugging.
I also observe that 5770SS1 option 43 is installed on my systems where the tkinter sample works, but is not installed on the COMMON demo system. @Jack Woehr , what’s the status of option 43 on the other system where this tkinter sample crashes?
-
reporter
Display Installed Licensed Programs System: MYSYS Licensed Product Program Option Description 5770SS1 43 Additional Fonts
-
From the backtrace, the problem occurs due to calling a null function pointer. I’m not sure exactly how this would occur. I cannot recreate the bug on 7.2 where 5770SS1 option 43 is not installed, so I suspect that is not the problem. Could be a bug in the X11 libraries shipped in PASE that only affects the 7.4 version. Now that we have X11 libraries from X.org, we should rebuild TKinter with those instead.
-
reporter Thanks Kevin, will be interested to see results of that rebuild.
-
- changed status to closed
This issue tracker is no longer in use. if this is still an issue for you, please open a new issue at https://github.com/IBM/ibmi-oss-issues
- Log in to comment
Even simpler: