Code Monkey home page Code Monkey logo

Comments (19)

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 09:50:44

Are you sure you don't have bad RAM or other bad hardware?

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 10:51:23

I would be about 99.9% sure I don't have bad hardware. This box is slightly over a
year old and all other VM's including DOM0 are running without incident. I create my
Virtual Machines with minimal OS installs, so many times I find that obscure errors
have something to do with a missing dependency.

Thank you for your help in this matter.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 11:09:40

What is the owner of the file /usr/local/rails_apps/analysis/config/environment.rb?

And could you comment out
/var/lib/gems/1.8/gems/passenger-1.0.3/lib/passenger/application_spawner.rb line 229,
restart Apache, and check whether that still crashes?

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 11:26:56

environment.rb owner: root:root owner writable world readable

Ok cool! I commented out that line and now I can see my site.

Thanks a lot for all your help. I really appreciate it!

Interested to find out why it happened.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 11:57:38

Yeah. It seems that changing the supplementary groups of a process will crash Ruby.

Could you run the following code, in irb, as root, and check whether it crashes?

require 'etc'
Process.initgroups("nobody", Etc.getpwnam("nobody").gid)

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 12:03:39

Here are the results. It didn't crash.

irb(main):001:0> require 'etc'
=> true
irb(main):002:0> Process.initgroups("nobody",Etc.getpwnam("nobody").gid)
=> [546, 65534]
irb(main):003:0>

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 12:14:22

What happens if you do this?

  • Uncomment the line you commented out earlier.
  • Chown environment.rb to a normal user.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 12:35:41

No go.

I get the original SEG FAULT error again.

I tried with a couple different accounts: , www-data ...

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 12:42:14

Could you run the following code, in irb, as root, and check whether it crashes?

require 'etc'
g = Process.initgroups("nobody", Etc.getpwnam("nobody").gid)
Process.groups = g

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 12:46:41

Still no crash.

root@develop:/usr/local/rails_apps/analysis# irb
irb(main):001:0> require 'etc'
=> true
irb(main):002:0> g = Process.initgroups("nobody", Etc.getpwnam("nobody").gid)
=> [546, 65534]
irb(main):003:0> Process.groups = g
=> [546, 65534]

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 01, 2008 13:12:16

Try this:

  1. Change ownership of environment.rb back to root.

  2. Edit application_spawner.rb line 229. Change:

    Process.groups = Process.initgroups(username, gid)

to

STDERR.puts "username = #{username}, gid = #{gid}"
STDERR.flush
Process.groups = Process.initgroups(username, gid)

What do you see in your Apache error log now when the spawn manager crashes?

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 13:32:47

I think this result will help you out.

username = nobody,gid=65534

According to getent the gid should be 546

root@develop:/usr/local/rails_apps/analysis# getent group | grep nobody
Guests:*:546:nobody

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 01, 2008 13:35:35

Ok, I think I have one of the issues. If I run getent passwd | grep nobody

nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
nobody:x:999:514:nobody:/dev/null:/bin/false

I'm showing two nobody accounts. Hence the array thats showing up.

So I'm assuming if I fix the dual nobody's it might fix the problem.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From drew.bomhof on May 02, 2008 06:22:16

Removing the extra nobody user didn't fix the problem. But after further
investigation I'm wondering if it might have something to do with my LDAP
configuration. Either way commenting out line 229 in application_spawner.rb is
resolving the problem for now. Thanks for you all your help on this great product.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 09, 2008 07:36:21

Hi Drew.

I'm wondering whether this problem would be solved if you use the development version
(from the git repository) in combination with conservative spawning. That is, by
setting "RailsSpawnMethod" to "conservative": http://www.modrails.com/documentation/Users%20guide%20latest.html#_railsspawnmethod_lt_string_gt Could you give it a try? Thanks.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on May 19, 2008 05:05:13

Labels: NeedsConfirmation

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From stanislav.bozhkov on June 10, 2008 15:40:16

I'm using Fedora 9 x86_64. Today I installed passenger-1.9.0 and also have SEG FAULT
from-time-to-time. However, I can't reproduce it.

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on June 11, 2008 01:44:51

stanislav.bozhkov: when the segfault happens, do you see any backtraces in the Apache
error log? What exactly segfaults?

from passenger.

FooBarWidget avatar FooBarWidget commented on June 4, 2024

From honglilai on July 16, 2008 08:37:31

I'm closing this bug because of lack of feedback.

Status: WontFix

from passenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.