Showing entries 21 to 30 of 39
« 10 Newer Entries | 9 Older Entries »
Displaying posts with tag: debugging (reset)
Videos of Pythian Sessions from the 2010 O’Reilly MySQL Conference and Expo

Here’s a sneak peek at a video matrix — this is all the videos that include Pythian Group employees at the MySQL conference. I hope to have all the rest of the videos processed and uploaded within 24 hours, with a matrix similar to the one below (but of course with many more sessions).

Title Presenter Slides Video link
(hr:min:sec)
Details (Conf. site link)
Main Stage
Keynote: Under New Management: Next Steps for the Community Sheeri K. Cabral (Pythian) N/A 18:16
[Read more]
How to debug MySQL Connector Library in Visual Studio

In text:

1. Download “mysql-connector-net-6.2.2-src.zip”  from http://dev.mysql.com/downloads/connector/net/ and extract the zip file.  Note that we need ‘src’ version of library if we want to debug in visual studio.

2. Open your Visual Studio Solution and add  “Mysql.data.csproj”  located at  “MySql.Data\Provider\” inside the extracted archive.

3. Add this project’s reference to your project (mysql.data).

4. Now you can debug into mysql.data methods.

MariaDB Buildbot configuration file published

I have now published the Buildbot configuration file that we use for our continuous integration tests in our Buildbot setup. Every push into main and development branches of MariaDB is built and tested on a range of platforms to catch and fix any problems early (and we also test MySQL releases before merging to easily see whether any new problems already existed in MySQL or were introduced by something specific to MariaDB).

The configuration is included in the Tools for MariaDB Launchpad project.

Now, the Buildbot configuration file is not something that most …

[Read more]
Fixing a MariaDB package bug

One of the things that I am really happy about in MariaDB is that we have our releases available as apt (and yum for Centos) repositories. This is largely thanks to being able to build this on the OurDelta package build infrastructure (which again builds on things like the Debian packaging scripts for MySQL).

Something like the Debian apt-get package system (which is also used by Ubuntu) is one of the major innovations in the Free Software world in my opinion. Debian has spent many years refining this system to where it is today. Want to run the mysql client, but it isn't installed? Just try to run it on your local Ubuntu host:

    $ mysql
    The program 'mysql' can be found in the following packages:
     * mysql-client-5.0
     * mysql-client-5.1
    Try: sudo apt-get install <selected package>
    -bash: mysql: command not found

Installing …

[Read more]
Debugging and ripple effects

Like I said earlier, every tiny change that the test suite reveals after code changes is significant. I caught a very subtle “bug” today in recent changes to mk-query-digest (a.k.a. mqd). If you like to read about subtle bugs, read on.

An mqd test on sample file slow023.txt began to differ after some pretty extensive code changes of late:

< # Query 1: 0 QPS, 0x concurrency, ID 0x8E38374648788E52 at byte 0 ________
---
> # Query 1: 0 QPS, 0x concurrency, ID 0x2CFD93750B99C734 at byte 0 ________

The ID which depends on the query’s fingerprint has changed. It’s very important that we don’t suddenly change these on users because these IDs are pivotal in trend analyses with mqd’s --review-history option. First some background info on the recent code changes and then the …

[Read more]
How GDB helped me fix a Drizzle Bug


The other day I found a nice surprise on my inbox. Jay Pipes asked me if I'd like to try fixing a small bug on Drizzle. It looked pretty simple, and the bug report included a big part of the fix. I accepted without a doubt.
I decided to first change trans_prealloc_size from uint32_t to uint64_t. That was done on drizzled/session.h. Then, I went to drizzle/set_var.cc and changed sys_trans_prealloc_size from …

[Read more]
MySQL Proxy: profiling 0.8

In MySQL Proxy 0.8 we are added a multi-threaded network-subsystem allowing several networks events be processed in parallel. Early benchmarks show that what we have in trunk basicly works.

But the benchmarks weren't as good as we expected. That's the time where you prepare to get dirty.

While Kay went with lockstat to analyze the proxy on solaris and found that g_atomic_int_get() isn't using native code if built with Sun's CC, I attacked the Linux side with oprofile.

After rebuilding the proxy with -fno-omit-frame-pointer I got the information I was looking for from oprofile:

$ opcontrol --vmlinux=...
$ opcontrol --callgraph=5
$ opcontrol …
[Read more]
GDB: auto-stacktrace

While developing mysql-proxy I sometimes have to step-by-step refactoring that usually result in unstable code for a while until the unit-tests are happy again.

When a unit-test fails I usually use gdb as a wrapper and let it create a stack-trace for me:

$ gdb --command=backtrace.gdb --args /path/to/my/testcase

The --command option is used to automate gdb:

run
thread apply all bt
quit

If the test finishes successfully, gdb will just quit, but on error we will get a nice, all-threads stack-trace.

In the end it looks like:

$ gdb --command=backtrace.gdb --args .../tests/unit/t_network_io
...
Program received signal SIGINT, Interrupt.
0x909f43ae in __semwait_signal ()

Thread 2 (process 49948 thread 0x1003):
#0  0x90a1d906 in kevent ()
#1  0x0006ee40 in kq_dispatch ()
#2  0x00062b26 in event_base_loop ()
#3  0x0000781a in mock_server (_udata=0x907dd0) at …
[Read more]
More on DTrace ... and MySQL

Angelo recently showed an easy way to dump SQL queries using DTrace, while reading the articles I felt that some important information is missing: The name of the user executing the query and the selected database. So I sat down a few minutes and tried to collect that data.

For the database name I found a quite simple solution: It is passed as parameter to the check_user() function to MySQL so we can easily add a thread-local variable to keep that name. Simple script for that:

#!/usr/sbin/dtrace -s

#pragma D option quiet

pid$1::*check_user*:entry
{
self->db = arg4 ? copyinstr(arg4) : "(no schema)";
}

pid$1::*dispatch_command*:entry
{
printf("%s: %s\n", self->db, copyinstr(arg2));
}

Getting the username is a bit harder, for the …

[Read more]
The unexpected consequences of SELinux

I’ve been working with a client recently who has SELinux on his servers.  It has been quite a struggle sometimes.

My colleages tell me that SELinux has a pretty noticeable performance impact.  I am not sure if we have benchmarks to support this; at any rate, the client said it’s OK, we’ll take the performance hit.

There [...]

Showing entries 21 to 30 of 39
« 10 Newer Entries | 9 Older Entries »