less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

KARL BOTTS
In less.exe, when I use either the G or F commands on a largish CRLF file, it
responds:

   Cannot seek to that file position  (press RETURN)

in the bottom "command editing line" of the display.

No problem on LF-only files.  Does happen with either mintty or
Windows-Console,
launched from either bash or cmd.exe.

Two files are attached: Karl2.cygcheck.out, which is the 'cygcheck -s -v -r'
output,
and LessBugMoreInfo.txt, which contains background info and some speculation.

---
Karl Botts, [hidden email]



I am almust sure the problem involves the eternal seek-on-files-with-nonstandard-newlines issue.

I suspect it involves cygwin infrastructure or libs, because I saw a related problem
when I recently updated cygwin from 1.7.33-1 to 2.3.1-1, along with all packages.

The evidence is that immediately on the update, a few bash scripts broke in subtle ways.
Bash was having trouble parsing certain kinds of complex expressions.

I eventually realized that the only scripts broken were CRLF files.
So, I simply ran them thru d2u, and the problem went away.
(I concede that all bash scripts should be LF-only, and I am keeping it that way hence.)

But that does not help me with less.exe; I depend on it to tail log and output files from Windows apps.
Sometimes, with some hassle, I can pipe them thru d2u or similar, but I cannot always do that.



I am a programmer.  I have been unusually bi-cultural, Windows and Unix, for decades.
I have been using cygwin for 20 years, but only as a user: I never develop with it.
I lurk on the mailing lists, but this is my first bug report.

I deploy cygwin by running setup.exe on one machine, then simply copying c:/cygwin (with cygwin, to preserve links)
to a bunch of other machines.
I normally do this big update every few months.
This procedure has been working fine for about 10 years.

I had not done my update for a full year.  Recently I started moving a few machines to Win10.
I had to update cygwin because of the "two-windows-when-launching-mintty-on-Win10" issue.

I mention my update procedure because it implies that my cygwin installation is never really
created anew.  So, there could be some old stuff in /etc or such places.  If you think I should,
I can clean and re-install cygwin from scratch on one machine, but that would be a hassle.



Just a note:  Cygwin is certainly the best-run large software system I use under Windows,
especially including Windows itself.  Thank you all, particularly Corinna,
for many years of quietly superb work.


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

