ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: simon.toivo@telhaug.no
To: ruby-core@ruby-lang.org
Subject: [ruby-core:69677] [Ruby trunk - Bug #11287] [Open] XML generation, App 551 stderr: Segmentation fault at 0×00000000000040
Date: Fri, 19 Jun 2015 08:41:18 +0000	[thread overview]
Message-ID: <redmine.issue-11287.20150619084117.2041264f59f43816@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11287.20150619084117@ruby-lang.org

Issue #11287 has been reported by Simon Toivo Telhaug.

----------------------------------------
Bug #11287: XML generation, App 551 stderr: Segmentation fault at 0×00000000000040
https://bugs.ruby-lang.org/issues/11287

* Author: Simon Toivo Telhaug
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.2p95
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
We have a page that should deliver XML. We have newly upgraded ruby from 1.9.3 to 2.2.2 and rails 3.2.17 to 4.2.1
Our server is using nginx and passenger to receive requests

When we are access our server and get the XML we get the respond 
notice that all other pages is working

~~~
<hash>
  <status>500</status>
  <error>Internal Server Error</error> 
</hash>
~~~
or


Incomplete response received from application
Sometimer In Rails production log we get one of the following errors:

~~~
Completed 500 Internal Server Error in 19815ms (ActiveRecord: 17628.6ms)

RuntimeError (unsupported: FalseClass):
lib/bank_transaction_xml/bt_to_xml.rb:43:in `block (4 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:31:in `block (3 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:29:in `block (2 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:6:in `block in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:5:in `new'
lib/bank_transaction_xml/bt_to_xml.rb:5:in `to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:227:in `block (3 levels) in list_xml'
lib/bank_transaction_xml/bt_to_xml.rb:226:in `each'
lib/bank_transaction_xml/bt_to_xml.rb:226:in `block (2 levels) in list_xml'
lib/bank_transaction_xml/bt_to_xml.rb:222:in `block in list_xml'
lib/bank_transaction_xml/bt_to_xml.rb:221:in `new'
lib/bank_transaction_xml/bt_to_xml.rb:221:in `list_xml'
app/controllers/balance_report_controller.rb:91:in `block (2 levels) in index'
app/controllers/balance_report_controller.rb:88:in `index'

ActiveModel::MissingAttributeError (missing attribute: account_number):
lib/bank_transaction_xml/bt_to_xml.rb:7:in `block (3 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:7:in `block (2 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:6:in `block in to_xml'
...


ArgumentError (string contains null byte):
lib/bank_transaction_xml/bt_to_xml.rb:11:in `block (3 levels) in to_xml'
lib/bank_transaction_xml/bt_to_xml.rb:11:in `block (2 levels) in to_xml'
...


NoMethodError (undefined method `type_cast_from_database' for false:FalseClass):
app/models/invoice.rb:1853:in `check_delete_at'
lib/bank_transaction_xml/bt_to_xml.rb:34:in `block (5 levels) in to_xml'
...
~~~

Most of the time passenger is logging this, and than we don't get any error in production log , (uploaded file with log)

~~~
App 551 stderr: /fakturabank_path/shared/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/document.rb:82: [BUG]
App 551 stderr: Segmentation fault at 0×00000000000040
App 551 stderr: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
…..

App 551 stderr:
App 551 stderr: [NOTE]
App 551 stderr: You may have encountered a bug in the Ruby interpreter or extension libraries.
App 551 stderr: Bug reports are welcome.
App 551 stderr: For details: http://www.ruby-lang.org/bugreport.html
App 551 stderr:
[ 2015-06-18 09:45:33.5083 25387/7fcac95af700 age/Hel/Req/Utils.cpp:89 ]: [Client 2-1569] Sending 502 response: application did not send a complete response
[ 2015-06-18 09:45:36.0178 25387/7fcad02f2700 App/Poo/AnalyticsCollection.h:93 ]: Process (pid=1805, group=/fakturabank_path/current/public (staging)#default) no longer exists! Detaching it from the pool.
[ 2015-06-18 09:45:36.0180 25387/7fcad02f2700 age/Hel/Main.cpp:732 ]: Disconnecting long-running connections for process 1805, application /fakturabank_path/current/public (staging)#default
App 24184 stdout:
~~~

When we are doing this in development environment it all works good, it still take time. If we use less data it work on server and on development. And it nota specific point it breaks.

example 
    5 bank transaction always work 
  50 bank transaction work from time to time like 5 out of 10 
100 bank transaction never work

I have tried to downgrade ruby version to 2.1.0, no luck there. Alse I tried to downgrade ruby version to 2.0.0, it works a lot better but still not all the time.

Why?? I thing it is something with passenger and ruby 2.1 and 2.2? 
what i can to to keep using ruby 2.2.2

---Files--------------------------------
nginx_error.log (353 KB)


-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2015-06-19  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11287.20150619084117@ruby-lang.org>
2015-06-19  8:41 ` simon.toivo [this message]
2015-06-19 21:47 ` [ruby-core:69684] [Ruby trunk - Bug #11287] [Third Party's Issue] XML generation, App 551 stderr: Segmentation fault at 0×00000000000040 nobu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11287.20150619084117.2041264f59f43816@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).