Bug 221880 - lang/gcc5: py-numpy/python2.7 core dump on FreeBSD 11.1-RELEASE amd64
Summary: lang/gcc5: py-numpy/python2.7 core dump on FreeBSD 11.1-RELEASE amd64
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 11:54 UTC by Jov
Modified: 2019-08-18 13:44 UTC (History)
6 users (show)

See Also:


Attachments
tf_demo2.py (1.77 KB, text/plain)
2017-08-28 11:54 UTC, Jov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jov 2017-08-28 11:54:22 UTC
Created attachment 185841 [details]
tf_demo2.py

On fresh installed freebsd 11.1R-amd64:

pkg install py27-tensorflow
python2.7 ./tf_demo2.py 
WARNING:tensorflow:Using temporary folder as model directory: /tmp/tmpRJ_b3g
WARNING:tensorflow:From /usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/head.py:625: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /usr/local/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/estimators/head.py:625: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
Segmentation fault (core dumped)

gdb /usr/local/bin/python2.7 ./python2.7.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `python2.7 ./tf_demo2.py'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/local/lib/libpython2.7.so.1...done.
Loaded symbols for /usr/local/lib/libpython2.7.so.1
Reading symbols from /usr/local/lib/libintl.so.8...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /lib/libutil.so.9...done.
Loaded symbols for /lib/libutil.so.9
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_locale.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_locale.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_ctypes.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_ctypes.so
Reading symbols from /usr/local/lib/libffi.so.6...done.
Loaded symbols for /usr/local/lib/libffi.so.6
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_struct.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_struct.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/math.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/math.so
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
Reading symbols from /usr/local/lib/libblas.so.2...done.
Loaded symbols for /usr/local/lib/libblas.so.2
Reading symbols from /usr/local/lib/libcblas.so.2...done.
Loaded symbols for /usr/local/lib/libcblas.so.2
Reading symbols from /usr/local/lib/gcc5/libgfortran.so.3...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc5/libgfortran.so.3]
Reading symbols from /usr/local/lib/gcc5/libgcc_s.so.1...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc5/libgcc_s.so.1]
Reading symbols from /usr/local/lib/gcc5/libquadmath.so.0...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc5/libquadmath.so.0]
Reading symbols from /usr/local/lib/python2.7/lib-dynload/datetime.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/datetime.so
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/core/umath.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/core/umath.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_collections.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_collections.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/operator.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/operator.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/itertools.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/itertools.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_heapq.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_heapq.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/cPickle.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/cPickle.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/cStringIO.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/cStringIO.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_functools.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_functools.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/time.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/time.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/grp.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/grp.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_io.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_io.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/binascii.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/binascii.so
Reading symbols from /lib/libz.so.6...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_hashlib.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_hashlib.so
Reading symbols from /usr/lib/libssl.so.8...done.
Loaded symbols for /usr/lib/libssl.so.8
Reading symbols from /lib/libcrypto.so.8...done.
Loaded symbols for /lib/libcrypto.so.8
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_random.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_random.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/fcntl.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/fcntl.so
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
Reading symbols from /usr/local/lib/liblapack.so.4...done.
Loaded symbols for /usr/local/lib/liblapack.so.4
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/future_builtins.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/future_builtins.so
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
Reading symbols from /usr/local/lib/python2.7/site-packages/numpy/random/mtrand.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/numpy/random/mtrand.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
Reading symbols from /usr/lib/libc++.so.1...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /usr/local/lib/python2.7/lib-dynload/strop.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/strop.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/zlib.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/zlib.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_socket.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_socket.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_ssl.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_ssl.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_json.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_json.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/select.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/select.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/_cudnn_rnn_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/_cudnn_rnn_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/factorization/python/ops/_clustering_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/factorization/python/ops/_clustering_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/factorization/python/ops/_factorization_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/factorization/python/ops/_factorization_ops.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_csv.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_csv.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/input_pipeline/python/ops/_input_pipeline_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/input_pipeline/python/ops/_input_pipeline_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/_gru_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/_gru_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/_lstm_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/_lstm_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/image/python/ops/_image_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/image/python/ops/_image_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/image/python/ops/_single_image_random_dot_stereograms.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/image/python/ops/_single_image_random_dot_stereograms.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/array.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/array.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_bisect.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_bisect.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/_multiprocessing.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_multiprocessing.so
Reading symbols from /usr/local/lib/python2.7/lib-dynload/parser.so...done.
Loaded symbols for /usr/local/lib/python2.7/lib-dynload/parser.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/memory_stats/python/ops/_memory_stats_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/memory_stats/python/ops/_memory_stats_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/nccl/python/ops/_nccl_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/nccl/python/ops/_nccl_ops.so
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/seq2seq/python/ops/_beam_search_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/seq2seq/python/ops/_beam_search_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/ops/_tensor_forest_ops.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/ops/_tensor_forest_ops.so
Reading symbols from /usr/local/lib/python2.7/site-packages/tensorflow/contrib/tfprof/python/tools/tfprof/_pywrap_tensorflow_print_model_analysis_lib.so...done.
Loaded symbols for /usr/local/lib/python2.7/site-packages/tensorflow/contrib/tfprof/python/tools/tfprof/_pywrap_tensorflow_print_model_analysis_lib.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000803beac19 in ?? () from /usr/local/lib/gcc5/libgcc_s.so.1
(gdb) bt
#0  0x0000000803beac19 in ?? () from /usr/local/lib/gcc5/libgcc_s.so.1
#1  0x0000000000000000 in ?? ()
Comment 1 Jov 2017-08-28 12:01:47 UTC
I have tried to narrow the cause, so far get these result:

11.0R-amd64-ports_head OK
10.3R-amd64-ports_head OK

11.1R-amd64-ports_head coredump
11.1R-amd64-ports_2017q3 coredump
11.1R-amd64-ports_2017q3_build_tensorflow_with_clang38 coredump
11.1R-amd64-ports_head_build_tensorflow_with_clang38 coredump
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2017-09-15 10:57:03 UTC
Do you also get this with lang/gcc6 which is the new default?

It occurs to me there is something going on with FreeBSD 11.1?
Comment 3 Martin Birgmeier 2017-09-16 09:39:10 UTC
I have a hunch that building py-numpy with gcc produces bad code which leads to coredumps. For example, since several months I cannot build py-matplotlib consistently any more - on most machines it fails, on one it succeeds. And graphics/qgis always dies with a signal 11.

See bug #221622.

And yes, I have already upgraded to gcc6, and it is the same - py-matplotlib cannot be recompiled except on one machine, and graphics/qgis (freshly recompiled) dies with a signal 11 after a few seconds.

It would be interesting to have a py-numpy port which does not pull in gcc6 but rather uses the system's clang (which should be capable enough on 11.1).

As a first try, running

    python2.7 setup.py build -j 4 install --prefix /tmp/z

seems to compile o.k. (but not install due to complaints about PYTHONPATH).

So, could the maintained of py-numpy create a version of the port which does not use gcc?

-- Martin
Comment 4 Walter Schwarzenfeld 2019-08-18 10:27:16 UTC
Is this still relevant?
Comment 5 Martin Birgmeier 2019-08-18 12:20:40 UTC
Probably not, at least for me both py36-numpy as well as qgis are working now.

But Jov was the original submitter of this report.

-- Martin
Comment 6 Walter Schwarzenfeld 2019-08-18 13:44:16 UTC
Thanks for reply.

I guess it is solved and close here.

Jov:

If I am not right and there still problems, please reopen.