apt-get upgrade breaks python3
#1
was using rock64 for python3 development, but after running 
apt-get update
apt-get upgrade

notice that running python3 just gives me segmentation fault

anyone had this experience on debian stretcg python3.5?

root@rock64:/mnt/home/rock64# uname -a
Linux rock64 4.4.77-rockchip-ayufan-136 #1 SMP Thu Oct 12 09:14:48 UTC 2017 aarch64 GNU/Linux
root@rock64:/mnt/home/rock64# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
  Reply
#2
reinstalled debian stretch 4.4.77 and did a
apt-get update -y
apt-get install linux-rock64 -y (instead of pt-get upgrade)

then ran the following python

root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118]
2.1335  ['[x ** 2 for x in range(1000)]']
2.5179  ['res=[]\nfor x in range(1000): res.append(x ** 2)']
3.0498  ['list(map(lambda x: x ** 2, range(1000)))']
2.3948  ['list(x ** 2 for x in range(1000))']
4.7236  ["s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"]
6.6688  ["s = '?'\nfor i in range(10000): s += '?'"]
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# cat pybench_cases.py
"""
pybench_cases.py: Run pybench on a set of pythons and statements.

Select modes by editing this script or using command-line arguments (in
sys.argv): e.g., run a "C:\python27\python pybench_cases.py" to test just
one specific version on stmts, "pybench_cases.py -a" to test all pythons
listed, or a "py -3 pybench_cases.py -a -t" to trace command lines too.
"""

import pybench, sys

pythons = [                                                         # (ispy3?, path)
   (1, 'C:\python33\python'),
   (0, 'C:\python27\python'),
   (0, 'C:\pypy\pypy-1.9\pypy')
]

stmts = [                                                           # (num,rpt,stmt)
   (0, 0, "[x ** 2 for x in range(1000)]"),                        # Iterations                        
   (0, 0, "res=[]\nfor x in range(1000): res.append(x ** 2)"),     # \n=multistmt
   (0, 0, "$listif3(map(lambda x: x ** 2, range(1000)))"),         # \n\t=indent
   (0, 0, "list(x ** 2 for x in range(1000))"),                    # $=list or ''
   (0, 0, "s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"),  # String ops
   (0, 0, "s = '?'\nfor i in range(10000): s += '?'"),
]

tracecmd = '-t' in sys.argv                           # -t: trace commmand lines?
pythons  = pythons if '-a' in sys.argv else None      # -a: all in list, else one?
pybench.runner(stmts, pythons, tracecmd)

it gives Segmentation Fault first 2 times i try to run but on 3rd try runs fine
  Reply
#3
switched over to xenial and no longer have problems with python3

root@rock64:~# uname -a
Linux rock64 4.4.77-rockchip-ayufan-136 #1 SMP Thu Oct 12 09:14:48 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
root@rock64:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"

more good news was able to install pip & upgrade it successfully on xenial minimal with kernel 4.4.77

apt-get install python3-pip
pip3 install --upgrade pip
  Reply
#4
What did you use before? Bionic? Bionic is still not released and in beta, so if you find issues there, report them to the Ubuntu upstream bugtracker...
Come have a chat in the Pine IRC channel >>
  Reply
#5
(03-31-2018, 07:23 AM)xalius Wrote: What did you use before? Bionic? Bionic is still not released and in beta, so if you find issues there, report them to the Ubuntu upstream bugtracker...

debian stretch Wink  So I'm guessing it was an 'old' bug in a python C library that has since been resolved...
  Reply
#6
also did try this with python3

https://github.com/ayufan-rock64/linux-b...m64.img.xz

but is this release of xenial is broken in regard to python3, so went back to 0.5.15: jenkins-linux-build-rock-64-136 which seems to work fine.
also did try artful but had lots of issues.
  Reply
#7
just tried bionic prebuild with perl and python3 and works fine

https://github.com/ayufan-rock64/linux-b...mhf.img.xz

so the 2 builds i've had the best luck with for python3 are:

