Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters

From: digoal <digoal(at)126(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters
Date: 2013-11-11 00:20:58
Message-ID: 1375a3fc.57e.14244886433.Coremail.digoal@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

HI,
Thanks tom lane.
The stap 2.4 version has same problem, I need use @var("varname") get the value instead $argN.

[root(at)db-172-16-3-150 ~]# stap -V
Systemtap translator/driver (version 2.4/0.152, commit release-2.3-133-g335e342 + changes)
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: LIBSQLITE3 BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS JAVA
[root(at)db-172-16-3-150 ~]# which stap
/opt/systemtap/bin/stap
[root(at)db-172-16-3-150 ~]# stap --vp 11111 -e '
> probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {
> println($$vars)
> exit()
> }'
Pass 1: parsed user script and 96 library script(s) using 152024virt/25212res/2104shr/23932data kb, in 240usr/10sys/253real ms.
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+40(%rip)': identifier '$$vars' at <input>:3:11
source: println($$vars)
^
WARNING: Can't parse SDT_V3 operand 'NBuffers(%rip)': identifier '$$vars' at :3:11
source: println($$vars)
^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+44(%rip)': identifier '$$vars' at :3:11
source: println($$vars)
^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+48(%rip)': identifier '$$vars' at :3:11
source: println($$vars)
^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+52(%rip)': identifier '$$vars' at :3:11
source: println($$vars)
^
semantic error: unable to find local 'arg1', [man error::dwarf] dieoffset 0xd00f5 in /home/pg93/pgsql9.3.1/bin/postgres, near pc 0x4b9789 in CreateCheckPoint xlog.c (alternatives: $flags $shutdown $checkPoint $recptr $Insert $rdata $freespace $_logSegNo $vxids $nvxids $__func__): identifier '$$vars' at :3:11
source: println($$vars)
^

semantic error: SDT asm not understood, requires debuginfo: identifier '$$vars' at :3:11
source: println($$vars)
^

Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 176172virt/32892res/5620shr/27852data kb, in 30usr/10sys/151real ms.
Pass 2: analysis failed. [man error::pass2]

Use @var("varname") can get the value correct.
[root(at)db-172-16-3-150 ~]# stap --vp 11111 -e '
probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {
println(@var("NBuffers"))
exit()
}'
Pass 1: parsed user script and 96 library script(s) using 152024virt/25212res/2104shr/23932data kb, in 240usr/20sys/254real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 0 embed(s), 0 global(s) using 175644virt/32208res/5524shr/27324data kb, in 30usr/0sys/36real ms.
Pass 3: translated to C into "/tmp/stap9yW3g4/stap_4e8bb94e54f595ef6f3e48aed9859200_1792_src.c" using 303812virt/32556res/5872shr/27324data kb, in 20usr/100sys/109real ms.
Pass 4: compiled C into "stap_4e8bb94e54f595ef6f3e48aed9859200_1792.ko" in 2290usr/410sys/2699real ms.
Pass 5: starting run.
2621440
Pass 5: run completed in 0usr/30sys/11089real ms.

--
公益是一辈子的事,I'm Digoal,Just Do It.

At 2013-11-11 05:54:50,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> digoal wrote:
>>> But the CHECKPOINT_DONE used in src have parameters:
>>> CheckpointStats.ckpt_bufs_written,
>>> NBuffers,
>>> CheckpointStats.ckpt_segs_added,
>>> CheckpointStats.ckpt_segs_removed,
>>> CheckpointStats.ckpt_segs_recycled
>
>> Uh, you're right. I confused it with BUFFER_CHECKPOINT_DONE.
>
>> I have no useful answer for this right now. The types of the parameters
>> appear correct, but that's as further as I checked.
>
>FWIW, I'd guess this is a bug in systemtap, and accordingly should be
>reported to those folk. Try filing at bugzilla.redhat.com ... although
>they might tell you to try a supported systemtap release, which yours
>isn't AFAICT. What I see on my RHEL6 box is systemtap-1.8-7.el6.x86_64
>and stap -V sez
>
>Systemtap translator/driver (version 1.8/0.152 non-git sources)
>Copyright (C) 2005-2012 Red Hat, Inc. and others
>This is free software; see the source for copying conditions.
>enabled features: AVAHI LIBRPM LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS
>
> regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-11-11 01:13:05 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Previous Message Andres Freund 2013-11-10 23:57:03 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist