Bug 457477 - times(NULL) returning negative value
Summary: times(NULL) returning negative value
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-31 20:34 UTC by Abhishek Lahiri
Modified: 2008-07-31 21:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-31 20:47:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Strace of failed and successful odbcsql commands (566.32 KB, application/x-compressed)
2008-07-31 20:34 UTC, Abhishek Lahiri
no flags Details

Description Abhishek Lahiri 2008-07-31 20:34:28 UTC
Description of problem:

Yesterday we noticed that in one of our servers odbcsql command was just
hanging. Stracing the offending process I found that  it was constantly calling
the times system call times(NULL) and getting a negative value. The process was
not failing a few days back and the system was up for around 212 days , so we
rebooted it and then odbcsql ran successfully. I tried to find any known issues
or bug but could not find any.

Version-Release number of selected component (if applicable):

cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant)

uname -a
Linux sc-sbl8app-d1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux

How reproducible:

Probably if the system date is changed and thereby uptime is increased to +200
then it may be reproducible.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Abhishek Lahiri 2008-07-31 20:34:28 UTC
Created attachment 313130 [details]
Strace of failed and successful odbcsql commands

Comment 2 Jakub Jelinek 2008-07-31 20:47:08 UTC
Only (clock_t) -1 is special return value, saying the call failed, all other
values, both positive and negative, are valid and just fine.
So if the odbcsql process hangs because of this, it is broken.

Comment 3 Abhishek Lahiri 2008-07-31 21:04:40 UTC
Under what conditon  can times(NULL) return a -ve value? Just curious because I
could not find any more details on this.


Note You need to log in before you can comment on or make changes to this bug.