Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Anybody else sees this python3.4 update errors?  (Read 2532 times)

Offline ralul

  • User
  • Posts: 1.814
[EN] Anybody else sees this python3.4 update errors?
« on: 2015/12/24, 00:03:15 »
A long error output begins with:
xargs: invalid number for -s option

See bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807836
... at first I thought I had screwed up my Debian sid installation, because no one reported until I found the Debian bug report
experiencing siduction runs better than my gentoo makes me know I know nothing

wannek3

  • Guest
Re: Anybody else sees this python3.4 update errors?
« Reply #1 on: 2015/12/24, 09:59:51 »
No errors here, I did a d-u during the night.

$ apt-show-versions python3.4
python3.4:amd64/unstable 3.4.4-1 uptodate

(in the bug-report it's rc1-1 instead of -1)

$ locale
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
...
$ xargs --show-limit
Your environment variables take up 3462 bytes
POSIX upper limit on argument length (this system): 2091642
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2088180
Size of command buffer we are actually using: 131072

Offline ralul

  • User
  • Posts: 1.814
Re: Anybody else sees this python3.4 update errors?
« Reply #2 on: 2015/12/25, 10:58:27 »
Yes, that bug was identified a zshell issue. But I use bash:
Code: [Select]
# LANG=C LANGUAGE=C apt-get --reinstall  install libpython3.4-stdlib
Reading package lists... Done
Building dependency tree
Reading state information... Done                                 
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
Need to get 0 B/2.138 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 178255 files and directories currently installed.)
Preparing to unpack .../libpython3.4-stdlib_3.4.4-1_amd64.deb ...
xargs: invalid number for -s option
Usage: xargs [OPTION]... COMMAND [INITIAL-ARGS]...
Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.
                                                                                                                                                                                             
Mandatory and optional arguments to long options are also
mandatory or optional for the corresponding short option.
  -0, --null                   items are separated by a null, not .....
following a xarg help screen, ending
Code: [Select]
...
     --version                output version information and exit
Report bugs to <bug-findutils@gnu.org>.
Unpacking libpython3.4-stdlib:amd64 (3.4.4-1) over (3.4.4-1) ...
Setting up libpython3.4-stdlib:amd64 (3.4.4-1) ...
Allthough this looks totally same as in that bug I found ...

Code: [Select]
# LANG=C LANGUAGE=C xargs --show-limit
Your environment variables take up 453 bytes
POSIX upper limit on argument length (this system): 2094651
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2094198
Size of command buffer we are actually using: 131072
Maximum parallelism (--max-procs must be no greater): 2147483647
i am lost ... what is my issue?
« Last Edit: 2015/12/25, 11:12:55 by ralul »
experiencing siduction runs better than my gentoo makes me know I know nothing

wannek3

  • Guest
Re: Anybody else sees this python3.4 update errors?
« Reply #3 on: 2015/12/25, 11:38:23 »
That, too, works here (also bash). Although it took longer than 10 sec with lots of hdd traffic.

Code: [Select]
# LANG=C LANGUAGE=C apt-get --reinstall  install libpython3.4-stdlib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/2138 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 452617 files and directories currently installed.)
Preparing to unpack .../libpython3.4-stdlib_3.4.4-1_amd64.deb ...
Unpacking libpython3.4-stdlib:amd64 (3.4.4-1) over (3.4.4-1) ...
Setting up libpython3.4-stdlib:amd64 (3.4.4-1) ...

 I have no idea what could go wrong, sorry.

But did the install itself really go wrong, because your last lines
Quote
Unpacking libpython3.4-stdlib:amd64 (3.4.4-1) over (3.4.4-1) ...
Setting up libpython3.4-stdlib:amd64 (3.4.4-1) ...
do not look like a real error?

Offline ralul

  • User
  • Posts: 1.814
Re: Anybody else sees this python3.4 update errors?
« Reply #4 on: 2015/12/25, 22:31:03 »
@wannek3
at first very thanks for your care
and  non-confirmation of my problem:
Means, i guess,
nevertheless it these python packages install,
but a hook of my system (mime, python wrapper, alternatives wrapper)
has a problem ....

I probably need to --verbose or  --debug install to find the problematic script.
... I never done that.
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline ralul

  • User
  • Posts: 1.814
Re: Anybody else sees this python3.4 update errors?
« Reply #5 on: 2015/12/26, 00:29:28 »
I have looked into the package and found a broken Script:
DEBIAN/prerm
containging a function which is called whenever remove or upgrade is called
Code: [Select]
remove_bytecode()
{
    pkg=$1
    max=$(LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk '/Maximum/ {print int($NF / 4)}')
    dpkg -L $pkg \
        | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}' \
        | xargs --max-chars="$max" echo \
        | while read files; do rm -f $files; done
    # source and bytecode filename mismatch
    rm -f /usr/lib/python3.4/__pycache__/__phello__.cpython-*.py*
    find /usr/lib/python3 /usr/lib/python3.4 \
        \( -name dist-packages -prune \) -o \
        \( -name __pycache__ -type d -empty -print \) \
        | xargs -r rm -rf
}
The bloody stupid is the "max" defining macro, which for me finds two numbers:
Code: [Select]
# echo $(LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk '/Maximum/ {print int($NF / 4)}')
521829 536870911
because there are two lines containing "Maximum":
Code: [Select]
# LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1
Your environment variables take up 3893 bytes
POSIX upper limit on argument length (this system): 2091211
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2087318
Size of command buffer we are actually using: 131072
Maximum parallelism (--max-procs must be no greater): 2147483647

In effect when upgrading the old precompiled python code keeps staying alive.

« Last Edit: 2015/12/26, 01:06:16 by ralul »
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline ralul

  • User
  • Posts: 1.814
Re: Anybody else sees this python3.4 update errors?
« Reply #6 on: 2015/12/26, 01:17:18 »
In the bug mentioned above one email explained my case already:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807836#20
but nobody read or understood.

I guess more people are affected but some apt option hides this bug.
experiencing siduction runs better than my gentoo makes me know I know nothing

wannek3

  • Guest
Re: Anybody else sees this python3.4 update errors?
« Reply #7 on: 2015/12/26, 11:11:04 »
Sorry, can't help more, here i get only
Code: [Select]
# echo $(LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk '/Maximum/ {print int($NF / 4)}')
522678
# LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1
Your environment variables take up 2195 bytes
POSIX upper limit on argument length (this system): 2092909
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2090714
Size of command buffer we are actually using: 131072

I also checked on a cuda machine (not siduction, old kernel) and do also not get the second maximum output.

Offline ralul

  • User
  • Posts: 1.814
Re: Anybody else sees this python3.4 update errors?
« Reply #8 on: 2015/12/26, 13:09:25 »
@wannek3
Yes, you don't have the "Maximum" of parallel in your output. Look what is written in the post of the bug:
Code: [Select]
.....
-Maximum length of command we could actually use: 2092138
+Maximum length of command we could actually use: 2092140
 Size of command buffer we are actually using: 131072
+Maximum parallelism (--max-procs must be no greater): 2147483647

Note the additional "Maximum parallelism ..." line. That makes awk print 2
lines instead of one.
Suggested fix: use

awk '/Maximum length/ ...'

instead of

awk '/Maximum/ ...'

Cheers, Roderich
It is just a too short string for the match
experiencing siduction runs better than my gentoo makes me know I know nothing