Karl2.cygcheck.out (142K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

marco atzeri-4
On 20/01/2016 19:32, KARL BOTTS wrote:
> In less.exe, when I use either the G or F commands on a largish CRLF file, it
> responds:

How largish ?

On Cygwin 32 bit and W7-64 I see no problem with 224 Mbytes


>     Cannot seek to that file position  (press RETURN)
>
> in the bottom "command editing line" of the display.
>
> No problem on LF-only files.  Does happen with either mintty or
> Windows-Console,
> launched from either bash or cmd.exe.
>
> Two files are attached: Karl2.cygcheck.out, which is the 'cygcheck -s -v -r'
> output,
> and LessBugMoreInfo.txt, which contains background info and some speculation.
>
> ---
> Karl Botts, [hidden email]
>

can you try to update to latest ?

You have
less                 471-1                            OK
cygwin               2.1.0-1                          OK

we are at
cygwin                                  2.4.0-1
less                                    481-1


Regards
Marco

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

Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

marco atzeri-4
In reply to this post by KARL BOTTS
please reply on the list
and Bottom post please.

On 22/01/2016 16:26, KARL BOTTS wrote:
>> How largish ?
>
> Any size larger than a few meg.  That is, any size that takes more than a few
> milliseconds to seek to the end, I think.

We will need someone with W10 to test it and confirm it.
On W7 I have no issue at all with 250MB file

How long are the lines ?


>> can you try to update to latest ?
>> You have
>> less                 471-1                            OK
>> cygwin               2.1.0-1                          OK
>
>
> Not so.  From the 'cygcheck -s -v -r' output file that was attached to my bug
> report:
>
> 0 /c/ToCygwin$ egrep '^(cygwin|less)' Karl2.cygcheck.out
> cygwin                                2.3.1-1                 OK
> less                                  481-1                   OK
>

sorry, reading the wrong file.


> Did you look at the attached files?  I tried to keep the body of the email
> small, per instructions.  But there is info attached.
>
> ---
> Karl Botts, [hidden email]
>
>
> ------ Original Message ------
> Received: 04:48 AM CST, 01/21/2016
> From: Marco Atzeri
> Subject: Re: less.exe v481-1 cannot seek to EOF in CRLF file; current
> cygwin32, Win10 only.
>
> On 20/01/2016 19:32, KARL BOTTS wrote:
>> In less.exe, when I use either the G or F commands on a largish CRLF file,
> it
>> responds:
>
> How largish ?
>
> On Cygwin 32 bit and W7-64 I see no problem with 224 Mbytes
>
>
>>      Cannot seek to that file position  (press RETURN)
>>
>> in the bottom "command editing line" of the display.
>>
>> No problem on LF-only files.  Does happen with either mintty or
>> Windows-Console,
>> launched from either bash or cmd.exe.
>>
>> Two files are attached: Karl2.cygcheck.out, which is the 'cygcheck -s -v
> -r'
>> output,
>> and LessBugMoreInfo.txt, which contains background info and some
> speculation.
>>
>> ---
>> Karl Botts


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

Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

Helmut Karlowski
---------------------------------------------------

> please reply on the list
> and Bottom post please.
>
> On 22/01/2016 16:26, KARL BOTTS wrote:
> >> How largish ?
> >
> > Any size larger than a few meg.  That is, any size that takes more than a few
> > milliseconds to seek to the end, I think.
>
> We will need someone with W10 to test it and confirm it.
> On W7 I have no issue at all with 250MB file

Tested on W10-64-cygwin-32 and a 207M-file, dos and unix-endings: both
behave the same, i.e. no error when pressing 'G' and display the last
line. Was that the question?

cygwin 2.2.1, less 481

-Helmut

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

Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

KARL BOTTS
In reply to this post by KARL BOTTS
> ---------------------------------------------------
> > please reply on the list
> > and Bottom post please.
> >
> > On 22/01/2016 16:26, KARL BOTTS wrote:
> > >> How largish ?
> > >
> > > Any size larger than a few meg.  That is, any size that takes more than
a few

> > > milliseconds to seek to the end, I think.
> >
> > We will need someone with W10 to test it and confirm it.
> > On W7 I have no issue at all with 250MB file
>
> Tested on W10-64-cygwin-32 and a 207M-file, dos and unix-endings: both
> behave the same, i.e. no error when pressing 'G' and display the last
> line. Was that the question?
>
> cygwin 2.2.1, less 481
>
> -Helmut
>

I have reproduced on Win7, same exact cygwin, same exact symptom.

OK, that you guys can't reproduce suggests that there is something special
about my cygwin installation.  

What is special, I suspect, is that I have not actually recreated it in many
years: I just update it, and copy the whole thing from machine to machine.  (I
described this in the attachment to my original email.)  That has worked well
for a long time -- it is much easier and more consistent than running
setup.exe on many machines.  But I suspect it has broken down.  Somehow, I may
have old libs or old config files mixed with new.  (This last update, from 1.7
to 2.3, is clearly a big one.)

So, I will re-install cygwin from scratch on one machine, this weekend.

In the meantime, put this bug report on hold.  Thanks to all of you.

I will let the list know how this comes out.

---
Karl Botts, [hidden email]


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

Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

staffanu
KARL BOTTS wrote
> ---------------------------------------------------
> > > Any size larger than a few meg.  That is, any size that takes more than
a few
> > > milliseconds to seek to the end, I think.
> >
> > We will need someone with W10 to test it and confirm it.
> > On W7 I have no issue at all with 250MB file
>
> Tested on W10-64-cygwin-32 and a 207M-file, dos and unix-endings: both
> behave the same, i.e. no error when pressing 'G' and display the last
> line. Was that the question?
>
> cygwin 2.2.1, less 481
>
> -Helmut

I have reproduced on Win7, same exact cygwin, same exact symptom.

OK, that you guys can't reproduce suggests that there is something special
about my cygwin installation.  

What is special, I suspect, is that I have not actually recreated it in many
years: I just update it, and copy the whole thing from machine to machine.  (I
described this in the attachment to my original email.)  That has worked well
for a long time -- it is much easier and more consistent than running
setup.exe on many machines.  But I suspect it has broken down.  Somehow, I may
have old libs or old config files mixed with new.  (This last update, from 1.7
to 2.3, is clearly a big one.)

So, I will re-install cygwin from scratch on one machine, this weekend.

In the meantime, put this bug report on hold.  Thanks to all of you.

I will let the list know how this comes out.
Was this ever resolved? I have, I guess, the same problem. I cannot see that the size of files matter, however -- I see the problem for all CRLF files  that I tested. (It worked fine before upgrading a few days ago.)

The weird thing is that, moving the file with CRLF line endings to a binary mounted filesystem makes less work just fine. Reading the file from a text mounted filesystem results in the problem. Is not the point with text mounts to be able to read text files with CRLF line endings?

Just as Karl, my Cygwin installation is very old -- i.e., any registry entries (that I think might include mount options?) might have been written 10 years ago. Did the meaning of text/binary mounts change?

Staffan
Reply | Threaded
Open this post in threaded view
|

Re: less.exe v481-1 cannot seek to EOF in CRLF file; current cygwin32, Win10 only.

marco atzeri-4
On 08/09/2016 15:06, staffanu wrote:

> KARL BOTTS wrote
>>> ---------------------------------------------------
>>>>> Any size larger than a few meg.  That is, any size that takes more
>>> than
>> a few
>>>>> milliseconds to seek to the end, I think.
>>>>
>>>> We will need someone with W10 to test it and confirm it.
>>>> On W7 I have no issue at all with 250MB file
>>>
>>> Tested on W10-64-cygwin-32 and a 207M-file, dos and unix-endings: both
>>> behave the same, i.e. no error when pressing 'G' and display the last
>>> line. Was that the question?
>>>
>>> cygwin 2.2.1, less 481
>>>
>>> -Helmut
>>
>> I have reproduced on Win7, same exact cygwin, same exact symptom.
>>
>> OK, that you guys can't reproduce suggests that there is something special
>> about my cygwin installation.
>>
>> What is special, I suspect, is that I have not actually recreated it in
>> many
>> years: I just update it, and copy the whole thing from machine to machine.
>> (I
>> described this in the attachment to my original email.)  That has worked
>> well
>> for a long time -- it is much easier and more consistent than running
>> setup.exe on many machines.  But I suspect it has broken down.  Somehow, I
>> may
>> have old libs or old config files mixed with new.  (This last update, from
>> 1.7
>> to 2.3, is clearly a big one.)
>>
>> So, I will re-install cygwin from scratch on one machine, this weekend.
>>
>> In the meantime, put this bug report on hold.  Thanks to all of you.
>>
>> I will let the list know how this comes out.
>
> Was this ever resolved? I have, I guess, the same problem. I cannot see that
> the size of files matter, however -- I see the problem for all CRLF files
> that I tested. (It worked fine before upgrading a few days ago.)
>
> The weird thing is that, moving the file with CRLF line endings to a binary
> mounted filesystem makes less work just fine. Reading the file from a text
> mounted filesystem results in the problem. Is not the point with text mounts
> to be able to read text files with CRLF line endings?
>
> Just as Karl, my Cygwin installation is very old -- i.e., any registry
> entries (that I think might include mount options?) might have been written
> 10 years ago. Did the meaning of text/binary mounts change?
>
> Staffan
>


no change on less package, if you are asking it.
So I expect no change on the matter.

In general, I do not see the added value of a text mount.

Regards
Marco

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