Apache / Passenger segfault at startup (Armel architecture) -- help?

11 views
Skip to first unread message

Chris P.

unread,
Aug 29, 2009, 1:38:58 AM8/29/09
to Phusion Passenger Discussions
Hi there. I'm running into an issue and would be grateful for
advice. On an Armel-based SheevaPlug, I've compiled Passenger with
success. (The only change I made was editing line 58 of
sp_counted_base.hpp, as suggested elsewhere online.)

However, Apache refuses to start when Passenger-enabled. The error is:

[ pid=9079 file=ext/common/ApplicationPoolServerExecutable.cpp:732
time=2009-08-28 22:32:37.713 ]:
*** Fatal error: Cannot send file descriptor with sendmsg(): Invalid
argument (22)
in 'int Server::start()' (ApplicationPoolServerExecutable.cpp:
703)

I can't seem to find other people in my boat, which is worrisome.
Does anyone have any ideas or suggestions?

Linux 2.6.30.5, Ubuntu Jaunty.

Regards,
Chris

Hongli Lai

unread,
Aug 29, 2009, 4:08:06 AM8/29/09
to phusion-...@googlegroups.com

sendmsg() probably needs to be called differently on ARM. Could you
run 'cpp -dM /dev/null' and paste the output here?

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Chris P.

unread,
Aug 29, 2009, 3:25:58 PM8/29/09
to Phusion Passenger Discussions
On Aug 29, 1:08 am, Hongli Lai <hon...@phusion.nl> wrote:
> sendmsg() probably needs to be called differently on ARM. Could you
> run 'cpp -dM /dev/null' and paste the output here?

Certainly (and thanks). Output follows.

Regards,
Chris

$ cpp -dM /dev/null
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 4294967295U
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 0
#define __unix__ 1
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __ARMEL__ 1
#define __GNUC_PATCHLEVEL__ 3
#define __DEC64_MAX_EXP__ 384
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#define __UINTMAX_TYPE__ long long unsigned int
#define __linux 1
#define __DEC32_EPSILON__ 1E-6DF
#define __CHAR_UNSIGNED__ 1
#define __LDBL_MAX_EXP__ 1024
#define __linux__ 1
#define __SCHAR_MAX__ 127
#define __DBL_DIG__ 15
#define _FORTIFY_SOURCE 2
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 4
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __FLT_EPSILON__ 1.19209290e-7F
#define __APCS_32__ 1
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __DEC32_MAX__ 9.999999E96DF
#define __SIZEOF_LONG__ 4
#define __DECIMAL_DIG__ 17
#define __gnu_linux__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __GNUC__ 4
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 8
#define __ARM_ARCH_5T__ 1
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-95)
#define __THUMB_INTERWORK__ 1
#define __LDBL_HAS_DENORM__ 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC32_MIN__ 1E-95DF
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __GXX_ABI_VERSION 1002
#define __SOFTFP__ 1
#define __FLT_MIN_EXP__ (-125)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __DBL_HAS_DENORM__ 1
#define __NO_INLINE__ 1
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.3.3"
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC128_MIN_EXP__ (-6143)
#define unix 1
#define __SIZE_TYPE__ unsigned int
#define __DEC32_DEN__ 0.000001E-95DF
#define __ELF__ 1
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __VFP_FP__ 1
#define __SIZEOF_PTRDIFF_T__ 4
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 2147483647L
#define __FLT_HAS_INFINITY__ 1
#define __unix 1
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MANT_DIG__ 16
#define __DEC32_MAX_EXP__ 96
#define linux 1
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __LDBL_MANT_DIG__ 53
#define __DBL_HAS_QUIET_NAN__ 1
#define __WCHAR_TYPE__ unsigned int
#define __SIZEOF_FLOAT__ 4
#define __DEC64_MIN_EXP__ (-383)
#define __FLT_DIG__ 6
#define __INT_MAX__ 2147483647
#define __FLT_MAX_EXP__ 128
#define __DBL_MANT_DIG__ 53
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __LDBL_MIN_EXP__ (-1021)
#define __arm__ 1
#define __LDBL_MAX_10_EXP__ 308
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __SIZEOF_WCHAR_T__ 4
#define __DEC_EVAL_METHOD__ 2
#define __INTMAX_MAX__ 9223372036854775807LL
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_MAX__ 3.40282347e+38F
#define __SIZEOF_DOUBLE__ 8
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long long int
#define __DEC128_MAX_EXP__ 6144
#define __GNUC_MINOR__ 3
#define __DEC32_MANT_DIG__ 7
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __ARM_EABI__ 1
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-307)
#define __SIZEOF_LONG_LONG__ 8
#define __LDBL_DIG__ 15
#define __GNUC_GNU_INLINE__ 1

Hongli Lai

unread,
Aug 29, 2009, 7:36:21 PM8/29/09
to phusion-...@googlegroups.com
On Sat, Aug 29, 2009 at 9:25 PM, Chris P.<christophe...@gmail.com> wrote:
> Certainly (and thanks).  Output follows.

