strange bug in gettimeofday function

2007-02-11 Thread Andrew Makhorin
Hi,

I detected a strange bug in the standard function gettimeofday.
It *sometimes* reports the time which being expressed as the integer
number of milliseconds is *less* than the time obtained *earlier* with
the same function.

The expression 100 * tv.tv_sec + tv.tv_usec is calculated in
64-bit arithmetic, so overflow cannot happen. The negative difference
in the time values on two successive calls is about 100 milliseconds.

cygcheck.out is attached.

Andrew Makhorin

cygcheck.out
Description: Binary data
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: strange bug in gettimeofday function

2007-02-11 Thread Christopher Faylor
On Sun, Feb 11, 2007 at 07:20:14PM +0300, Andrew Makhorin wrote:
>Hi,
>
>I detected a strange bug in the standard function gettimeofday.
>It *sometimes* reports the time which being expressed as the integer
>number of milliseconds is *less* than the time obtained *earlier* with
>the same function.
>
>The expression 100 * tv.tv_sec + tv.tv_usec is calculated in
>64-bit arithmetic, so overflow cannot happen. The negative difference
>in the time values on two successive calls is about 100 milliseconds.
>
>cygcheck.out is attached.

In cases like this a simple test case is really required.  If this is
really true then calling gettimeofday in a loop should be enough to
demonstrate the problem.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



can not find install-sh **help**

2007-02-11 Thread suntzu

Hi to all,

I am facing some problems while trying to install cs161-binutils package.

I download this package (cs161-binutils-1.4.tgz) to my root directory and i
unziped it creating among others a new directory binutils-2.14 nad a file
toolbuild.sh.

I suppose to "run" toolbuild.sh first but when i am doing this i receive the
error: can not find install.sh file in /cs161-binutils-1.4/
./binutils-2.14

But the file is actually lcated in the binutils-2.14 directory.

Any ideas ??
Thank you in advance for your help.  
-- 
View this message in context: 
http://www.nabble.com/can-not-find-install-sh-**help**-tf3210452.html#a8915500
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: can not find install-sh **help**

2007-02-11 Thread Tim Prince

[EMAIL PROTECTED] wrote:

Hi to all,

I am facing some problems while trying to install cs161-binutils package.

I download this package (cs161-binutils-1.4.tgz) to my root directory and i
unziped it creating among others a new directory binutils-2.14 nad a file
toolbuild.sh.

I suppose to "run" toolbuild.sh first but when i am doing this i receive the
error: can not find install.sh file in /cs161-binutils-1.4/
./binutils-2.14



Did you follow all the configure and build instructions provided with 
that package?  I don't see any evidence of it being a cygwin package, 
and it's unlikely your problem is specific to cygwin. Nor can I imagine 
a reason for spending time on it, when the cygwin distribution includes 
a better version, source and all.  Binutils typically insists on 
following instructions to the letter, including (at least for older 
versions) configuting and building in a fresh directory just below the 
top binutils distribution directory.



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: chkdsk hates rxvt?

2007-02-11 Thread Brian Dessent
David Arnstein wrote:

> Then chkdsk will prompt me to do a boot time analysis. I respond "Y" for
> yes. Then chkdsk hangs forever.

This is the expected behavior when you run a native program attached to
a tty.  Please see the archives, this has been discussed extensively.



Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strange bug in gettimeofday function

2007-02-11 Thread Lev Bishop

On 2/11/07, Christopher Faylor wrote:

On Sun, Feb 11, 2007 at 07:20:14PM +0300, Andrew Makhorin wrote:
>Hi,
>
>I detected a strange bug in the standard function gettimeofday.
>It *sometimes* reports the time which being expressed as the integer
>number of milliseconds is *less* than the time obtained *earlier* with
>the same function.
>
>The expression 100 * tv.tv_sec + tv.tv_usec is calculated in
>64-bit arithmetic, so overflow cannot happen. The negative difference
>in the time values on two successive calls is about 100 milliseconds.
>
>cygcheck.out is attached.

In cases like this a simple test case is really required.  If this is
really true then calling gettimeofday in a loop should be enough to
demonstrate the problem.


I have a hunch that it will be a good idea to have a look at what the
result of GetSystemTimeAdjustment() is on the machine exhibiting this
behaviour, at the time it exhibits this behaviour.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strange bug in gettimeofday function

2007-02-11 Thread Carlo Florendo

Andrew Makhorin wrote:

Hi,

I detected a strange bug in the standard function gettimeofday.
It *sometimes* reports the time which being expressed as the integer
number of milliseconds is *less* than the time obtained *earlier* with
the same function.


If you mean that you call gettimeofday twice and you get different 
values at each call, with a difference of about 100 ms, then this is all 
right.  Read on...





The expression 100 * tv.tv_sec + tv.tv_usec is calculated in
64-bit arithmetic, so overflow cannot happen. The negative difference
in the time values on two successive calls is about 100 milliseconds.


