[Mod_log_sql] Segfault in 1.99 with CGI Args

Douglas E. Warner silfreed at silfreed.net
Wed Aug 18 13:06:08 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 18 August 2004 13:51, Edward Rudd wrote:
> What is the URL that is being requested?
http://localhost/netmrg/login.php

If I included a '?stuff=junk' after the login.php, it worked without 
segfaulting.

> Is the database running? are there connections to the database? 
Yes, and yes; guess I should have included a little more from the error_log:

[Wed Aug 18 10:34:16 2004] [debug] mod_log_sql.c(450): mod_log_sql: 
open_logdb_link successful
[Wed Aug 18 10:34:16 2004] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost' 
PORT: '3306' DB: 'aplog' USER: 'r
oot' SOCKET: '/var/lib/mysql/mysql.sock'
[Wed Aug 18 10:34:16 2004] [debug] mod_log_sql.c(450): mod_log_sql: 
open_logdb_link successful
[Wed Aug 18 10:34:16 2004] [notice] Apache/2.0.50 (Fedora) configured -- 
resuming normal operations
[Wed Aug 18 10:34:16 2004] [info] Server built: Jun 29 2004 12:19:05
[Wed Aug 18 10:34:16 2004] [debug] prefork.c(955): AcceptMutex: sysvsem 
(default: sysvsem)
[Wed Aug 18 10:34:16 2004] [debug] mod_log_sql_mysql.c(54): HOST: 'localhost' 
PORT: '3306' DB: 'aplog' USER: 'r
oot' SOCKET: '/var/lib/mysql/mysql.sock'
[Wed Aug 18 10:34:16 2004] [debug] mod_log_sql.c(450): mod_log_sql: 
open_logdb_link successful
[Wed Aug 18 10:34:25 2004] [debug] functions.h(180): watching for cookie 
'PHPSESSID'
[Wed Aug 18 10:34:25 2004] [debug] functions.h(206): Cookie: [-SNIP-]
[Wed Aug 18 10:34:25 2004] [debug] mod_log_sql_ssl.c(74): SSL_CIPHER:
[Wed Aug 18 10:34:25 2004] [debug] mod_log_sql_ssl.c(42): SSL_KEYSIZE:
[Wed Aug 18 10:34:25 2004] [debug] mod_log_sql_ssl.c(58): SSL_ALGKEYSIZE:
[Wed Aug 18 10:34:25 2004] [debug] mod_log_sql.c(1036): mod_log_sql: access 
string: insert  into access_log (ag..[-SNIP-]...)
[Wed Aug 18 10:34:26 2004] [notice] child pid 20499 exit signal Segmentation 
fault (11)


> If you could actually run apache in a gdb and get a backtrace, that
> would be more helpful.
>

I tried, but my apache binary is stripped, so it doesn't help much.

> Having a ,, is not a problem with SQL, it just means there was no
> query_arg specified. And it's getting past the escaping of the
> request_args.. I think this is more of a mysql lost connection and mysql
> client libs being stupid.
>

Yeah, my mysql-client says this when I try that query:

mysql> insert  into access_log 
(agent,request_args,bytes_sent,cookie,request_protocol,remote_host,id,machine_id,request_method,referer,time_stamp,status,request_duration,request_uri,remote_user,virtual_host,ssl_cipher,ssl_keysize,ssl_maxkeysize) 
values ('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040612 
Firefox/0.8',,'2007','3e16f04ec7b00756111f69eb2f742790','HTTP/1.1','127.0.0.1','54FabX8AAAEAADa6OfUAAAAA','web0','GET','-','1092849722','200','0','/netmrg/login.php','-','localhost','0','0','0');
ERROR 1064: You have an error in your SQL syntax near 
''2007','3e16f04ec7b00756111f69eb2f742790','HTTP/1.1','127.0.0.1','54FabX8AAAEAAD' 
at line 1

And I'm currently running MySQL 3.23.58 on my test box, and 4.0.18 on my 
production servers.

Of course, my other email has made it to the list since this one, but let me 
know if you'd like any more information about my setup.

- -Doug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBI5qQJV36su0A0xIRAlhrAKD9OqRdnZXKA0IODPC+GKmY79qG+ACeLitx
PVLZmGjsLRsBwJWoh1BLefE=
=uXyn
-----END PGP SIGNATURE-----



More information about the Mod_log_sql mailing list