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

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.

Related

AOSP Android 12 Beta version build fails

I've tried to compile AOSP android 12 beta branches with no success.
I cloned the repo using:
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-s-beta-3
repo sync
and then used:
source build/envsetup.sh
lunch aosp_blueline-userdebug
m
now when it starts to run, after a while, it fails because there's duplication at the stub libraries:
[ 95% 86/90] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:146:1: module "stable.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:198:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:164:1: module "legacy-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:216:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:180:1: module "stable-core-platform-api-stubs-system-modules" already defined
libcore/mmodules/core_platform_api/Android.bp:232:1 <-- previous definition here
error: libcore/JavaLibrary.bp:994:1: module "core.current.stubs" already defined
build/soong/java/core-libraries/Android.bp:27:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1015:1: module "core-current-stubs-for-system-modules" already defined
build/soong/java/core-libraries/Android.bp:48:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1041:1: module "core-current-stubs-system-modules" already defined
build/soong/java/core-libraries/Android.bp:74:1 <-- previous definition here
I've also tried to change the build/soong branch to master and I've got another build faliure.
How do I compile those beta versions? what am I missing??
Moreover, all the Android 12 betas I've tried are broken. For example, another beta 1 question
Thanks!
Ok so finally I've got this beta version compiled.
The thing I've found is that beta branch/ tag is not necessarily compiling.
So what I did is looking at:
https://android.googlesource.com/platform/
and when I ran into errors I've tried to checkout a later commit for this problematic sub-module that fixes this compilation.
Doing this until finding a combination of commits that compiled together did the magic.
If someone would like to know which specific commit I've checkout in order to get Android 12 beta 2 compiled just tell me
Actual problem is that this AOSP 12 Beta 3 is not fully synced and few of the modules were mentioned on different-2 files due to that you are getting these errors. I was also getting the same errors.
To get rid of these errors by commenting these modules in these files.
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
build/soong/java/core-libraries/Android.bp line 130 you can comment this module.
/*java_library {
name: "legacy.core.platform.api.stubs",
visibility: core_platform_visibility,
hostdex: true,
compile_dex: true,
sdk_version: "none",
system_modules: "none",
static_libs: [
"art.module.public.api.stubs.module_lib",
"conscrypt.module.platform.api.stubs",
"legacy.i18n.module.platform.api.stubs",
],
patch_module: "java.base",
}*/
Same you have to do with other modules too.
https://stackoverflow.com/users/4618429/omribager Have you build AOSP 12 Beta 3 successfully if yes, please mention the process because after these fixes also I am getting other modules issue.
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: external/rust/crates/zip/Android.bp:21:1: "libzip" depends on undefined module "libflate2"
01:00:29 soong bootstrap failed with: exit status 1
failed to build some targets (01:08 (mm:ss))

Error on building Openembedded for Intel Quark

Trying to build Linux for Advantech UBC-221 that has Intel Quark processor.
The system is Debian 9, running on VMware. Was able to build poky succefully before.
Let me summarize what I was doing:
mkdir quark
cd quark
git clone git://git.yoctoproject.org/meta-intel-quark
git clone git://git.openembedded.org/openembedded-core
git clone git://git.yoctoproject.org/poky
cp -r poky/bitbake .
cd openembedded-core
source oe-init-build-env
bitbake-layers add-layer ~/quark/meta-intel-quark/
bitbake core-image-base
Error code I get:
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-kernel/linux/linux-yocto-quark_3.8.bb: Variable key RDEPENDS_${KERNEL_PACKAGE_NAME}-base (${KERNEL_PACKAGE_NAME}-image) replaces original key RDEPENDS_kernel-base ().
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Exception during build_dependencies for CFLAGS
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Error during finalise of /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
ERROR: ExpansionError during parsing /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable CFLAGS, expression was -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0=/usr/src/debug/grub/0.97+gitAUTOINC+5775f32a62-r0 -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot= -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot-native= -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign -DINTEL_QUARK_TEST=${#base_contains('PACKAGECONFIG', 'grub_test', '1', '0', d)} which triggered exception NameError: name 'base_contains' is not defined
Summary: There were 5 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I'm pretty much stuck here. Some help would be greatly appreciated!
Edit:
Tried to build on Debian 7.11 32 bit system. It went better however another error came:
bgabor#debian:~/quark/dizzy/build$ bitbake core-image-base
WARNING: Host distribution "Debian-7.11" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |####################################################################################################################################################| ETA: 00:00:00
Loaded 1292 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Debian-7.11"
TARGET_SYS = "i586-poky-linux"
MACHINE = "quark"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "m32 i586"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
meta-intel-quark = "master:a314f0ceea986fde42d5d9b0ea449f7a563e9351"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Unable to install packages. Command '/home/bgabor/quark/dizzy/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/rootfs/var/lib/smart install -y busybox#i586 initramfs-live-install-efi#i586 run-postinsts#all initramfs-live-install#i586 udev#i586 initramfs-live-boot#quark base-passwd#i586' returned 1:
error: Can't install initramfs-live-install-1.0-r9#i586: no package provides grub
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/temp/log.do_rootfs.29435
ERROR: Task 240 (/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2529 tasks of which 2527 didn't need to be rerun and 1 failed.
No currently running tasks (2435 of 2531)
Summary: 1 task failed:
/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
It does not find grub package, however I can see there are two in the recipes:
bgabor#debian:~/quark/dizzy/build$ bitbake-layers show-recipes | grep "grub" -A 3
Parsing recipes..done.
grub:
meta-intel-quark 0.97+gitAUTOINC+5775f32a62
meta 0.97
meta 2.00
--
grub-conf:
meta-intel-quark 1.0
grub-efi:
meta 2.00
gsettings-desktop-schemas:
meta 3.10.1
Tried to clean and then bitbake again but no result.
What might be the problem here?
First, Poky includes OpenEmbedded Core so you don't need to clone both, just clone Poky.
Second, the meta-intel-iot layer is pretty dead and only formally supports the Daisy release of Poky (see the README). You may have luck using newer releases, but obviously not git master (aka Thud).
https://wiki.yoctoproject.org/wiki/Releases lists the releases. Instead of checking out master of Poky, check out the relevant release branch. I suggest starting with daisy but trying something a little newer such as jethro would be a good idea.

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

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

Calling sem_open on Solaris as ordinary user

This call fails on Solaris with EACCES when ran as ordinary user:
sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 1);
When process is started as root, it runs fine. Is this expected behavior?
Environment:
$ uname -a
SunOS solaris 5.11 11.0 i86pc i386 i86pc
$ g++ --version
g++ (GCC) 4.5.2
At the command line try:
prctl $$
These are the system enforced resource limits your process has. Note there are
process.max-sem-ops
process.max-sem-nsems
project.max-sem-ids
These are limits that have a number, if you do not see them (or the limits are already reached) then you have to add them to your account's profile with projadd or projmod to increase them if your project already exists.
If you cannot do this (no root access) consult with your sysadmin, s/he probably has some reason for not allowing semapahore access.
Note carefully:
sempahores are kernel persistent. If you ran your code a bunch of times the sempahores you created are likely still out there.
To see existing semaphores try ipcs -as
To remove lingering sempahores that your code should have removed use ipcrm

Trying to install meteor on centos 5

OS: Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Trying to run this command to install meteor:
curl install.meteor.com | /bin/sh
============= Output Error ===============
Installing /tmp/meteor-install-Nv47529/meteor-0.3.6-1.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.6)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.9)(64bit) is needed by meteor-0.3.6-1.x86_64
libstdc++.so.6(GLIBCXX_3.4.9)(64bit) is needed by meteor-0.3.6-1.x86_64
Installation failed.
============= Output Error ===============
glib is missing showing but check glib using
rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" | grep glibc | sort
showing me
compat-glibc-2.3.4-2.26.i386
compat-glibc-2.3.4-2.26.x86_64
compat-glibc-headers-2.3.4-2.26.x86_64
glibc-2.5-49.el5_5.7.i686
glibc-2.5-49.el5_5.7.x86_64
glibc-common-2.5-49.el5_5.7.x86_64
glibc-devel-2.5-49.el5_5.7.i386
glibc-devel-2.5-49.el5_5.7.x86_64
glibc-headers-2.5-49.el5_5.7.x86_64
glibc-utils-2.5-49.el5_5.7.x86_64
so any idea what is the issue?
GLIBC_2.6 is required by the RPM, you only have GLIBC_2.5 so you need to upgrade.
Alternatively, this dependency may be more strict than it needs to be; try packing Meteor yourself.