Bug#470668: libmysqlclient: access to mysql remote server cause "unaligend access" in kernel log

2008-03-14 Thread Grant Grundler
On Fri, Mar 14, 2008 at 11:59:00AM +0100, Rapha?l RIGNIER wrote:
> Grant Grundler a ?crit :
>
> Hello, thank you for the answer.

welcome!


>> It's possible the bug is hppa specific. But I suggest adding some
>> more details with what you mean by "seems doesn't work".
>> e.g. how to reproduce and some relevant config files so folks
>> can reproduce this on other architectures and/or search google
>> for similar bug reports.
...
> Ok, then the bug coud be libpam_mysql  0.6.2-1 related.

This is _much_ better info. Someone with more libpam foo
should be able to ask the right questions to move this along.

>
> For testing I've used vsftpd service
> here's my pam.d/vsftpd
> -
> auth required pam_mysql.so host=veloce user=ftpuser passwd=ftpuser 
> db=ftpuser table=user usercolumn=user.login passwd column=user.password 
> crypt=2 verbose=1 statcolumn=user.etat
> account required pam_permit.so
> session required pam_permit.so
> 
> into the table on veloce host (mysql server 4.1)  : insert into user 
> (user,password,etat) values ('doe.j', PASSWORD('test'),NULL)
> --
> verbose output
>
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - option verbose is set to "1"
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - option statcolumn is set to 
> "user.etat"
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_close_db() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_sm_authenticate() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_converse() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_open_db() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_open_db() returning 0.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_check_passwd() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_format_string() called
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_quick_escape() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_quick_escape() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_quick_escape() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_quick_escape() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - SELECT user.password FROM user 
> WHERE user.login = 'doe.j'
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_sql_log() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_sql_log() returning 0.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_check_passwd() 
> returning 6.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_sm_authenticate() returning 
> 7.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_release_ctx() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_destroy_ctx() called.
> Mar 14 11:34:36 vivace vsftpd: pam_mysql - pam_mysql_close_db() called.
>
> With wireshark sniffing the Mysql result is retruned with the encrypted 
> value of password column. It's correct.

Good :)
"returning 6" is the error I assume that we should NOT be getting. Right?

> It could be mysql PASSWORD() trouble but the same user with mysql_auth 
> program (used with squid) linked with same library returns OK...

Perhaps the bug is in vsftpd somehow?
Or perhaps a difference in how the programs were compiled or linked?
Are the parameters to pam_mysql_check_passwd() from vsftpd
and mysql_authd the same?

> All what I could precise for now...
>
> Any idea? thank you.

Not really. I think someone with more interest and knowledge of vsftpd
or libpam_mysql should now be able to track this down.

thanks,
grant


>
>>> -- System Information:
>>> Debian Release: 4.0
>>>   APT prefers stable
>>>   APT policy: (500, 'stable')
>>> Architecture: hppa (parisc64)
>>> Shell:  /bin/sh linked to /bin/bash
>>> Kernel: Linux 2.6.18-6-parisc64
>>> Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
>>> 
>



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#470668: libmysqlclient: access to mysql remote server cause "unaligend access" in kernel log

2008-03-13 Thread Grant Grundler
On Wed, Mar 12, 2008 at 06:42:48PM +0100, Raphael RIGNIER wrote:
> Package: libmysqlclient
> Version: 5.0.32-etch5
> Severity: important
> 
> Hello,
> 
> Since I've dist-upgraded my HP9000 from sarge to etch, I've got trouble with
> mysql client library.
> 
> each time a programm accesses to a remote mysql host server, i've got 6 lines 
> error like
> :  unaligned access to 0xc00a7ca6 at ip=0x4060c603

Those are not errors. It's just a clue that this program will suffer
performance degradation because it's trapping into the kernel for
every unaligned access. The kernel is emulating the unaligned access.

One can turn off this warning with prctl:
SYNOPSIS
   prctl [-v] [-h|--help] [--version] <-q|> [command]

   where  are:

   --unaligned=[silent|signal|always-signal|default]
   --fpemu=[silent|signal|default]

You want "--unaligned=silent" if you don't care about the performance
or don't plan on fixing the reports.

> 
> examples : 
> mysql -h remotehost
> mysql_connect() from php page
> 
> it stills works for most programs that require mysql TCP/IP access but with
> thoses errors in kernel log.
> 
> libpam_mysql (I use it with squid) seems doesn't work ...
> 
> I suspect hppa specific port troubles.

Problems with libpam_mysql are unlikely to be related to the
misaligned accesses since this has been pretty well tested.

It's possible the bug is hppa specific. But I suggest adding some
more details with what you mean by "seems doesn't work".
e.g. how to reproduce and some relevant config files so folks
can reproduce this on other architectures and/or search google
for similar bug reports.

hth,
grant

> 
> -- System Information:
> Debian Release: 4.0
>   APT prefers stable
>   APT policy: (500, 'stable')
> Architecture: hppa (parisc64)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.18-6-parisc64
> Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#470668: libmysqlclient: access to mysql remote server cause "unaligend access" in kernel log

2008-03-12 Thread Raphael RIGNIER
Package: libmysqlclient
Version: 5.0.32-etch5
Severity: important

Hello,

Since I've dist-upgraded my HP9000 from sarge to etch, I've got trouble with
mysql client library.

each time a programm accesses to a remote mysql host server, i've got 6 lines 
error like
:  unaligned access to 0xc00a7ca6 at ip=0x4060c603

examples : 
mysql -h remotehost
mysql_connect() from php page

it stills works for most programs that require mysql TCP/IP access but with
thoses errors in kernel log.

libpam_mysql (I use it with squid) seems doesn't work ...

I suspect hppa specific port troubles.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: hppa (parisc64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-parisc64
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]