This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/18999] New: error("") stall (causing similar assert() stall)
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 24 Sep 2015 08:40:32 +0000
- Subject: [Bug runtime/18999] New: error("") stall (causing similar assert() stall)
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18999
Bug ID: 18999
Summary: error("") stall (causing similar assert() stall)
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: ---
When error() is called with an empty string as an arg, it stalls:
=======
7.2 S x86_64 # stap -ve 'probe begin {error("")}'
Pass 1: parsed user script and 110 library script(s) using
214612virt/32028res/3132shr/29360data kb, in 230usr/10sys/235real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s)
using 215404virt/33084res/3252shr/30152data kb, in 10usr/0sys/3real ms.
Pass 3: using cached
/root/.systemtap/cache/b4/stap_b44a1d1ed391a09b0b891376db66bfb3_1328.c
Pass 4: using cached
/root/.systemtap/cache/b4/stap_b44a1d1ed391a09b0b891376db66bfb3_1328.ko
Pass 5: starting run.
^CPass 5: run completed in 0usr/20sys/2879real ms.
7.2 S x86_64 # stap -ve 'probe begin {error(" ")}' # notice the space
Pass 1: parsed user script and 110 library script(s) using
214612virt/32024res/3132shr/29360data kb, in 230usr/10sys/235real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s)
using 215404virt/33080res/3252shr/30152data kb, in 10usr/0sys/3real ms.
Pass 3: using cached
/root/.systemtap/cache/b3/stap_b3b0ce1313330597aaa8518b9ca8a71e_1329.c
Pass 4: using cached
/root/.systemtap/cache/b3/stap_b3b0ce1313330597aaa8518b9ca8a71e_1329.ko
Pass 5: starting run.
ERROR:
WARNING: Number of errors: 1, skipped probes: 0
WARNING: /root/mcermak-systemtap/systemtap-build/bin/staprun exited with
status: 1
Pass 5: run completed in 0usr/20sys/517real ms.
Pass 5: run failed. [man error::pass5]
7.2 S x86_64 #
=======
In result, public tapset function assert() relying on error() behaves similarly
when called with empty string as the second arg:
=======
7.2 S x86_64 # stap -ve 'probe oneshot {assert(0,"")}'
Pass 1: parsed user script and 110 library script(s) using
214612virt/32028res/3132shr/29360data kb, in 230usr/0sys/232real ms.
Pass 2: analyzed script: 1 probe(s), 3 function(s), 0 embed(s), 0 global(s)
using 215404virt/33084res/3252shr/30152data kb, in 10usr/0sys/3real ms.
Pass 3: using cached
/root/.systemtap/cache/94/stap_946fc82b93670c11c0208a9b02d67054_1557.c
Pass 4: using cached
/root/.systemtap/cache/94/stap_946fc82b93670c11c0208a9b02d67054_1557.ko
Pass 5: starting run.
=======
Error is defined like this:
=======
function error (msg:string) %{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
=======
If error("") gets called, it provably finishes, but the session doesn't
terminate probably because of CONTEXT->last_error or CONTEXT->error_buffer
being empty.
--
You are receiving this mail because:
You are the assignee for the bug.