Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-06 Thread Y Song via iovisor-dev
100% agree. Will work on a test case soon (maybe next week). On Tue, Jun 6, 2017 at 9:01 PM, Brenden Blanco wrote: > Also, I would suggest that after that fix, we also update the test to > include actually testing for proper values. Probably you can send the values > over the perf ring buffer and

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-06 Thread Y Song via iovisor-dev
Done. Sorry, I actually pushed the change to my yhs_dev branch last night, but forgot to generate a pull request ... On Tue, Jun 6, 2017 at 8:59 PM, Brenden Blanco wrote: > Yonghong, can you send a PR for your branch? > > On Tue, Jun 6, 2017 at 12:20 AM, Y Song via iovisor-dev > wrote: >> >> Hi,

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-06 Thread Brenden Blanco via iovisor-dev
Also, I would suggest that after that fix, we also update the test to include actually testing for proper values. Probably you can send the values over the perf ring buffer and assert at the end that all of the values are collected properly. On Tue, Jun 6, 2017 at 8:59 PM, Brenden Blanco wrote:

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-06 Thread Brenden Blanco via iovisor-dev
Yonghong, can you send a PR for your branch? On Tue, Jun 6, 2017 at 12:20 AM, Y Song via iovisor-dev < iovisor-dev@lists.iovisor.org> wrote: > Hi, Tetsuo, > > You are right. The bug is actually introduced by my last patch. I just > focused one aspect of issue and inadvertently introduced another

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-06 Thread Y Song via iovisor-dev
Hi, Tetsuo, You are right. The bug is actually introduced by my last patch. I just focused one aspect of issue and inadvertently introduced another *blocker* bug. I just pushed a patch. Thanks a lot for reporting the issue and testing out the fix. Yonghong On Mon, Jun 5, 2017 at 5:25 PM, Tetsuo

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-05 Thread Tetsuo Handa via iovisor-dev
Hello. I changed the hook as below and confirmed that cp == NULL at bpf_probe_read(). That is, it is bpf_usdt_readarg() which got broken. -- int do_start(struct pt_regs *ctx) { char *cp = NULL; bpf_usdt_readarg(1, ctx, &cp); struct { char query[QUERY_MAX]; } data = { }; if

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-05 Thread Yonghong Song via iovisor-dev
Tetsuo, I cannot reproduce the issue. The transformation from: dest = ctx->bx; to: dest = *(volatile uint64_t *)&ctx->bx; should be safe. I launched a psql console and did a query: ... yhs=> SELECT order_id FROM order_details; order_id -- 6 (1 row) ... On the usdt side,

Re: [iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-05 Thread Y Song via iovisor-dev
Tetsuo, I cannot reproduce the issue. The transformation from: dest = ctx->bx; to: dest = *(volatile uint64_t *)&ctx->bx; should be safe. I launched a psql console and did a query: ... yhs=> SELECT order_id FROM order_details; order_id -- 6 (1 row) ... On the usdt side, I

[iovisor-dev] [iovisor/bcc] USDT broken by b0f891d129a9b372

2017-06-05 Thread Tetsuo Handa via iovisor-dev
Hello. I noticed that b0f891d129a9b372 ("Force udst ctx->#reg load to be volatile") broke an USDT probe example shown below. -- #!/usr/bin/python >from bcc import BPF, USDT import sys import ctypes as ct def usage(): print("USAGE: usdt PID") exit() if len(sys.argv) < 1: usage