[Debian-science-sagemath] GAP: issue related to compressed manual.six: PATCHES

Jerome BENOIT calculus at rezozer.net
Wed Dec 7 01:10:24 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello Ximin, can you strace ?

On 07/12/16 00:27, Ximin Luo wrote:
> Ximin Luo:
>> Ximin Luo:
>>> Bill Allombert:
>>>> On Tue, Dec 06, 2016 at 01:01:00PM +0000, Ximin Luo wrote:
>>>>> Bill Allombert:
>>>>> Hi all,
>>>>>
>>>>> Sorry I only just briefly scanned through the thread now. However I
>>>>> found this post relating to gzip, pipes and python:
>>>>>
>>>>> https://blog.nelhage.com/2010/02/a-very-subtle-bug/
>>>>>
>>>>> which summarises the bug report here: https://bugs.python.org/issue1652
>>>>
>>>> Yes, this is exactly the problem, and it seems it has been fixed in python 3,
>>>> but not in python 2.7.
>>>>
>>>
>>> Ok, good to know! The blog post also contains a work-around near the end, which is to add
>>>
>>>   preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)
>>>
>>> as a parameter to the relevant Popen call. Presumably in this case it's wherever Sage calls GAP. Jerome, could you test?
>>>
>>
>> Hi Bill,
>>
>> I'm not sure if the above bug is the cause of this issue. I tried to reproduce it without Sage:
>>
>> $ apt-cache policy gap
>> gap:
>>   Installed: 4r8p6-1
>>   Candidate: 4r8p6-1+sage17
>>   Version table:
>>      4r8p6-1+sage17 500
>>         500 https://debian-science.alioth.debian.org/apt sid-sage/ Packages
>>  *** 4r8p6-1 500
>>         500 http://httpredir.debian.org/debian testing/main amd64 Packages
>>         500 http://httpredir.debian.org/debian unstable/main amd64 Packages
>>         100 /var/lib/dpkg/status
>>
>> $ python -c 'import subprocess; subprocess.Popen(["gap", "-q"], stdin=subprocess.PIPE).communicate("?SymmetricGroup")'
>>
>> gzip: stdout: Broken pipe
>> Help: several entries match this topic - type ?2 to get match [2]
>>
>> [1] Reference: SymmetricGroup
>> [2] Reference: SymmetricGroup (for a degree)
>> [3] Reference: SymmetricGroup (for a domain)
>>
>> $ python -c 'import signal, subprocess; subprocess.Popen(["gap", "-q"], stdin=subprocess.PIPE,   preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)).communicate("?SymmetricGroup")'
>> Help: several entries match this topic - type ?2 to get match [2]
>>
>> [1] Reference: SymmetricGroup
>> [2] Reference: SymmetricGroup (for a degree)
>> [3] Reference: SymmetricGroup (for a domain)
>>
>> So as you can see, the bug is only to do with the extra "Broken pipe" error messages. 
> 
> And in fact, if I patch src/sysfiles.c to say "gzip 2>/dev/null -cd " instead of "gunzip " then the "Broken pipe" messages go away.
> 
> The below Sage/GAP error still occurs, though:
> 
>> However Sage fails in a different way:
>>
>> $ ./sage -c 'gap.help('SymmetricGroup', pager=False)' 
>>> /usr/lib/python2.7/dist-packages/ptyprocess/ptyprocess.py(220)spawn()
>> -> if use_native_pty_fork:
>> (Pdb) c
>>> /usr/lib/python2.7/dist-packages/ptyprocess/ptyprocess.py(220)spawn()
>> -> if use_native_pty_fork:
>> (Pdb) c
>> #W  corrupted 'manual.six': ##W (in stream: InputTextFile(/usr/share/gap/doc/t\
>> ut/manual.six))
>> #W  corrupted 'manual.six': ##W (in stream: InputTextFile(/usr/share/gap/doc/c\
>> hanges/manual.six))
>> #W  corrupted 'manual.six': ##W (in stream: InputTextFile(/usr/share/gap/pkg/G\
>> APDoc/example/manual.six))
>> Help: no matching entry found
>>
> 

- -- 
Jerome BENOIT | calculus+at-rezozer^dot*net
https://qa.debian.org/developer.php?login=calculus@rezozer.net
AE28 AE15 710D FF1D 87E5  A762 3F92 19A6 7F36 C68B
-----BEGIN PGP SIGNATURE-----

iQQcBAEBCgAGBQJYR2F/AAoJED+SGaZ/NsaLmsgf/iApRccFu1xSil7p7Pu2y2Ed
gYlaXzqYhMjELbKYb2dWok8NRO84NeOAK62YX9K2mb28MUsXgBXzC1XHzXT8SVJy
Y3EwvvmlpZE7Pr6ULavAXud/lL65u+3VPP+rv+e4esdEnE0DfQmoAAhi6t+oRPsU
M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