5969 update illumos-gate to use python2.7

Review Request #213 - Created Sept. 6, 2016 and updated

Information
Alexander Pyhalov
illumos-gate
Reviewers
general

Currently illumos-gate depends on outdated python 2.6. We'd like to fix it, but preserve ability to use it when really needed.

Removed python 2.6 support from OI ips version, updated system to illumos-gate compiled with python 2.7, booted GUI.
Run mdb and pstack on core produced by simple python 2.7 program.

$ mdb core 
Loading modules: [ libc.so.1 libpython2.7.so.1.0 ld.so.1 ]
> $C
080474c8 libc.so.1`__write+0x15(1, fef782e4, 2, fe9c8920, 80622e8, 1)
08047508 libc.so.1`_xflsbuf+0xcf(fef6fc10, fed995da, 1, fedb1000, fe9c8920, 
feb6caac)
08047558 libc.so.1`fputs+0x17d(fed995da, fef6fc10, 8047598, fec860dc, fedb1000, 
fe9c762b)
08047598 libpython2.7.so.1.0`PyFile_WriteString+0x6b(fed995da, febd9078, 1, 0)
08047668 libpython2.7.so.1.0`PyEval_EvalFrameEx+0x2845(feb6caac, 0, febe5714, 
febe5714)
080476c8 libpython2.7.so.1.0`PyEval_EvalCodeEx+0x768(feb3fd10, febe5714, 
febe5714, 0, 0, 0)
08047708 libpython2.7.so.1.0`PyEval_EvalCode+0x2e(feb3fd10, febe5714, febe5714, 
8064e50, feca73a9, febe5714)
08047758 libpython2.7.so.1.0`PyRun_InteractiveOneFlags+0x14d(fef6fc00, fed9b476
, 804782c, e00ffff)
080477a8 libpython2.7.so.1.0`PyRun_InteractiveLoopFlags+0x5d(fef6fc00, fed9b476
, 804782c, 80477cc, 4bf0005, 3008a3b)
080477d8 libpython2.7.so.1.0`PyRun_AnyFileExFlags+0x40(fef6fc00, fed9b476, 0, 
804782c)
080478d8 libpython2.7.so.1.0`Py_Main+0xcff(1, 8047960, 0, 0)
08047928 main+0x6b(804791c, fef786e8, 8047954, 8050d33, 1, 8047960)
08047954 _start+0x83(1, 8047a9c, 0, 8047aa3, 8047ac1, 8047acc)

$ pstack core
 pstack core 
core 'core' of 1785:    python
 fef00645 __write  (1, fef782e4, 2, fe9c8920, 80622e8, 1) + 15
 feecd93f _xflsbuf (fef6fc10, fed995da, 1, fedb1000, fe9c8920, feb6caac) + cf
 feece9dd fputs    (fed995da, fef6fc10, 8047598, fec860dc, fedb1000, fe9c762b) + 17d
 fec860eb PyFile_WriteString (fed995da, febd9078, 1, 0) + 6b
 fed154f5 PyEval_EvalFrameEx (feb6caac, 0, febe5714, febe5714) + 2845
   [ <stdin>:2 (<module>) ]
 fed1c6f8 PyEval_EvalCodeEx (feb3fd10, febe5714, febe5714, 0, 0, 0) + 768
 fed1c81e PyEval_EvalCode (feb3fd10, febe5714, febe5714, 8064e50, feca73a9, febe5714) + 2e
 fed4186d PyRun_InteractiveOneFlags (fef6fc00, fed9b476, 804782c, e00ffff) + 14d
 fed41aad PyRun_InteractiveLoopFlags (fef6fc00, fed9b476, 804782c, 80477cc, 4bf0005, 3008a3b) + 5d
 fed42350 PyRun_AnyFileExFlags (fef6fc00, fed9b476, 0, 804782c) + 40
 fed59bcf Py_Main  (1, 8047960, 0, 0) + cff
 08050f8b main     (804791c, fef786e8, 8047954, 8050d33, 1, 8047960) + 6b
 08050d33 _start   (1, 8047a9c, 0, 8047aa3, 8047ac1, 8047acc) + 83

pystack on killed IPS:

> ::pystack
PyThreadState: 080622e8
fc61502c engine.py:116 __call_perform()
ecd0860c engine.py:637 run()
ecd08494 fileobj.py:309 __fill_buffer()
ecd1b184 fileobj.py:344 __fill_headers()
ecd14cd4 fileobj.py:253 getheader()
ecd1634c repo.py:765 get_versions()
ecd0831c transport.py:2024 __get_version()
ecd194c4 transport.py:2045 __fill_repo_vers()
fc9d6adc transport.py:2189 __gen_repo()
0820dafc transport.py:914 get_catalog1()
fc6c2a3c transport.py:524 wrapper()
ecd0f02c publisher.py:1987 __refresh_v1()
fc738874 publisher.py:2114 __refresh_origin()
fc7a189c publisher.py:2162 __refresh()
ecd0732c publisher.py:2202 refresh()
fc7386cc image.py:3321 refresh_publishers()
fc6082fc api.py:618 __refresh_publishers()
fc7e0214 api.py:1430 __plan_op()
fdb66df4 client_api.py:1285 __api_plan()
0827eefc client_api.py:1442 __api_op()
082898a4 client_api.py:1554 _install()
0817d934 pkg:2100 install()
fc7a7d14 pkg:5430 main_func()         
fc83a7d4 pkg:5444 handle_errors()
feb6892c pkg:5616 <module>()

Was able to build it with Python 2.6 (export PYTHON_VERSION="2.6",export PYTHON_PKGVERS=-26).
Made full debug/lint illumos-gate build on updated system.

Alexander Pyhalov
Andrew Stormont
Alexander Pyhalov
Alexander Pyhalov
Albert Lee
Andrew Stormont
Alexander Pyhalov
Adam Števko
Gordon Ross
Yuri Pankov

looks like this is already integrated?

Loading...