[unixODBC-support] Poolling Segfault

Paul dufflebunk at dufflebunk.homeip.net
Wed Jul 21 17:44:20 BST 2004

After recompiling mysql with debugging on, I have discovered that it
segfaults when derefrencing the vio pointer (set to 0x3!):
(gdb) where
#0  0x402574a2 in vio_blocking (vio=0x3, set_blocking_mode=0 '\0', 
    old_mode=0xbffebb1f "¿\230Î\005\bÔé%@h»þ¿\034\bp>\006\böª%@\030³#@,\ah3\006\bXX\001@\230Î\005\bØ\233\220»þ¿") at viosocket.c:107
#1  0x40257ad2 in net_clear (net=0x8063e70) at net.c:179
#2  0x4024081c in simple_command (mysql=0x8063e70, command=COM_QUIT, arg=0x0, 
    length=0, skipp_check=1 '\001') at libmysql.c:535
#3  0x402437ca in mysql_close (mysql=0x8063e70) at libmysql.c:2196
#4  0x4020532d in my_SQLDisconnect (hdbc=0x8063e6c) at connect.c:802
#5  0x40205436 in SQLDisconnect (hdbc=0x8063e6c) at connect.c:824
#6  0x4003a7e4 in close_pooled_connection (ptr=0x8063368) at SQLConnect.c:2598
#7  0x4003aa1d in search_for_pool (connection=0x804a1c0, 
    server_name=0xbffed872 "ktparts-p", name_length1=-3, 
    user_name=0xbffed87c "mysql", name_length2=-3, 
    authentication=0xbffed882 "mysql", name_length3=-3, connect_string=0x0, 
    connect_string_length=0) at SQLConnect.c:2762
#8  0x4003b996 in SQLConnect (connection_handle=0x804a1c0, 
    server_name=0xbffed872 "ktparts-p", name_length1=-3, 
    user_name=0xbffed87c "mysql", name_length2=-3, 
    authentication=0xbffed882 "mysql", name_length3=-3) at SQLConnect.c:3357
#9  0x08048823 in main (argc=5, argv=0xbffecf04) at poolcrash.c:26

The first time around, vio is a normal looking pointer, but I can't
figure out where it's getting changed to 0x3.

What's the second step?

On Wed, 2004-07-21 at 07:58 +0100, Nick Gorham wrote:
> Paul wrote:
> > 
> > I don't know if this is a problem in the way I'm doing pooling, a bug in
> > unixODBC, MyODBC, or even MySQL. Any help would be apreciated.
> > 
> Not sure, but the fact that it crashes with 2.2.6 and 2.2.9 does point 
> away from the driver manager as the pooling changed quite a bit for 
> 2.2.9. It may be whatever the DM is asking the driver to do, but its 
> falling over in the driver, so I guess the first step is finding out 
> what causes a seg fault in that mysql lib function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20040721/902aed20/attachment.bin>

More information about the unixODBC-support mailing list