After upgrading from Debian Stretch to Bullseye (e.g. Python 3.5 → 3.9) we've got the following uWSGI segfault:
uWSGI process 314459 got Segmentation Fault !!!
*** backtrace of 314459 ***
/usr/bin/uwsgi(uwsgi_backtrace+0x2f) [0x558ed0a9b96f]
/usr/bin/uwsgi(uwsgi_segfault+0x23) [0x558ed0a9bd73]
/lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7fd71a9e0d60]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyErr_Occurred+0xe) [0x7fd7184d247e]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(+0x12d655) [0x7fd718586655]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(_PyType_Lookup+0x2d) [0x7fd71858678d]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(_PyObject_GenericGetAttrWithDict+0x4d) [0x7fd71856a73d]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(+0x1121c9) [0x7fd71856b1c9]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyObject_GetAttrString+0x3b) [0x7fd71856730b]
/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0(PyObject_HasAttrString+0x7) [0x7fd718567d87]
/usr/lib/uwsgi/plugins/python3_plugin.so(uwsgi_python_autoreloader_thread+0x179) [0x7fd718a04d19]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8ea7) [0x7fd71b2d3ea7]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fd71aaa2def]
*** end of backtrace ***
How can we find out what is causing this and how to fix the issue?
Disabling psycopg2 SSL mode does not help.
This line in the backtrace made me think that maybe the issue has something to do with automatic reloading:
/usr/lib/uwsgi/plugins/python3_plugin.so(uwsgi_python_autoreloader_thread+0x179) [0x7fd718a04d19]
Then I found this issue: https://github.com/unbit/uwsgi/issues/1968
As a workaround I disabled autoreload and the service recovered. According to this page autoreloading is only for development purposes.
I was trying to build uwsgi+django server. I need to build uwsgi python36_plugin.so for python3.6 using this command:
make PROFILE=nolang
PYTHON=python3 ./uwsgi --build-plugin "plugins/python python36"
It didn't work:
[root#izuf64a9gck81cz uwsgi-2.0.15]# PYTHON=python ./uwsgi --build-plugin "plugins/python python36"
*** uWSGI building and linking plugin from plugins/python ***
[gcc -pthread] python36_plugin.so
/usr/bin/ld: /usr/python3/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/python3/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
*** unable to build python36 plugin ***
When i use build python2.7 version,it turns out right
PYTHON=python2.7 ./uwsgi --build-plugin "plugins/python python27"
My problem is I have two version of python 3, the default python3 is python3.4, and the second one is python3.6, and I want to use python3.6 for some of my django project so I need to build the plugins and I got same problem you got.
It took me couple hours to solved this issue. Here is what I did from here:
Reconfigure my python3.6
cd Python-3.6.4/
./configure --enable-shared --enable-optimizations --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib"
Get in to your uwsgi folder and try to build again
PYTHON=python3.6 ./uwsgi --build-plugin "plugins/python python36"
Goodluck! May it solve your prob too!
I am trying to build NS3 on Raspbian (Jessie) and ran into this error:
...
[1507/1924] Compiling src/internet/model/ripng-header.cc
[1508/1924] Compiling src/internet/helper/ripng-helper.cc
[1509/1924] Compiling src/internet/helper/rip-helper.cc
[1510/1924] Compiling build/src/internet/bindings/ns3module.cc
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Waf: Leaving directory `/home/pi/tarballs/ns-allinone-3.26/ns-3.26/build'
Build failed
-> task in 'ns3module_internet' failed (exit status 4):
{task 3056100368L: cxx ns3module.cc -> ns3module.cc.8.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-fno-strict-aliasing', '-fstack-protector-strong', '-fwrapv', '-fvisibility=hidden', '-Wno-array-bounds', '-pthread', '-pthread', '-I.', '-I..', '-Isrc/internet/bindings', '-I../src/internet/bindings', '-I/usr/include/python2.7', '-I/usr/include/arm-linux-gnueabihf/python2.7', '-I/usr/include/gtk-2.0', '-I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/arm-linux-gnueabihf/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DNS_DEPRECATED=', '-DNS3_DEPRECATED_H', '-DHAVE_PYEXT=1', '-D_FORTIFY_SOURCE=2', '-DNDEBUG', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', 'src/internet/bindings/ns3module.cc', '-c', '-o', '/home/pi/tarballs/ns-allinone-3.26/ns-3.26/build/src/internet/bindings/ns3module.cc.8.o']
Waf died. Not running tests
I have searched SO and none of the existing questions seem to be relevant. There definitely seems to be something wrong in general because it takes many hours just to get to this point, when I think(?) it should take < 1 hour to build NS-3.
Not sure if you're still looking for a solution, however the problem seems to be related to memory constraints. I solved the issue by enabling/configuring a swapfile.
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
After you build the project, you have the option to disable the swapfile (only if you want). To do this type this in your terminal:
sudo swapoff /swapfile
sudo rm /swapfile
Hope this helps!
I had a similar problem.
It seems to be either a problem with the ns3 version in combination with python, gcc versions, or, a problem with the RAM or GPU memory.
So, I set up a new Ubuntu VM with double the RAM and did not use the latest ns3 version (ns3 3.33)
Since ns3 version 2.xx are based on python2, I would recommend versions 3.xx.
I tried "brew install pyqt" after checking
How to install PyQt on Mac OS X 10.6 and a bunch of blogsites. Specifially,
> brew install qt --with-developer --env=std
But it failed with this error -
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../lib/QtCore.framework/QtCore] Error 1
make[1]: *** [release] Error 2
make: *** [sub-corelib-make_default-ordered] Error 2
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:353:in `open_http': 422 Unprocessable Entity (GitHub::Error)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:709:in `buffer_open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:689:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:30:in `open'
from /usr/local/Library/Homebrew/utils.rb:343:in `open'
from /usr/local/Library/Homebrew/utils.rb:373:in `issues_matching'
from /usr/local/Library/Homebrew/utils.rb:401:in `issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:145:in `fetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:141:in `issues'
from /usr/local/Library/Homebrew/exceptions.rb:184:in `dump'
from /usr/local/Library/brew.rb:162:in `rescue in <main>'
from /usr/local/Library/brew.rb:65:in `<main>'
Can someone please help me out? I see that there's a problem on the open-uri.rb module, but I have almost no experience with Ruby.
updating homebrew got rid of this error for me:
brew update
I tried to install node.js by following instructions here:
https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)
I got these errors after running ./configure:
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
2 [main] python 6768 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent: 0x3A0000 != 0x3D0000
Stack trace:
Frame Function Args
002891E8 6102796B (002891E8, 00000000, 00000000, 00000000)
002894D8 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028A508 61004F1B (611A7FAC, 61249144, 003A0000, 003D0000)
End of stack trace
3 [main] python 5292 fork: child 6768 - died waiting for dll loading, errno 11
/home/user/node/wscript:228: error: could not configure a cxx compiler!
I did a rebaseall on cygwin and ran configure again and got these errors:
$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
2 [main] python 6100 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\_functools.dll to same address as parent: 0x3A0000 != 0x3D0000
Stack trace:
Frame Function Args
002891E8 6102796B (002891E8, 00000000, 00000000, 00000000)
002894D8 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028A508 61004F1B (611A7FAC, 6124976C, 003A0000, 003D0000)
End of stack trace
2 [main] python 4424 fork: child 6100 - died waiting for dll loading, errno 11
/home/user/node/wscript:230: error: could not configure a c compiler!
What am I doing wrong?
You can follow the steps on this page:
http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/
it worked perfectly for me.
You can avoid installing node.js through Cygwin and try to use native Windows executable which would/should be preffered (unless you have some specific reasons to do otherwise).