Bug 1393891 - Passenger crashes on startup on F25
Summary: Passenger crashes on startup on F25
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: passenger
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-10 14:45 UTC by Tom Hughes
Modified: 2017-12-12 10:36 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:36:03 UTC
Type: Bug


Attachments (Terms of Use)

Description Tom Hughes 2016-11-10 14:45:39 UTC
Description of problem:

Trying to start a passenger server, either standalone or as an apache module, crashes on startup in F25.

The problem is the patch to allow use of the system jsoncpp, which converts a dynamic_cast to static_cast. That is, pretty much by definition, unsafe.

Specifically the logic is that passenger's bundled version has patched the Json::Value to have a virtual destructor. They then inherit SpawningKit::Result from it, and Process::Process can then test whether it has been given a raw Json::Value or a SpawningKit::Result by trying to downcast and checking if it is successful.

Changing the cast to static means we wind up assuming that the cast will work and adding some offset to the pointer. The reason it was changed of course is that the system jsoncpp doesn't have a virtual destructor on Json::Value which means it doesn't support dynamic casting.

I don't know why exactly this worked in older versions, but it certainly doesn't work now.

I suspect the only easy fix is to use the bundled jsoncpp - the other option I think would be to patch passenger to insert a shim class in the hierarchy that had a virtual destructor and which could be used as the Process::Process argument but that might be quite invasive to do.

By the way the patches are mixed up in the spec. You have:

Patch1: passenger-5.0.30-json.patch
Patch2: passenger-5.0.30-libev.patch

but then :

%patch1 -p1 -b .libev
%patch2 -p1 -b .json

which is the other way round. It works fine so long as both are applied of course, but gets amusing when you starting trying to disable them to bisect which patch is breaking things ;-)

Version-Release number of selected component (if applicable):

passenger-5.0.30-1.fc25.x86_64

Comment 1 cpg 2016-12-04 04:02:07 UTC
I am not sure what the reasons for using some other json library, however, simply not doing the patch appears to make it not crash and also (in so far as I have been able to test), virtually all aspects of my application work.

Comment 2 Johan Cwiklinski 2016-12-17 20:04:30 UTC
Hello,

I had the exact same problem, and it indeed seems to be related to the patches or to the use of system libraries instead of bundled ones.

I've rebuild the RPM from the Fedora specfile removing patches, rm and export lines, and now my ruby app is working like a charm (well... as far as I can see for now :p).


Also, the following issue is maybe a duplicate of the current:
https://bugzilla.redhat.com/show_bug.cgi?id=1403337

Comment 3 Fedora End Of Life 2017-11-16 18:52:26 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-12-12 10:36:03 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.