release xenial-minimal-rock64-0.5.15-136-armhf.img.xz
prerelease bionic-minimal-rock64-0.6.30-208-armhf.img.xz

debian stetch in general seems broken with python3?
  Reply
#8
same problem here.

Is there any way to fix it?

The upgrade that broke it instralled these things (taken from /var/log/apt/history.log):


Install:
linux-headers-4.4.120-rockchip-ayufan-208:arm64 (0.6.30, automatic),
linux-image-4.4.120-rockchip-ayufan-208:arm64 (0.6.30, automatic),
device-tree-compiler:arm64 (1.4.2-1, automatic),
debsums:arm64 (2.2.2, automatic),
u-boot-rock64:arm64 (0.6.30, automatic),
libfile-fnmatch-perl:arm64 (0.02-2+b3, automatic)

Upgrade:
openssl:arm64 (1.1.0f-3+deb9u1, 1.1.0f-3+deb9u2),
libsystemd0:arm64 (232-25+deb9u2, 232-25+deb9u3),
libicu57:arm64 (57.1-6+deb9u1, 57.1-6+deb9u2),
udev:arm64 (232-25+deb9u2, 232-25+deb9u3),
libudev1:arm64 (232-25+deb9u2, 232-25+deb9u3),
systemd-sysv:arm64 (232-25+deb9u2, 232-25+deb9u3),
linux-rock64:arm64 (0.6.25, 0.6.30),
libpam-systemd:arm64 (232-25+deb9u2, 232-25+deb9u3),
systemd:arm64 (232-25+deb9u2, 232-25+deb9u3),
linux-rock64-package:arm64 (0.6.25, 0.6.30),
libssl1.1:arm64 (1.1.0f-3+deb9u1, 1.1.0f-3+deb9u2),
libssl1.0.2:arm64 (1.0.2l-2+deb9u2, 1.0.2l-2+deb9u3),
tzdata:arm64 (2018c-0+deb9u1, 2018d-0+deb9u1)
  Reply
#9
downgrading the kernel to 

  linux-image-4.4.77-rockchip-ayufan-136

seems to make the problem disappear. Also with 4.4.114-rockchip-ayufan-193 it seems to have worked, that was the version I have been using for a few months now, only today when I upgraded from -193 to -208 it broke. So it must somehow be related to something that changed in the kernel.

It also segfaulted not always immediately and not deterministically, in 2 out of 5 attempts it was possible to start a python shell without segfault before the prompt but trying to run a script was still impossible.
  Reply
#10
I use latest pre-release img,
stretch-minimal-rock64-0.6.32-210-arm64.img.xz
Segmentation fault also come up with high probability.
I'm not sure if this issue is only show in arm64 while works fine in armhf.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Swap/Upgrade Storage Device? r00t3d 0 835 08-17-2022, 06:11 AM
Last Post: r00t3d
  Arch Linux Arm --> Kernel 5.8 breaks installation as365n4 12 13,699 08-31-2020, 01:41 AM
Last Post: as365n4
  Rock64 bricked after upgrade jean_bruder 7 8,451 04-02-2020, 09:27 AM
Last Post: tophneal
  how to upgrade? skipper 0 2,109 06-10-2019, 02:07 AM
Last Post: skipper
  Should I Upgrade? MotoTom 1 2,868 10-03-2018, 08:39 PM
Last Post: netadmin90
  Rock64 no longer boots after dist-upgrade KernelPanic 9 10,776 06-16-2018, 11:03 AM
Last Post: KernelPanic
  canNOT boot after a normal apt upgrade cooker 2 3,675 05-28-2018, 12:35 PM
Last Post: zaflaucich
Photo Failure to upgrade will be wrong ycllwl 1 2,492 03-26-2018, 12:53 PM
Last Post: xalius
  bionic upgrade errors 6.25 193 noob 0 2,200 03-17-2018, 01:35 PM
Last Post: noob
  How to upgrade nice 3 5,486 11-03-2017, 11:49 AM
Last Post: easyfab

Forum Jump:


Users browsing this thread: 1 Guest(s)