From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78658 invoked by alias); 24 Aug 2019 01:13:10 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 78600 invoked by uid 48); 24 Aug 2019 01:13:06 -0000 From: "agentzh at gmail dot com" To: systemtap@sourceware.org Subject: [Bug runtime/24935] New: Reading userland static data always leads to read faults on Fedora 29 x86_64 Date: Sat, 24 Aug 2019 01:13:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: agentzh at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q3/txt/msg00048.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24935 Bug ID: 24935 Summary: Reading userland static data always leads to read faults on Fedora 29 x86_64 Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: runtime Assignee: systemtap at sourceware dot org Reporter: agentzh at gmail dot com Target Milestone: --- I've noted that reading userland C static data always fails with read faults (-14) on Fedora 29 x86_64. Below is a minimal example that can demonstrate = this issue: File test.c: static const char *s =3D "hi"; int main(void) { return 0; } File test.stp: probe process.function("main") { printf("s =3D %s\n", user_string(@var("s"))); } And then compile the test.c C program: gcc -g test.c And then run the test.stp script: $ stap test.stp -c './a.out' ERROR: user string copy fault -14 at 00000000a25ef291 [man error::fault] near identifier 'user_string_n' at /opt/stap/share/systemtap/tapset/uconversions.stp:114:10 WARNING: Number of errors: 1, skipped probes: 0 WARNING: /opt/stap/bin/staprun exited with status: 1 Pass 5: run failed. [man error::pass5] I'm using the latest stap master branch (commit 8ffab23ff4): $ /opt/stap/bin/stap -V Systemtap translator/driver (version 4.2/0.176, commit release-4.1-72-g8ffab23ff4a1) Copyright (C) 2005-2019 Red Hat, Inc. and others This is free software; see the source for copying conditions. tested kernel versions: 2.6.18 ... 5.1-rc2 enabled features: AVAHI BPF PYTHON2 LIBSQLITE3 LIBXML2 NLS NSS READLINE The system is Fedora 29: $ cat /etc/redhat-release Fedora release 29 (Twenty Nine) More info: $ gcc --version gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is= NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURP= OSE. $ uname -a Linux glass 5.1.20-200.fc29.x86_64 #1 SMP Fri Jul 26 15:15:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux The same test example works flawlessly on CentOS 7: $ stap -c './a.out' test.stp s =3D hi Using gcc options -fpic -pie to compile the test.c program makes no differe= nce: ERROR: user string copy fault -14 at 000000004e89a066 [man error::fault] near identifier 'user_string_n' at /opt/stap/share/systemtap/tapset/uconversions.stp:114:10 WARNING: Number of errors: 1, skipped probes: 0 WARNING: /opt/stap/bin/staprun exited with status: 1 Pass 5: run failed. [man error::pass5] --=20 You are receiving this mail because: You are the assignee for the bug.