public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline
@ 2015-11-13 15:20 mcermak at redhat dot com
  2015-11-13 15:25 ` [Bug runtime/19241] " mcermak at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mcermak at redhat dot com @ 2015-11-13 15:20 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

            Bug ID: 19241
           Summary: systemtap fails to start when CPU0 is offline
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Created attachment 8780
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8780&action=edit
proposed patch

Per rhbz1280321, stap fails to start when CPU0 is offline:

========
# echo 1 > /sys/devices/system/cpu/cpu0/online
# cat /sys/devices/system/cpu/cpu*/online
1
1
1
1
# stap -e 'probe oneshot {log("hey!")}'
hey!
# echo 0 > /sys/devices/system/cpu/cpu0/online
# cat /sys/devices/system/cpu/cpu*/online
0
1
1
1
# stap -e 'probe oneshot {log("hey!")}'
stapio:init_relayfs:282: ERROR: couldn't open
/sys/kernel/debug/systemtap/stap_2e0ffa1415135b7d8d3684541d2a4c8_26577/trace0.
WARNING: /usr/bin/staprun exited with status: 1
Pass 5: run failed.  [man error::pass5]
#
========

In bulk mode, staprun fails when any CPU except the last one are offline.
Attached patch fixes the issue for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/19241] systemtap fails to start when CPU0 is offline
  2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
@ 2015-11-13 15:25 ` mcermak at redhat dot com
  2015-11-19 12:25 ` mcermak at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mcermak at redhat dot com @ 2015-11-13 15:25 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit d879410b39e8f0208af7e4b6828df8d398269511.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/19241] systemtap fails to start when CPU0 is offline
  2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
  2015-11-13 15:25 ` [Bug runtime/19241] " mcermak at redhat dot com
  2015-11-19 12:25 ` mcermak at redhat dot com
@ 2015-11-19 12:25 ` mcermak at redhat dot com
  2015-11-20 11:41 ` mcermak at redhat dot com
  2015-11-27 21:56 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: mcermak at redhat dot com @ 2015-11-19 12:25 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 8796
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8796&action=edit
proposed "stream mode" file descriptor fix

Running whole the testsuite on a machine having some CPUs offline shows, that
some testcases, such as argv.exp, fail due to incorrect "stream mode" file
descriptor handling introduced in commit d879410. Proposed fix attached.
Details:

=======
# cat /sys/devices/system/cpu/cpu*/online
0
1
1
1
#
# make installcheck RUNTESTFLAGS='systemtap.base/argv.exp'

... stuff deleted ...

Running ./systemtap.base/argv.exp ...
argc=0
FAIL: argv naked
argc=1
argv[1]=hello
FAIL: argv one
argc=2
argv[1]=hello
argv[2]=world
FAIL: argv two
argc=1
argv[1]=hello
FAIL: argv one other
argc=2
argv[1]=hello
argv[2]=world
FAIL: argv two other
argc=2
argv[1]=hello
argv[2]=world
FAIL: argv two mixed
argc=3
argv[1]=hello
argv[2]=world
argv[3]=mom
FAIL: argv three mixed

... stuff deleted ...

=======

Here the problem is, that staprun's output doesn't go to stdout, but to an
invalid fd (ending up in the terminal) instead, where expect can't capture it
and complains:

=======
# cat systemtap.log 

... stuff deleted ...

Running ./systemtap.base/argv.exp ...
executing: stap ./systemtap.base/argv.stp
FAIL: argv naked
too few lines of output, got 0, expected 1
executing: stap ./systemtap.base/argv.stp hello
FAIL: argv one
too few lines of output, got 0, expected 2

... stuff deleted ...

=======

This can be also demonstrated thusly:

=======
# stap systemtap.base/argv.stp hello &>/dev/null
argc=1
argv[1]=hello
# # ^^ should have ended up in /dev/null
# echo 'stap systemtap.base/argv.stp hello' | bash
ERROR: Couldn't write to output 0 for cpu 1, exiting.: Bad file descriptor
# 
=======

Attached patch, that is now being tested, seems to fix the issue for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/19241] systemtap fails to start when CPU0 is offline
  2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
  2015-11-13 15:25 ` [Bug runtime/19241] " mcermak at redhat dot com
@ 2015-11-19 12:25 ` mcermak at redhat dot com
  2015-11-19 12:25 ` mcermak at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mcermak at redhat dot com @ 2015-11-19 12:25 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Reopening per the above comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/19241] systemtap fails to start when CPU0 is offline
  2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
                   ` (2 preceding siblings ...)
  2015-11-19 12:25 ` mcermak at redhat dot com
@ 2015-11-20 11:41 ` mcermak at redhat dot com
  2015-11-27 21:56 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: mcermak at redhat dot com @ 2015-11-20 11:41 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit dba723bdf68904d18ae25ee00a2705713b21e879.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/19241] systemtap fails to start when CPU0 is offline
  2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
                   ` (3 preceding siblings ...)
  2015-11-20 11:41 ` mcermak at redhat dot com
@ 2015-11-27 21:56 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2015-11-27 21:56 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19241

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mhiramat at redhat dot com

--- Comment #5 from Frank Ch. Eigler <fche at redhat dot com> ---
*** Bug 9820 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-27 21:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 15:20 [Bug runtime/19241] New: systemtap fails to start when CPU0 is offline mcermak at redhat dot com
2015-11-13 15:25 ` [Bug runtime/19241] " mcermak at redhat dot com
2015-11-19 12:25 ` mcermak at redhat dot com
2015-11-19 12:25 ` mcermak at redhat dot com
2015-11-20 11:41 ` mcermak at redhat dot com
2015-11-27 21:56 ` fche at redhat dot com

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).