From dev-return-9198-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Feb 13 05:59:28 2003
Return-Path:
Delivered-To: apmail-apr-dev-archive@apr.apache.org
Received: (qmail 65193 invoked by uid 500); 13 Feb 2003 05:59:28 -0000
Mailing-List: contact dev-help@apr.apache.org; run by ezmlm
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
Delivered-To: mailing list dev@apr.apache.org
Received: (qmail 65180 invoked from network); 13 Feb 2003 05:59:27 -0000
From: "Paul Querna"
To: dev@apr.apache.org
Cc: rje@cyan.com
Subject: problems using apr_reslist
Date: Wed, 12 Feb 2003 21:55:29 -0800
Message-Id: <20030213055529.M55879@cyan.com>
X-Mailer: Open WebMail 1.81 20021223
X-OriginatingIP: 10.0.0.1 (chip)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
To Start off, I just started playing with APR this week, so this might be a
very simple, and stupid mistake, So please forgive me if it is :-)
I am working on mod_authn_mysql, using the new Auth*Providers in
Apache2.1-dev.(Apache2.1 & APR copied from CVS on monday/tuesday)
I had it basicly working without any persistant or pooling of connections. (on
new Auth request, open up a new MySQL Connection, run the queries, and then
close everything up). That is not a Good Thing(tm) in the long run.
I have been trying to use apr_reslist as a medium to provide both persistance,
and pooling of the database connections.
I have put a copy of it onto here:
http://open.cyanworlds.com/~chip/temp/mod_authn_mysql.c
Assuming that I am using apr_reslist correctly, it seems like the MySQL
objects when created are fine, but when i try to get one back out, somthing
about them is messed up.
Running Apache from within gdb shows this:
Starting program: /home/chip/apache2_unstable/bin/httpd -X -k start
[New Thread 1024 (LWP 10878)]
(new_server)MySQL Object is at: 0xBFFFF510
MySQL DB Info... : Uptime: 121110 Threads: 23 Questions: 299435 Slow
queries: 0 Opens: 26 Flush tables: 1 Open tables: 20 Queries per second
avg: 2.472
(get_server)MySQL Object is at: 0xBFFFF5A0
MySQL DB Info... : Commands out of sync; You can't run this command now
(mysql_query)MySQL Object: 0xBFFFF590
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 10878)]
0x403135a7 in vio_is_blocking () from /usr/lib/mysql/libmysqlclient.so.10
(gdb) bt
#0 0x403135a7 in vio_is_blocking () from /usr/lib/mysql/libmysqlclient.so.10
#1 0x4030f3e3 in simple_command () from /usr/lib/mysql/libmysqlclient.so.10
#2 0x40312144 in mysql_stat () from /usr/lib/mysql/libmysqlclient.so.10
#3 0x4002d495 in safe_mysql_query (mysql_auth=0x814f768, res=0x0, r=0x8149278,
query=0x814d288 "select Password from TheAccounts where MyName='blahblah'
and IsActive!=0", sec=0x8101500) at mod_authn_mysql.c:350
#4 0x4002d885 in get_mysql_realm_hash (r=0x8149278, user=0x6d6d6f43 ,
realm=0x73646e61 , rethash=0x74756f20)
at mod_authn_mysql.c:483
#5 0x0806744b in get_hash (r=0x6e616d6d, user=0x6f6e2064 , conf=0x8100077) at mod_auth_digest.c:1500
#6 0x6f632073 in ?? ()
Cannot access memory at address 0x69687420
any help or pointers would be great.
thanks,
-chip