Segfault on mongodb extension 1.1.2/1.1.3-dev with PHP 7 FPM under gentoo - mongodb

I am heaving a strange problem under gentoo. Mongodb extension is working fine in apache2 and cli, but fpm fails to start:
/etc/init.d/php-fpm restart
* Testing PHP FastCGI Process Manager configuration ...
[30-Jan-2016 13:59:47] NOTICE: configuration file /etc/php/fpm-php7.0/php-fpm.conf test is successful
zend_mm_heap corrupted [ !! ]
php -v
PHP 7.0.2-pl5-gentoo (cli) (built: Jan 30 2016 13:16:21) ( ZTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Here is the info from cli:
php -i|grep mongo
mongodb
mongodb support => enabled
mongodb version => 1.1.3-dev
mongodb stability => devel
libmongoc version => 1.3.1-dev
mongodb.debug => no value => no value
I even compiled mongodb without sasl but the result is the same.
Mongodb extension was manually compiled like this(my system is x86_64):
git clone https://github.com/mongodb/mongo-php-driver.git
cd mongo-php-driver; git submodule sync && git submodule update --init
Run phpize:
phpize --clean
phpize
Remove the aclocal.m4 file:
rm aclocal.m4
Run aclocal and autoconf:
aclocal
autoconf
Now configure, make and install the package:
./configure --without-mongodb_sasl (i tried with and without this)
make
make install
add extension=mongodb.so in php.ini: /etc/php/fpm-php7.0/php.ini
restart php-fpm: /etc/init.d/php-fpm restart
The strangest thing is that if i start php-fpm process with gdb to backtrace the extensions works.
gdb -q /usr/lib/php7.0/bin/php-fpm
Reading symbols from /usr/lib/php7.0/bin/php-fpm...(no debugging symbols found)...done.
(gdb) set args --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
(gdb) run
Starting program: /usr/lib64/php7.0/bin/php-fpm --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Inferior 1 (process 4075) exited normally]
(gdb)
Any help is apreciated

For the sake of the lazy googler, this is fixed in version 1.1.5 of the php-mongodb-driver

Related

Installanywhere Openjdk 1.7.0_111

