test failure for mysql/5.0/percona_maintained/microslow_innodb.patch

Bug #378834 reported by Neil Katin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OurDelta
Confirmed
Low
Unassigned
Percona patches
Invalid
Undecided
Unassigned

Bug Description

I've been trying to get ready to submit a patch back for ourdelta, and as part of the process I've been trying to get the test suites to run before I change anything.

I found an assertion error in the variables test when applying the mysql/5.0/percona_maintained/microslow_innodb.patch.
(To enable the assertions I configured mysql with the --with-debug=full option).

When the variables test is run it fails the assertion at mysys/my_getopt.c line 830:

    DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);

The optp->var_type value is 11 (a double); the code was expecting an
unsigned long long.

This is the contents of the optp that caused the assertion to fail:

(gdb) print *optp
$1 = {name = 0x97fb96 "long_query_time", id = 415,
  comment = 0x97fba8 "Log all queries that have taken more than long_query_time seconds to execute to file.", value = 0xe17450, u_max_value = 0xe17690,
  str_values = 0x0, var_type = 11, arg_type = REQUIRED_ARG,
  def_value = 10000000, min_value = 0, max_value = 31536000000000,
  sub_size = 0, block_size = 1, app_type = 0}

The "long_query_time" variable is broken.

I think the underlying problem is that query time was originally changed from seconds to microseconds, and then to a double for input/output purposes, but still an unsigned long long internally. The failing assertion is picking up this
mismatch.

I realize this is probably just a test error, but at the very least we should change the test to not be run to avoid
false errors when testing the ourdelta patches. Alternately the underlying code could actually be fixed to not
fail the assertion :->

Revision history for this message
Arjen Lentz (arjen-lentz) wrote : Re: [Ourdelta-developers] [Bug 378834] [NEW] test failure for mysql/5.0/percona_maintained/microslow_innodb.patch
Download full text (4.6 KiB)

Hi Neil,

Good catch.
You'll want to submit a fix in the percona-patches project branch
since that's where we pull in the percona_maintained patches from.
You can tell Launchpad that this bug also belongs to the percona-
patches project (it can be tied to both).

Cheers,
Arjen.

On 21/05/2009, at 7:38 AM, Neil Katin wrote:

> Public bug reported:
>
>
> I've been trying to get ready to submit a patch back for ourdelta,
> and as part of the process I've been trying to get the test suites
> to run before I change anything.
>
> I found an assertion error in the variables test when applying the
> mysql/5.0/percona_maintained/microslow_innodb.patch.
> (To enable the assertions I configured mysql with the --with-
> debug=full option).
>
> When the variables test is run it fails the assertion at
> mysys/my_getopt.c line 830:
>
> DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);
>
> The optp->var_type value is 11 (a double); the code was expecting an
> unsigned long long.
>
> This is the contents of the optp that caused the assertion to fail:
>
> (gdb) print *optp
> $1 = {name = 0x97fb96 "long_query_time", id = 415,
> comment = 0x97fba8 "Log all queries that have taken more than
> long_query_time seconds to execute to file.", value = 0xe17450,
> u_max_value = 0xe17690,
> str_values = 0x0, var_type = 11, arg_type = REQUIRED_ARG,
> def_value = 10000000, min_value = 0, max_value = 31536000000000,
> sub_size = 0, block_size = 1, app_type = 0}
>
> The "long_query_time" variable is broken.
>
> I think the underlying problem is that query time was originally
> changed from seconds to microseconds, and then to a double for input/
> output purposes, but still an unsigned long long internally. The
> failing assertion is picking up this
> mismatch.
>
> I realize this is probably just a test error, but at the very least
> we should change the test to not be run to avoid
> false errors when testing the ourdelta patches. Alternately the
> underlying code could actually be fixed to not
> fail the assertion :->
>
> ** Affects: ourdelta
> Importance: Undecided
> Status: New
>
> --
> test failure for mysql/5.0/percona_maintained/microslow_innodb.patch
> https://bugs.launchpad.net/bugs/378834
> You received this bug notification because you are a member of
> OurDelta-
> developers, which is the registrant for OurDelta.
>
> Status in OurDelta - Builds for MySQL: New
>
> Bug description:
>
> I've been trying to get ready to submit a patch back for ourdelta,
> and as part of the process I've been trying to get the test suites
> to run before I change anything.
>
> I found an assertion error in the variables test when applying the
> mysql/5.0/percona_maintained/microslow_innodb.patch.
> (To enable the assertions I configured mysql with the --with-
> debug=full option).
>
> When the variables test is run it fails the assertion at mysys/
> my_getopt.c line 830:
>
> DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);
>
> The optp->var_type value is 11 (a double); the code was expecting an
> unsigned long long.
>
> This is the contents of the optp that caused the assertion to fail:
>
> (gdb) print *optp
> ...

Read more...

Changed in ourdelta:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Neil Katin (d-launchpad-askneil-com) wrote :

Arjen, I could use some advice on this problem. The "right" fix wasn't very clear
to me.

The new variable type is called "double", but its really a fixed point number, with
magic done by sys_var_thd_microtime.

I'm working on an absolutely minimal patch that just changes the assert to all ULL
and DOUBLE values. But I suspect the name of GET_DOUBLE will confuse folks in
the future.

Revision history for this message
Arjen Lentz (arjen-lentz) wrote : Re: [Percona-discussion] [Bug 378834] Re: test failure for mysql/5.0/percona_maintained/microslow_innodb.patch

Hi Neil

On 21/05/2009, at 12:51 PM, Neil Katin wrote:
> Arjen, I could use some advice on this problem. The "right" fix
> wasn't very clear to me.
> The new variable type is called "double", but its really a fixed
> point number, with
> magic done by sys_var_thd_microtime.
> I'm working on an absolutely minimal patch that just changes the
> assert to all ULL and
> DOUBLE values. But I suspect the name of GET_DOUBLE will confuse
> folks in the future.

Yea it's a practical hack.

You could have a quick peek in the mysql 5.1 codebase, which also
supports fractional seconds for long_query_time.
The implementation is not identical but you may be able to work out
something from that.
I don't remember off-hand what was used there.

Cheers,
Arjen.
--
Arjen Lentz, Director @ Open Query (http://openquery.com)
Affordable Training and ProActive Support for MySQL & related
technologies

Follow our blog at http://openquery.com/blog/
OurDelta: free enhanced builds for MySQL @ http://ourdelta.org

Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

Any news on this one Neil?

Revision history for this message
Stewart Smith (stewart) wrote :

Hi!

We've moved development from percona-patches over to percona-server and we're not seeing this assert in our debug builds. If you can provide a test case or reproduce on current Percona Server, please add percona-server as an affected project and we can go forward fixing it from there.

Thanks,
Stewart Smith
Director of Server Development
Percona

Changed in percona-patches:
status: New → Invalid
Revision history for this message
Stewart Smith (stewart) wrote :

I should add... due to us not seeing this is debug builds of Percona Server currently, I've marked this bug as Invalid. I am (of course) open to re-opening it against Percona Server if it can be reproduced there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.