Project

General

Profile

Actions

Bug #5250

closed

Foreman-installer errors out during install process due to Segmentation fault on Ruby 1.8.7

Added by Justin Bovee about 10 years ago. Updated about 7 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Error Message:
[ INFO 2014-04-20 22:18:04 main] /usr/lib/ruby/site_ruby/1.8/puppet/parser/type_loader.rb:102: [BUG] Segmentation fault
[ INFO 2014-04-20 22:18:04 main] ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[ INFO 2014-04-20 22:18:04 main]
[ INFO 2014-04-20 22:18:04 main] sh: line 1: 7080 Done echo '$kafo_config_file="/etc/foreman/foreman-installer.yaml" $kafo_add_progress=true include kafo_configure'
[ INFO 2014-04-20 22:18:04 main] 7081 Aborted | RUBYLIB=/usr/lib/ruby/gems/1.8/gems/kafo-0.5.3/lib/kafo/../..//modules: puppet apply --verbose --debug --trace --color=false --show_diff --detailed-exitcodes --modulepath /usr/share/foreman-installer/modules:/usr/lib/ruby/gems/1.8/gems/kafo-0.5.3/modules
[ INFO 2014-04-20 22:18:04 main] Puppet has finished, bye!

Environment:
Centos 6.5 - 2.6.32-431.11.2.el6.x86_64

Foreman plugins
[root@foreman01 tftpboot]# foreman-rake plugins
Collecting plugin information
Foreman plugin: foreman-tasks, 0.5.2, Ivan Nečas, The goal of this plugin is to unify the way of showing task statuses across the Foreman instance.
It defines Task model for keeping the information about the tasks and Lock for assigning the tasks
to resources. The locking allows dealing with preventing multiple colliding tasks to be run on the
same resource. It also optionally provides Dynflow infrastructure for using it for managing the tasks.
Foreman plugin: foreman_bootdisk, 2.0.4, Dominic Cleal, Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure.
Foreman plugin: foreman_discovery, 1.3.0.rc1, Greg Sutcliffe, MaaS Discovery Plugin engine for Foreman
Foreman plugin: foreman_hooks, 0.3.7, Dominic Cleal, Plugin engine for Foreman that enables running custom hook scripts on Foreman events
Foreman plugin: foreman_setup, 2.0.2, Dominic Cleal, Plugin for Foreman that helps set up provisioning.
Foreman plugin: foreman_templates, 1.4.0, Greg Sutcliffe, Engine to sychronise provisioning templates from GitHub
Foreman plugin: staypuft, 0.0.4, Staypuft team, OpenStack Foreman Installer

Issue:
When running foreman-installer, it will error out indicating it doesn't have access to foreman-installer.yaml to write a value. If I change permissions on the file, install works but changes permissions of the file back to original settings as expected. This doesn't affect me to much as long as I remember to change the permissions on foreman-installer.yaml before I run foreman-installer.


Related issues 1 (0 open1 closed)

Is duplicate of Installer - Bug #4244: Core dump during foreman-installerRejected02/04/2014Actions
Actions #1

Updated by Justin Bovee about 10 years ago

Just noticed my version didn't land in the document. I apologize for that.
foreman-installer.noarch 1:1.5.0-0.1.RC1.el6 @foreman
foreman.noarch 1.5.0-0.1.RC1.el6

Actions #2

Updated by Marek Hulán about 10 years ago

  • Subject changed from Foreman-installer errors out during install process due to problems accessing foreman-installer.yaml to Foreman-installer errors out during install process due to Segmentation fault on Ruy 1.8.7

This is known issue of Ruby 1.8.7 in CentOS. As a workaround try running installation again, it segfaults randomly, usually several runs are sufficient.

Actions #3

Updated by Marek Hulán about 10 years ago

  • Is duplicate of Bug #4244: Core dump during foreman-installer added
Actions #4

Updated by Dominic Cleal about 10 years ago

  • Status changed from New to Duplicate
Actions #5

Updated by Marek Hulán about 10 years ago

  • Subject changed from Foreman-installer errors out during install process due to Segmentation fault on Ruy 1.8.7 to Foreman-installer errors out during install process due to Segmentation fault on Ruby 1.8.7
Actions #6

Updated by Mathieu Boniface almost 10 years ago

I'm having the exact same issue on RHEL 6.4.

This error does not appear when foreman-proxy installation is disabled by passing the --no-enable-foreman-proxy as argument of foreman-installer command.

The following repo are enabled : 
- rhel-6-server-optional-rpms
- rhel-server-rhscl-6-rpms
- epel
- puppetlabs-dependencies
- puppetlabs-products
- foreman-plugins
- foreman

Do you have any workaround on this ?

Actions #7

Updated by Mathieu Boniface almost 10 years ago

Finally, I found a workaround, the idea is just to pass --enable-foreman-proxy explicitly to the foreman-installer command...

That's really strange from a user point of view. It would be nice to have some explanations on that behavior :)

Actions #8

Updated by Dominic Cleal almost 10 years ago

Mathieu Boniface wrote:

Finally, I found a workaround, the idea is just to pass --enable-foreman-proxy explicitly to the foreman-installer command...

That's really strange from a user point of view. It would be nice to have some explanations on that behavior :)

I doubt there's any rational explanation unfortunately, the segfault comes and goes (it's an issue with Ruby's GC). Some have reported it happens when they remove certain parts of the installer.

Actions #9

Updated by Ming Jin about 7 years ago

We encountered the same 'Segmentation Fault' issue in our production, which is centos 6.4 with the system ruby 1.8.7.

Eventually, a temporary walkaround is to disable and re-enable ruby GC around the ruby class loading in foreman-proxy/bin/smart-proxy

#!/usr/bin/env ruby

$LOAD_PATH.unshift(*Dir[File.expand_path("../../lib", __FILE__), File.expand_path("../../modules", __FILE__)])

GC.disable
require 'smart_proxy_main'
Proxy::Launcher.new.launch
GC.enable

Then everything works successfully. I guess it's due to a potential GC issue of the ruby version 1.8, which should be OK if it's replaced with ree-1.8.7. But we haven't verify it yet.

Actions

Also available in: Atom PDF