lists.arthurdejong.org
RSS feed

Re: RPM packaging for version 0.8.12

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: RPM packaging for version 0.8.12



On Wed, 2013-01-09 at 11:53 +0100, Juan Asensio Sánchez wrote:
> Attached there are the results of the configure and strace commands
> you requested for version 0.8.12 with previously attached test_tio.c.

The strace output seems to suggest a bug in glibc or the kernel in the
handling of the poll() call:

     0.000079 gettimeofday({1357725253, 65798}, NULL) = 0
     0.000088 gettimeofday({1357725253, 65968}, NULL) = 0
     0.000165 poll([{fd=4, events=POLLIN}], 1, 1100) = 0 (Timeout)
     0.274464 time(NULL)                = 1357725253

This indicates that there are 0.274464 seconds between the start of the
poll() call and the subsequent time() call. The poll() should have taken
at least 1.1 seconds (1100 milliseconds) if the return value is 0.

> This is the info about my system (perhaps the default installation
> doesn't install the centosplus kernel):
> 
> [root@myserver ~]# lsb_release -a
> LSB
> Version:    
> :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
> Distributor ID:    CentOS
> Description:    CentOS release 5.5 (Final)
> Release:    5.5
> Codename:    Final

My virtual machine is slightly different:

LSB
Version:        
:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.8 (Final)
Release:        5.8
Codename:       Final

> [root@myserver ~]# uname -a
> Linux myserver.myorg.es 2.6.18-194.3.1.el5.centos.plus #1 SMP Wed May 19 
> 09:15:55 EDT 2010 i686 i686 i386 GNU/Linux

Linux money 2.6.18-308.24.1.el5 #1 SMP Tue Dec 4 17:42:30 EST 2012 i686 athlon 
i386 GNU/Linux

I've also installed the 2.6.18-348.1.1.el5.centos.plus kernel but that
one also works correctly.

There is an interesting difference between the POSIX version of poll():
  http://pubs.opengroup.org/onlinepubs/007904975/functions/poll.html
which states:
   poll() shall wait at least timeout milliseconds
and some versions of Linux poll():
  https://www.kernel.org/doc/man-pages/online/pages/man2/poll.2.html
(version 3.32 of Linux man-pages) states:
  timeout argument specifies an upper limit on the time for which poll()
  will block
while mine (version 3.44 of Linux man-pages) states:
  timeout  argument specifies the minimum number of milliseconds that
  poll() will block

All I could find which seems slightly related is this discussion
  
https://groups.google.com/forum/?fromgroups=#!msg/fa.linux.kernel/EMyfJzWbZsA/qpy8MIf6UWgJ
which seems to have happend somewhere in the 2.6.24 kernel but would
account for a maximum error of 10 milliseconds (and not the 800
millisecond that we're seeing).

I'll see if it is worthwhile to implement a workaround for misbehaving
implementations of poll().

Thanks for providing the detailed debug info!

-- 
-- arthur - arthur@arthurdejong.org - http://arthurdejong.org --
-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users/