Re: DBI errors for Authentication protocol and old_password segfaults

Patrick Galbraith <[email protected]> Fri, 28 Mar 2008 10:39:01 -0400
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
even if it's not supported, it shouldn't crash it - it's just a database 
call from client to server that either passes or fails. What if you run 
that command in the mysql client?

Musolino, Peter wrote:

>I did some normal queries and selecting out of the table is fine.  
>One of the last things it does before the segfault is:  
>write(1, "\21\0\0\0\3set autocommit=1", 21) = 21
>
>I have been looking around a bit more and I am wondering if it is related to this old bug here:
>http://bugs.mysql.com/bug.php?id=24244
>
>I never actually see that message about autocommit not being supported in any of my stack traces or log files though.
>
>-----Original Message-----
>From: Patrick Galbraith [mailto:[email protected]] 
>Sent: 27 March 2008 21:27
>To: Musolino, Peter
>Cc: [email protected]
>Subject: Re: DBI errors for Authentication protocol and old_password segfaults
>
>Is there any way you could write a simple DBI perl script to connect to 
>the db, select something out of a table, etc.. That way you could 
>isolate it a bit more, and if there's anything wrong with the driver, I 
>can look at it.
>
>Musolino, Peter wrote:
>
>  
>
>>Hi,
>>I have been working on a problem relating to Request Tracker.  I have been scouring the web for answers to questions, but instead of answers, I just get new questions.
>>A bit about the environment, the modules, and the app:
>>
>>RHEL 4.0 Update 6
>>Apache 2.0.52-38
>>MySQL-client-standard 5.0.24a-0
>>MySQL-devel-standard-5.0.24a-0
>>MySQL-server-standard-5.0.24a-0
>>MySQL-shared-compat-5.0.24a-0
>>mod_perl 2.0.1
>>DBD::mysql 4.006
>>DBI 1.604
>>RT 3.6.6
>>DBIx::SearchBuilder-1.51
>>
>>We were first getting the following error in the apache error logs:
>>
>>DBI connect('dbname=rt3;host=localhost','rt',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle.pm line 106
>>[Wed Mar 26 09:47:11 2008] [error] [client 10.20.1.102] Connect Failed Client does not support authentication protocol requested by server; consider upgrading MySQL client\n at /opt/rt3/lib/RT.pm line 220\n
>>
>>I checked and there would be no reason that the DBD::mysql would not be using anything but the latest mysql client libraries, so I am not sure why it is still trying to use the older protocol and choking on the new long password scheme.  So I took the second of the more suggested routes and changed the password of that user with the old_password method.  Instead of that error, I started to get segfaults.
>>
>>[Tue Mar 25 12:26:40 2008] [notice] child pid 25271 exit signal Segmentation fault (11)
>>
>>There were no errors in the mysql err logs nor the system logs.
>>
>>I decided to do an strace against the running apache process and saw the following:
>>
>>connect(1, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
>>setsockopt(1, SOL_IP, IP_TOS, [8], 4)   = -1 EOPNOTSUPP (Operation not supported)
>>setsockopt(1, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
>>read(1, ">\0\0\0", 4)                   = 4
>>read(1, "\n5.0.24a-standard\0\304\224\0\0-gCVdwJK\0,"..., 62) = 62
>>open("/usr/share/mysql/charsets/Index", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
>>write(1, "\24\0\0\1\217 \0\0\0rt\0P[XJIQKK\0rt3", 24) = 24
>>read(1, "\5\0\0\2", 4)                  = 4
>>read(1, "\0\0\0\2\0", 5)                = 5
>>fcntl64(1, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
>>read(1, 0xc0977b8, 8192)                = -1 EAGAIN (Resource temporarily unavailable)
>>fcntl64(1, F_SETFL, O_RDWR)             = 0
>>write(1, "\21\0\0\0\3set autocommit=1", 21) = 21
>>read(1, "\5\0\0\1", 4)                  = 4
>>read(1, "\0\0\0\2\0", 5)                = 5
>>time(NULL)                              = 1206447319
>>time(NULL)                              = 1206447319
>>--- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>chdir("/etc/httpd")                     = 0
>>rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
>>kill(5043, SIGSEGV)                     = 0
>>sigreturn()                             = ? (mask now [])
>>--- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>Process 5043 detached
>>
>>The Index error is for missing files which can be found in mysql 3.0.  I copied the Index files and relevant .conf files into the charsets directory and the Index error and replaced with 
>>
>>open("/usr/share/mysql/charsets/Index", O_RDONLY|O_LARGEFILE) = 36
>>fstat64(36, {st_mode=S_IFREG|0755, st_size=549, ...}) = 0
>>mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e63000
>>read(36, "# sql/share/charsets/Index\n#\n# T"..., 4096) = 549
>>read(36, "", 4096)                      = 0
>>close(36)                               = 0
>>munmap(0xb7e63000, 4096)                = 0
>>
>>However the segfault still remains.
>>
>>I also ran an strace against mysql and got a similar error.
>>
>>fcntl64(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
>>accept(12, {sa_family=AF_FILE, path="��
>>n"}, [2]) = 18
>>fcntl64(12, F_SETFL, O_RDWR)            = 0
>>getsockname(18, {sa_family=AF_FILE, path="/var/lib/mysql"}, [28]) = 0
>>fcntl64(18, F_SETFL, O_RDONLY)          = 0
>>fcntl64(18, F_GETFL)                    = 0x2 (flags O_RDWR)
>>fcntl64(18, F_SETFL, O_RDWR|O_NONBLOCK) = 0
>>setsockopt(18, SOL_IP, IP_TOS, [8], 4)  = -1 EOPNOTSUPP (Operation not supported)
>>time(NULL)                              = 1206613476
>>clone(child_stack=0xb16b24c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED, parent_tidptr=0xb16b2be8, {entry_number:6, base_addr:0xb16b2ba0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb16b2be8) = 13994
>>select(13, [10 12], NULL, NULL, NULL <unfinished ...>
>>
>>I am fresh out of ideas.  Can anyone assist?  I have posted to the RT list have not yet received any response and given roots in mysql and DBI, I thought this would be appropriate
>>
>>Thanks in advance,
>>
>>Peter Musolino
>>D.B. Zwirn (UK) Ltd.
>>peter.musolino a t dbzco.com
>>
>>
>>
>>
>>
>>This e-mail message is intended only for the named recipient(s) above.  It may contain confidential information.  If you are not the intended recipient, you are hereby noti
>>fied that any use, dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited.  D.B. Zwirn & Co., L.P. reserves the right to archive
>>and monitor all e-mail communications through its networks.  If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and
>>delete the message and any attachment(s) from your system.  Thank you.
>>
>> 
>>
>>    
>>
>
>
>  
>


-- 
Patrick Galbraith, Senior Programmer 
Grazr - Easy feed grazing and sharing
http://www.grazr.com 

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad




-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]