i have a problem.
i'm using installanywhere for some product. (installanywhere 2014 SP1)
setting installanywhere option,
Product > JVM Settings > VM valid List : JDK_1.7+, IBM_JDK_1.7+
this option installer choose openjdk.
i'm success install in openjdk 1.7.0_65, redhat 6.x 64bit os.
but install failed in openjdk 1.7.0_111, redbat 6.x 64bit os.
error message -
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
so, commanding [export LAX_DEBUG=true] and install.
under line debug message.
Preparing to install...
Checking for POSIX df.
Found POSIX df.
Checking tail options...
Using tail -n 1.
True location of the self extractor: /opt/Test/Test_Setup_RedHat.bin
Forcing install base (including tmp dir) to: /opt/Test/tmp
Creating installer data directory: /opt/Test/tmp/install.dir.27084
Creating installer data directory: /opt/Test/tmp/install.dir.27084/InstallerData
Gathering free-space information...
Space needed to complete the self-extraction: 16376 blocks
Available space: 242730896 blocks
Available blocks: 242730896 Needed blocks: 16376 (block = 512 bytes)
This installation does not contain a VM.
Extracting the installation resources from the installer archive...
Extracting install.zip from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/installer.zip ...
Extracting to padded done, exit code = 0
Extracting from padded to zip done, exit code = 0
Creating disk1 data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1
Creating instdata data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData
Extracting resources from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData/Resource1.zip ...
Extracting done, exit code = 0
Configuring the installer for this system's environment...
[7m========= Analyzing UNIX Environment =================================[0m
Setting UNIX (linux) flavor specifics.
Importing UNIX environment into LAX properties.
Checking for POSIX awk.
[7m========= Analyzing LAX ==============================================[0m
LAX found............................ OK.
LAX properties read.................. OK.
[7m========= Finding VM =================================================[0m
[1mValid VM types.......................... JDK_1.7+, IBM_JDK_1.7+[0m
[1mExpanded Valid VM types................. JDK_1.7+, IBM_JDK_1.7+ [0m
Found jvmspecs.properties
JVM Spec Build Option Specified Without VM
Searching without JVM specs
Searching without JVM specs
[1mWARNING! No valid lax.nl.current.vm available.[0m
/usr/xpg4/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/cfengine/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
[1mSearching for VMs in PATH:[0m
Looking in:............................. /usr/xpg4/bin
Looking in:............................. /usr/local/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /usr/local/sbin
Looking in:............................. /usr/sbin
Looking in:............................. /sbin
Looking in:............................. /var/cfengine/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /sbin
Looking in:............................. /usr/sbin
Looking in:............................. /usr/local/bin
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "IBM_JDK_1.7+": passed
[1m Using VM:............................. /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java[0m
[7m========= Virtual Machine Options ====================================[0m
LAX properties incorporated............. OK.
classpath............................... "/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip"
main class.............................. "com.zerog.ia.installer.Main"
.lax file path.......................... "/opt/Test/tmp/install.dir.27084/temp.lax"
user directory.......................... "/opt/Test/tmp/install.dir.27084"
stdout to............................... "console"
sterr to................................ "console"
install directory....................... ""
JIT..................................... none
option (verify)......................... off
option (verbosity)...................... none
option (garbage collection extent)...... none
option (garbage collection thread)...... none
option (native stack max size).......... none
option (java stack max size)............ none
option (java heap max size)............. 50331648
option (java heap initial size)......... 16777216
option (lax.nl.java.option.additional).. none
[7m========= Display settings ===========================================[0m
X display............................... not set
[1mWARNING: This shell's DISPLAY variable has not been set.
This installer is configured to run in GUI and will probably
fail. Try running this installer in console or silent mode,
or on another UNIX host which has the DISPLAY variable set,
if the installer unexpectedly fails.[0m
UI mode................................. gui
Launching installer...
[7m========= VM Command Line ============================================[0m
[1moptions:[0m
[7mCLASSPATH:[0m/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip:
[7m========= Forking JAVA =============================================[0m
OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
27084
Try using the -Djava.io.tmpdir= option to select an alternate temp location.
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
what should i do? success running open jdk 1.7.0_65, but open jdk 1.7.0_111 failed.
CentOS 6.2 and OpenJDK1.7.0_111 running success.

letsencrypt-auto certonly does'nt work

no matter which command I use with ./letsencypt-auto the result is always the same as blew, am I missing something here.
here is an output on ./letsencrypt-auto certonly.
[root#tipsycore letsencrypt]# ./letsencrypt-auto certonly
#Bootstrapping dependencies for RedHat-based OSes...
#yum is /usr/bin/yum
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package python-2.6.6-64.el6.x86_64 already installed and latest version
#Package python-devel-2.6.6-64.el6.x86_64 already installed and latest #version
#Package python-virtualenv-1.10.1-1.el6.noarch already installed and latest #version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
#Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest #version
#Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version
#Package openssl-devel-1.0.1e-42.el6_7.2.x86_64 already installed and latest #version
#Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest #version
#Package redhat-rpm-config-9.0.3-44.el6.centos.noarch already installed and #latest version
#Package ca-certificates-2015.2.4-65.0.1.el6_6.noarch already installed and #latest version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package 2:mod_ssl-2.2.15-47.el6.vm.x86_64 already installed and latest #version
#Nothing to do
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
#[root#tipsycore letsencrypt]#
Try this:
Lets encrypt Centos 6
# yum install centos-release-SCL
# yum install python27 python27-python-devel python27-python-setuptools python27-python-tools python27-python-virtualenv
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so.1.0
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so
# ll /usr/lib64/libpyt*
lrwxrwxrwx. 1 root root 19 Aug 22 2016 /usr/lib64/libpython2.6.so -> libpython2.6.so.1.0
-r-xr-xr-x. 1 root root 1669840 Aug 18 2016 /usr/lib64/libpython2.6.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so.1.0 -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
# /opt/rh/python27/root/usr/bin/python2.7 -V
Python 2.7.8
# vim ~/.bash_profile
PATH=/opt/rh/python27/root/usr/bin/:$PATH:$HOME/bin
export PATH
# python -V
Python 2.6.6
# source ~/.bash_profile
# python -V
Python 2.7.8
# git clone https://github.com/letsencrypt/letsencrypt
# cd /opt/letsencrypt/
# service nginx stop
# ./letsencrypt-auto certonly --standalone -d <YOUR_DOMAIN.COM>
The problem is (somewhat confusingly) described by the last message you get in the output from letsencrypt-auto:
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
The LetsEncrypt client you are running requires Python 2.7 or above. You have Python 2.6 installed. I have a blog post describing the way I solved this problem: https://thelastcicada.com/solving-the-python-2-6-issue-for-letencrypt-on-centos-6. Below I will go into further detail and summarize my solution.
I'm going to assume from this issue and the output of your letsencrypt-auto that you are running CentOS 6 or a similar RHEL6-based operating system. This is important because systems tools on CentOS 6 are all based on Python 2.6 (yum in particular is) and your system can therefore not upgrade safely past Python 2.6. CentOS 7 doesn't have this problem and comes packaged with a newer version of Python.
To solve this on CentOS 6, you could run letsencrypt-auto --debug, as noted in the error message, but that just allows you to run the experimental Python 2.6 code that isn't yet well supported. Alternatively, you can use Software Collections to install Python 2.7 on CentOS 6 in it's own environment that can run alongside Python 2.6 and not mess up your system's default Python installation.
The basic steps are:
yum install centos-release-SCL to install the Software Collections package
yum install python27 to install Python 2.7
scl enable python27 "/root/letsencrypt/letsencrypt-auto certonly --agree-tos --webroot --webroot-path /var/www/html/mywebsite.com -d mywebsite.com" to run the LetsEncrypt client using the Python 2.7 version via Software Collections. The flags passed to letsencrypt-auto are typical ones I use when requesting an SSL certificate to install with Nginx - your configuration my vary.
Hope this helps and good luck!

Core dump while running 'rake rails:update:bin' during Rails 4 upgrade

I'm upgrading an existing Rails 3.2 application to Rails 4. I'm using ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] through rbenv, on Ubuntu 13.04. I was using the '--binstubs' option with Rails 3.2. During the upgrade, I:
upgraded Rails to Rails 4.0.0
upgraded the Gemfile with the latest Rails 4 equivalent gems
ran 'bundle config --delete bin && rm -rf bin'
Running 'rake rails:update:bin' core dumps with the top few lines being:
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
Given the size of the Gem and error output, I have created a gist at https://gist.github.com/grcarey/6109181, that contains the Gemfile and the output from the rake command.
Some ideas on solving this would be greatly appreciated.
---------- Update -----------
Running the command with 'ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]' gives the following few lines in the error output:
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
c:0036 p:0019 s:0117 b:0117 l:000116 d:000116 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0035 p:0011 s:0112 b:0112 l:000111 d:000111 TOP /home/user/projects/proj_name/.bundle/gems/nokogiri-1.6.0/lib/nokogiri/xml.rb:1
c:0034 p:---- s:0110 b:0110 l:000109 d:000109 FINISH
Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
Problem solved.
I had been using the bundle binstubs option in Rails 3.2 and I hadn't deleted the project's bundle and bin dirs prior to the upgrade.
After deleting these dirs and re-running bundle install, then running rake rails:update:bin the problem was solved.

Error with PAR module

I have been trying to build .exe through PAR in windows XP and
my perl version is 5.8.8.. I installed the latest PAR from PPM
I gave the following command in the command prompt,
C:\Documents and Settings\abc\Desktop\serial>pp -o serial.exe serial.pl
Set up gcc environment - 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Program too big to fit in memory
Access is denied.
Also it throws me the following error popup..
C:\DOCUME~1\abc\LOCALS~1\Temp\parlLoYJMpa.exe is not a valid Win32 application.
Actually my script in just one line code..
I am confused...
Please help me....
Worked fine for me, but then I use pp all the time with no problem. I didn't get any "Set up gcc environment..." message, no messages at all. I'm putting this as an answer because not enough room in the comment for all this:
I did a gcc -v and got:
C:\tools\perl\tests>gcc -v
Reading specs from c:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/spec
s
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads
--disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry
--disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
--without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)

How to set node path for nodejs (Ubuntu)

I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
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 node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.