Try this:

Edit ext/common/MessageChannel.h.
Find:
#if defined(__APPLE__) || defined(__SOLARIS__)
There are two such occurrences. Replace both with:
#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)

Next, edit ext/phusion_passenger/native_support.c.
Find:
#if defined(__APPLE__) || defined(__SOLARIS__)
There are two such occurrences. Replace both with:
#if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__)

Then recompile Phusion Passenger with 'rake apache2' and restart
Apache. Does this work?

Chris P.

unread,
Aug 29, 2009, 8:23:26 PM8/29/09
to Phusion Passenger Discussions
On Aug 29, 4:36 pm, Hongli Lai <hon...@phusion.nl> wrote:
> Try this:
<snip>

OK, Passenger compiles and loads successfully with your proposed
alterations, and initial testing indicates that it's working. This is
fantastic -- thanks very much.

One note: whereas you say "two such occurrences", there are actually
*four* occurrences in each file. Lacking any info to the contrary I
simply shrugged and changed all eight.

So in summary I am now running with your suggested edits above, plus
the "line 58 of sp_counted_base.hpp" change. I'll bang on it more,
but I'm feeling very optimistic. I'm grateful for your assistance.

Regards,
Chris

Hongli Lai

unread,
Aug 30, 2009, 6:10:44 AM8/30/09
to phusion-...@googlegroups.com
On Sun, Aug 30, 2009 at 2:23 AM, Chris P.<christophe...@gmail.com> wrote:
> OK, Passenger compiles and loads successfully with your proposed
> alterations, and initial testing indicates that it's working.  This is
> fantastic -- thanks very much.
>
> One note: whereas you say "two such occurrences", there are actually
> *four* occurrences in each file.  Lacking any info to the contrary I
> simply shrugged and changed all eight.

Yes you're right, there are four.


> So in summary I am now running with your suggested edits above, plus
> the "line 58 of sp_counted_base.hpp" change.  I'll bang on it more,
> but I'm feeling very optimistic.  I'm grateful for your assistance.

Good to hear.

I'd like to make a few more changes so that this all works out of the
box in Armel. Could you run 'ruby -e "puts RUBY_PLATFORM"' and tell me
what you see?

Chris P.

unread,
Aug 30, 2009, 2:27:43 PM8/30/09
to Phusion Passenger Discussions
On Aug 30, 3:10 am, Hongli Lai <hon...@phusion.nl> wrote:
> I'd like to make a few more changes so that this all works out of the
> box in Armel. Could you run 'ruby -e "puts RUBY_PLATFORM"' and tell me
> what you see?

Sure, here you go:

$ ruby -e "puts RUBY_PLATFORM"
arm-linux-eabi

Please let me know how I can provide additional help; I'm happy to.

Regards,
Chris

Hongli Lai

unread,
Aug 30, 2009, 2:58:37 PM8/30/09
to phusion-...@googlegroups.com
Could you try the latest code in the Phusion Passenger git repository
and check whether that works out of the box? Installation instructions
are in the README.

Chris P.

unread,
Aug 31, 2009, 12:28:24 PM8/31/09
to Phusion Passenger Discussions
On Aug 30, 11:58 am, Hongli Lai <hon...@phusion.nl> wrote:
> Could you try the latest code in the Phusion Passenger git repository
> and check whether that works out of the box? Installation instructions
> are in the README.

I just checked it out with Git, compiled and installed it, and loaded
a Rails app page without trouble. Looks fantastic to me.

Question: I see that the Boost workaround for "undefined symbol:
__sync_val_compare_and_swap_4" (mentioned here
http://groups.google.com/group/phusion-passenger/browse_thread/thread/72637ecd4f87596a
) is not present in the code I gitted. How did you end up fixing it?

Regards,
Chris

Hongli Lai

unread,
Aug 31, 2009, 2:17:52 PM8/31/09
to phusion-...@googlegroups.com

I did it by defining BOOST_SP_USE_PTHREADS (or something similar to
that) on ARM systems. This has the same effect as making that code
change.

Regards,
Hongli Lai

Chris P.

unread,
Aug 31, 2009, 5:03:15 PM8/31/09
to Phusion Passenger Discussions
On Aug 31, 11:17 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Mon, Aug 31, 2009 at 6:28 PM, Chris P.<christopher.b.pow...@gmail.com> wrote:
> > Question: I see that the Boost workaround for "undefined symbol:
> > __sync_val_compare_and_swap_4" (mentioned here
> >http://groups.google.com/group/phusion-passenger/browse_thread/thread...
> > ) is not present in the code I gitted.  How did you end up fixing it?
>
> I did it by defining BOOST_SP_USE_PTHREADS (or something similar to
> that) on ARM systems. This has the same effect as making that code
> change.

Fair enough!

Thanks again for your quick and courteous assistance with the ARM
platform.

Regards,
Chris
Reply all
Reply to author
Forward
0 new messages