Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tst.multiagg3.d fails: formatted printa() #5

Closed
euloh opened this issue Jan 7, 2021 · 3 comments
Closed

tst.multiagg3.d fails: formatted printa() #5

euloh opened this issue Jan 7, 2021 · 3 comments
Assignees

Comments

@euloh
Copy link
Member

euloh commented Jan 7, 2021

No description provided.

@euloh
Copy link
Member Author

euloh commented Jan 7, 2021

The test tst.multiaggs3.d fails. (It still has an @@xfail annotation, but that should be lifted.) The problem can be illustrated simply with:

    # dtrace -qn ' BEGIN { @g = avg(1234); printa("%@d\n", @g); exit(0); }'
    dtrace: processing aborted: Invalid return value from callback

The problem is formatted printa().

@euloh
Copy link
Member Author

euloh commented Jan 7, 2021

Kris writes:

This is indeed a bug.  In the original code, the record size stores the size
of the aggregation data.  That is in a sense OK but it is inconsistent with
the fact that all other records store as size the size of the actual data item
in the buffer.  In this case that would be the ID of an aggregation, and thus
it would be a 64-bit value.  The data size of an aggregation is found in the
dtrace_aggdesc_t structure and that is where we should retrieve it from.

But there is another problem...  We are incorrectly (for now) applying the
record offset to the aggdata address, and that mens we're not reading the
correct data.  We should just use aggdata as the address.

@euloh euloh self-assigned this Jan 7, 2021
euloh added a commit that referenced this issue Jan 14, 2021
A few tests were failing due simply to this bug.  Their XFAIL
annotations should be removed.  Add stddev and llquantize to
tst.basics.d so that all aggregation functions are tested;  each
function causes a specific callback to be used.

#5
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
@kvanhees
Copy link
Member

Verified as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants