Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With 3.6.3 the test testCompileFile throws segmentation fault on s390x architecture #54

Closed
xambroz opened this issue Jul 18, 2017 · 2 comments

Comments

@xambroz
Copy link

xambroz commented Jul 18, 2017

Hello,
with the version 3.6.x (3.6.3 to be precise) the test testCompileFile throws segmentation fault on the s390x architecture.
This might or might not be related to issues with tests failing randomly on ppc and s390x architecture as reported in the issue #25

https://kojipkgs.fedoraproject.org//work/tasks/9619/20589619/build.log
This test testCompileFile was working fine with the version 3.5.0 on s390x platform.

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.VEYfW8
+ umask 022
+ cd /builddir/build/BUILD
+ cd yara-python-3.6.3
+ EXCLUDE=
+ EXCLUDE='--exclude=^testModuleData$|^testEntrypoint$|^testIn$|^testIntegerFunctions$'
++ ls /usr/bin/nosetests-2.7
+ NOSETESTS2=/usr/bin/nosetests-2.7
+ PYTHONPATH=/builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x//usr/lib64/python2.7/site-packages/
+ /usr/bin/nosetests-2.7 -v '--exclude=^testModuleData$|^testEntrypoint$|^testIn$|^testIntegerFunctions$'
testAnonymousStrings (tests.TestYara) ... ok
testArithmeticOperators (tests.TestYara) ... ok
testAt (tests.TestYara) ... ok
testBitwiseOperators (tests.TestYara) ... ok
testBooleanOperators (tests.TestYara) ... ok
testCallback (tests.TestYara) ... ok
testComments (tests.TestYara) ... ok
testCompare (tests.TestYara) ... ok
testComparisonOperators (tests.TestYara) ... ok
testCompileFile (tests.TestYara) ... /var/tmp/rpm-tmp.VEYfW8: line 43: 21200 Segmentation fault      (core dumped) PYTHONPATH=/builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x//usr/lib64/python2.7/site-packages/ "$NOSETESTS2" -v "$EXCLUDE"
error: Bad exit status from /var/tmp/rpm-tmp.VEYfW8 (%check)

@xambroz
Copy link
Author

xambroz commented Jul 18, 2017

Whole build log from https://kojipkgs.fedoraproject.org//work/tasks/9619/20589619/build.log

