Bug 1418296 - Change user_string to user_string_warn
Summary: Change user_string to user_string_warn
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-01 13:49 UTC by Lukas Zapletal
Modified: 2017-05-25 08:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-25 08:38:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The patch (5.01 KB, patch)
2017-02-01 13:49 UTC, Lukas Zapletal
no flags Details | Diff

Description Lukas Zapletal 2017-02-01 13:49:03 UTC
When systemtaping Ruby application (Satellite) we are hitting:

Full error: user string copy fault -14 at 0000000001a9e310 [man error::fault] near identifier 'user_string_n' at /usr/share/systemtap/tapset/uconversions.stp.

The solution was to change user_string to user_string_warn in libruby.stp file. For RH SCL this is located at:

    /opt/rh/rh-ruby22/root/usr/share/systemtap/tapset/libruby.so.2.2.stp

This will no longer exit session but continue working (with a warning message).

Comment 1 Lukas Zapletal 2017-02-01 13:49:55 UTC
Created attachment 1246650 [details]
The patch

Comment 2 Vít Ondruch 2017-02-03 13:57:14 UTC
(In reply to Lukas Zapletal from comment #0)
> This will no longer exit session but continue working (with a warning
> message).

Could you please elaborate what is the benefit/difference? I am afraid I don't fully understand the intention here ...

Comment 3 Lukas Zapletal 2017-02-24 14:31:16 UTC
Sure, is as easy as user_string exist systemtap script while user_string_warn just issues a warning. Basically it's impossible to use SystemTap on Ruby codebase with C extensions without this change.

Comment 4 Vít Ondruch 2017-02-27 11:01:02 UTC
(In reply to Lukas Zapletal from comment #3)
> Sure, is as easy as user_string exist systemtap script while
> user_string_warn just issues a warning. Basically it's impossible to use
> SystemTap on Ruby codebase with C extensions without this change.

But what is the reason for "Full error: user string copy fault -14 at 0000000001a9e310 [man error::fault] near identifier 'user_string_n' at /usr/share/systemtap/tapset/uconversions.stp."

Using the _warning variant looks just as an workaround of some underlying issue ...

Comment 5 Lukas Zapletal 2017-02-27 12:46:31 UTC
My understanding is that SystemTap can preempt into Ruby VM in any state, even in inconsistent, thus the error. Shell I ask someone from SystemTap to review this?

Comment 6 Vít Ondruch 2017-02-27 13:04:12 UTC
(In reply to Lukas Zapletal from comment #5)
> Shell I ask someone from SystemTap to review this?

That would be sweet ...

Comment 7 Fedora End Of Life 2017-02-28 11:09:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 8 Frank Ch. Eigler 2017-03-01 21:04:37 UTC
The change seems fine.  Or use user_string_quoted (which handles errors by going to hex addresses instead).

Comment 9 Lukas Zapletal 2017-05-25 07:42:43 UTC
Vit, that's the review, I asked Frank from SystemTap team :-) ^^^


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