Please keep in mind that windows is a pre-emptive multi-tasking OS. 
This means that there is a lot of time-sharing among multiple processes.


Windows could be accurate up to 15 ms or perhaps a little bit more. 
However, it is very difficult to achieve less than 15 ms or microsecond 
accuracy with windows due to the limitation on the OS itself.  Our 
extensive tests on windows clocks and timers reveal that windows cannot 
be accurate to the microsecond level or below 15 ms.


FWIW, The accuracy of gettimeofday may also depend on the processor speed.

In any case, in my experience, windows cannot be accurate with a 
precision of up to 15 milliseconds.


The time difference you are seeing seems normal to me (unless I have not 
understood you correctly, in which case, I apologize in advance.)


Thank you very much.


Best Regards,

Carlo


--
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, Diliman 1101, Quezon City
Philippines
http://www.astra.ph

Member of the Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help. Cygwin corrupting files

2007-02-11 Thread Carlo Florendo

Chuck wrote:

Larry Hall (Cygwin) wrote:

Chuck wrote:

At first I thought my recent problems with cygwin were limited to the
occasional "ls" command listing nothing. Run it again an it works
(usually). Now the problems are getting worse. I tried to "rm" a file
that I own and it didn't fully delete it. It corrupted it. An ls of the
file shows this (that is, when the ls command works).

$ ls -l
ls: cannot access bin_dirs.txt: No such file or directory
total 14
drwxr-xr-x+  2 CHamilto Domain Users0 Feb  9 14:50 ./
drwxr-xr-x+ 19 CHamilto Domain Users0 Feb  9 14:33 ../
-rw-r--r--   1 CHamilto Domain Users 3196 Feb  9 14:48 all_bin_dirs.txt
???  ? ??   ?? bin_dirs.txt
-rwx--   1 CHamilto Domain Users  368 Feb  9 14:33 chuck.sh*
-rwxrwx---   1 CHamilto Domain Users 3069 Feb  9 11:06 cleanup_rman.sh*
-rw-r--r--   1 CHamilto Domain Users 1491 Feb  9 14:08 servers
-rwxrwx---   1 CHamilto Domain Users  270 Feb  9 14:50 upload.sh*


What is up with that? I can't access or remove the bin_dirs.txt file now
with either cygwin or windows. I tried resetting the owner but chown
fails too.

$ chown "CHamilto:Domain Users" bin_dirs.txt
chown: cannot access `bin_dirs.txt': No such file or directory


I have tried reinstalling cygwin and coreutils to no avail. Did
something happen in a recent release of cygwin to explain this bizarre
behavior? I've been using cygwin for years and never experienced
anything like this. Please help!


Have you checked if you can do similar operations with DOS commands?  I
believe what you're seeing here is a hardware (probably disk) problem.
Years ago I had a failing disk pick off files randomly for a while until
the whole thing finally went.




HD scan shows no errors.

Here's another strange thing that's happening now. Part of my .profile
runs keychain - a script that starts up ssh-agent and prompts for my
passphrase. It only does this the first time you log on and uses the
same ssh-agent for subsequent logons. It suddenly never reads my
passphrase correctly the first time. I get a "bad passphrase" error,
re-enter it, and it accepts it. Then on subsequent logons, I get past
the keychain prompt, but I cannot enter anything at the shell prompt. I
type but nothing echoes until I press CTRL+C. Then I can start entering
shell commands as normal. Does this sound familiar to anyone?

I'm beginning to think I need to remove and reinstall every cygwin
package, but I'm not certain that will fix it either. I've already
reinstalled both coreutils and cygwin itself. I've even tried rolling
both back a few releases, but I get the same problem. This is very strange.



As mentioned by someone else in a previous mail, this seems to look
like a harddisk problem.  Windows *sometimes* does not detect
physical errors on the harddisk, making you think that nothing is
wrong with the disk.   Windows will keep running until eventually
it corrupts its own file system.

This once happened on my laptop.  The harddisk was already creaking for 
weeks but windows didn't see the errors.  The harddisk eventaully got

busted but not before I backed up all the data.

So, it would be prudent to start backing up your data.

Best Regards,

Carlo

--
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, Diliman 1101, Quezon City
Philippines
http://www.astra.ph

Member of the Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Probllem with New GDB/Eclipse

2007-02-11 Thread Charles Tubbs
Brian Dessent  dessent.net> writes:

> 
> Doyle Rhynard wrote:
> 
> > When others depend upon what you do, the old maximum for physicians
> > should apply also: "First, do no harm". My suggestion is to roll back
> 
> That logic would only apply if the Eclipse module was an actual Cygwin
> package, but it's not.  Fixing packages of 3PPs is not our job, it's
> theirs.
> 
> Brian
> 
> 

Obviously the CDT developers erred by choosing to use a well defined package
that inexplicably changes in the undefined areas.  You are a very good
advertisement for Visual Studio.





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/