Mock Version: 1.3.4
Mock Version: 1.3.4
ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target s390x --nodeps /builddir/build/SPECS/python-yara.spec'], chrootPath='/var/lib/mock/f27-build-9143413-769407/root'timeout=172800gid=425printOutput=Falsenspawn_args=[]uid=1000logger=<mockbuild.trace_decorator.getLog object at 0x3ffaaae2668>user='mockbuild'env={'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"'}shell=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target s390x --nodeps /builddir/build/SPECS/python-yara.spec'] with env {'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"'} and shell False
Building target platforms: s390x
Building for target s390x
Wrote: /builddir/build/SRPMS/python-yara-3.6.3-2.fc27.src.rpm
Child return code was: 0
ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target s390x --nodeps /builddir/build/SPECS/python-yara.spec'], chrootPath='/var/lib/mock/f27-build-9143413-769407/root'timeout=172800gid=425printOutput=Falsenspawn_args=[]uid=1000logger=<mockbuild.trace_decorator.getLog object at 0x3ffaaae2668>user='mockbuild'env={'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"'}shell=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target s390x --nodeps /builddir/build/SPECS/python-yara.spec'] with env {'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"'} and shell False
Building target platforms: s390x
Building for target s390x
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nfbE3g
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf yara-python-3.6.3
+ /usr/bin/gzip -dc /builddir/build/SOURCES/python-yara-3.6.3.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd yara-python-3.6.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.O1C8In
+ umask 022
+ cd /builddir/build/BUILD
+ cd yara-python-3.6.3
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13'
+ /usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s' --dynamic-linking
running build
running build_ext
building 'yara' extension
creating build
creating build/temp.linux-s390x-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 -fPIC -DHAVE_MEMMEM=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python2.7 -c yara-python.c -o build/temp.linux-s390x-2.7/yara-python.o
creating build/lib.linux-s390x-2.7
gcc -pthread -shared -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 build/temp.linux-s390x-2.7/yara-python.o -L/usr/lib64 -lyara -lpython2.7 -o build/lib.linux-s390x-2.7/yara.so
+ sleep 1
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13'
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' --dynamic-linking
running build
running build_ext
building 'yara' extension
creating build/temp.linux-s390x-3.6
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 -fPIC -DHAVE_MEMMEM=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.6m -c yara-python.c -o build/temp.linux-s390x-3.6/yara-python.o
creating build/lib.linux-s390x-3.6
gcc -pthread -shared -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13 build/temp.linux-s390x-3.6/yara-python.o -L/usr/lib64 -lyara -lpython3.6m -o build/lib.linux-s390x-3.6/yara.cpython-36m-s390x-linux-gnu.so
+ sleep 1
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.F3oDTI
+ umask 022
+ cd /builddir/build/BUILD
+ '[' /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x '!=' / ']'
+ rm -rf /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x
++ dirname /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x
+ mkdir -p /builddir/build/BUILDROOT
+ mkdir /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x
+ cd yara-python-3.6.3
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13'
+ /usr/bin/python2 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x
running install
running install_lib
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7/site-packages
copying build/lib.linux-s390x-2.7/yara.so -> /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7/site-packages
writing byte-compilation script '/tmp/tmpHQRIyy.py'
/usr/bin/python2 -O /tmp/tmpHQRIyy.py
removing /tmp/tmpHQRIyy.py
running install_egg_info
running egg_info
creating yara_python.egg-info
writing yara_python.egg-info/PKG-INFO
writing top-level names to yara_python.egg-info/top_level.txt
writing dependency_links to yara_python.egg-info/dependency_links.txt
writing manifest file 'yara_python.egg-info/SOURCES.txt'
reading manifest file 'yara_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'yara/libyara/modules/module_list'
warning: no files found matching '*.c' under directory 'yara'
warning: no files found matching '*.h' under directory 'yara'
writing manifest file 'yara_python.egg-info/SOURCES.txt'
Copying yara_python.egg-info to /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7/site-packages/yara_python-3.6.3-py2.7.egg-info
running install_scripts
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -march=zEC12 -mtune=z13'
+ /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x
running install
running install_lib
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6
creating /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6/site-packages
copying build/lib.linux-s390x-3.6/yara.cpython-36m-s390x-linux-gnu.so -> /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6/site-packages
writing byte-compilation script '/tmp/tmpaez2o5lo.py'
/usr/bin/python3 /tmp/tmpaez2o5lo.py
removing /tmp/tmpaez2o5lo.py
running install_egg_info
running egg_info
writing yara_python.egg-info/PKG-INFO
writing dependency_links to yara_python.egg-info/dependency_links.txt
writing top-level names to yara_python.egg-info/top_level.txt
reading manifest file 'yara_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'yara/libyara/modules/module_list'
warning: no files found matching '*.c' under directory 'yara'
warning: no files found matching '*.h' under directory 'yara'
writing manifest file 'yara_python.egg-info/SOURCES.txt'
Copying yara_python.egg-info to /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6/site-packages/yara_python-3.6.3-py3.6.egg-info
running install_scripts
+ /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m --build-id-seed 3.6.3-2.fc27 --unique-debug-suffix -3.6.3-2.fc27.s390x --unique-debug-src-base python-yara-3.6.3-2.fc27.s390x --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 /builddir/build/BUILD/yara-python-3.6.3
extracting debug info from /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7/site-packages/yara.so
extracting debug info from /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6/site-packages/yara.cpython-36m-s390x-linux-gnu.so
/usr/lib/rpm/sepdebugcrcfix: Updated 2 CRC32s, 0 CRC32s did match.
97 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python2.7 using /usr/bin/python2.7
Bytecompiling .py files below /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib64/python3.6 using /usr/bin/python3.6
Bytecompiling .py files below /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib/debug/usr/lib64/python2.7 using /usr/bin/python2.7
Bytecompiling .py files below /builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x/usr/lib/debug/usr/lib64/python3.6 using /usr/bin/python3.6
+ /usr/lib/rpm/brp-python-hardlink
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.VEYfW8
+ umask 022
+ cd /builddir/build/BUILD
+ cd yara-python-3.6.3
+ EXCLUDE=
+ EXCLUDE='--exclude=^testModuleData$|^testEntrypoint$|^testIn$|^testIntegerFunctions$'
++ ls /usr/bin/nosetests-2.7
+ NOSETESTS2=/usr/bin/nosetests-2.7
+ PYTHONPATH=/builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x//usr/lib64/python2.7/site-packages/
+ /usr/bin/nosetests-2.7 -v '--exclude=^testModuleData$|^testEntrypoint$|^testIn$|^testIntegerFunctions$'
testAnonymousStrings (tests.TestYara) ... ok
testArithmeticOperators (tests.TestYara) ... ok
testAt (tests.TestYara) ... ok
testBitwiseOperators (tests.TestYara) ... ok
testBooleanOperators (tests.TestYara) ... ok
testCallback (tests.TestYara) ... ok
testComments (tests.TestYara) ... ok
testCompare (tests.TestYara) ... ok
testComparisonOperators (tests.TestYara) ... ok
testCompileFile (tests.TestYara) ... /var/tmp/rpm-tmp.VEYfW8: line 43: 21200 Segmentation fault      (core dumped) PYTHONPATH=/builddir/build/BUILDROOT/python-yara-3.6.3-2.fc27.s390x//usr/lib64/python2.7/site-packages/ "$NOSETESTS2" -v "$EXCLUDE"
error: Bad exit status from /var/tmp/rpm-tmp.VEYfW8 (%check)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.VEYfW8 (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 89, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 582, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target s390x --nodeps /builddir/build/SPECS/python-yara.spec

@xambroz
Copy link
Author

xambroz commented Mar 18, 2019

seems to be fixed in 3.9.0

@xambroz xambroz closed this as completed Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant