public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Some programs (vi, ssh) crash when screen buffer height is big
@ 2015-08-20 16:35 Sous Lesquels
  2015-08-20 21:45 ` Warren Young
  0 siblings, 1 reply; 36+ messages in thread
From: Sous Lesquels @ 2015-08-20 16:35 UTC (permalink / raw)
  To: cygwin

--- Prelude

I don't think this message will thread correctly. This is a reply to
this message:

https://cygwin.com/ml/cygwin/2014-07/msg00191.html

Message-ID: <20140717082423.GB15332@calimero.vinschen.de>

I unsubscribed from the list in order not to get emails for the whole
list (most of which I'm not interested in, as I'm a Cygwin user
primarily, not a developer), so I don't have the original message to
reply to. Gmail doesn't allow setting In-Reply-To or References
header. I tried what was suggested here:

https://cygwin.com/ml/cygwin/2014-07/msg00222.html

but this replied to cygwin-help@cygwin.com and was auto-bounced. If
anyone has ideas how to thread this properly using clients that do not
support adding user headers (Gmail Web interface for example), without
having the original message to reply to, let me know, so I use that in
the future.

--- The actual message

Thanks Corinna. I initially thought this was an installation issue
and, after this continued to happen and nobody else could reproduce, I
conceded to what you suggested, it's possibly a BLODA thing.

However, just had a completely fresh Win7 and Cygwin install, with
these versions:

cygwin               2.2.1-1            OK
vim                  7.4.808-1          OK

CYGWIN_NT-6.1 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin

Aside from a few apps (such as Chrome, but nothing "invasive" such as
antivirus or so), it does not have anything that a regular Win7
machine would not have, so I don't think BLODA can be considered as a
cause here.

I tested it by running the script I provided before, i.e.:

#!/bin/bash
for i in {1..123}; do
  echo -e "\033[5A\033[50C\033[0;35mhello\033[0m"
  head -n1000 /var/log/setup.log
done
vi /var/log/setup.log

I can reproduce it often. Not always, but I would say if you cannot
reproduce it with the above script and the below details 1 in 3 times,
I would be very surprised.

From my limited testing:

- It's imperative that the buffer size is big - 9999 is the best
choice - and also the window size. I have mine with Screen Buffer Size
208w 9999h and Window Size 208w 69h, font Lucida Console 14pt
- I could not reproduce in Cygwin terminal (i.e. mintty, as per the
desktop shortcut Cygwin creates), only in cmd (which is the default
when running Cygwin.bat) and ConEmu
(https://github.com/Maximus5/ConEmu)
- The behavior seems different in cmd and ConEmu. When in plain cmd,
cmd crashes and leaves vim process in behind using one core. ConEmu
kills both
- It looks like the file being head-ed above (/var/log/setup.log in my
example) needs to have long lines. Using a big binary dll file
(something from c:/windows/system32) doesn't seem to cause it

Since, when started from cmd, vim continues to run, I did a strace on
vi and pasted it partially here (sorry, cannot post all), hope I did
not miss anything that's important.

http://pastie.org/10364022

Looks like it goes into some loop (the last part of strace just loops
over and over).

Cmd (or bash?) itself crashes with the usual dialog that windows shows
when the app crashes - the text is the usual "Console Window Host has
stopped working". No coredump is produced.

If you need me to test anything else or more information, let me know,
if not sensitive I should be able to provide.

--
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

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Some programs (vi, ssh) crash when screen buffer height is big
@ 2014-07-16 20:10 sous lesquels
  2014-07-16 20:30 ` sous lesquels
  0 siblings, 1 reply; 36+ messages in thread
From: sous lesquels @ 2014-07-16 20:10 UTC (permalink / raw)
  To: cygwin

**** Environment

CYGWIN_NT-6.1 1.7.29(0.272/5/3) 2014-04-07 13:46
Windows 7

**** Steps to reproduce the issue:

- With vi.exe

Execute the following bash script:

#!/bin/bash
for i in {1..123}; do
  echo -e "\033[5A\033[50C\033[0;35mhello\033[0m"
  head -n1000 /var/log/setup.log
done
vi /var/log/setup.log

vi breaks with something as:

      0 [main] vi 13200 C:\cygwin64\bin\vi.exe: *** fatal error -
cmalloc would have returned NULL
/4.sh: line 6: 13200 Hangup                  vi /var/log/setup.log

(note 4.sh is the file name I used to put the above script in and run
it from there) and leaves a vi.exe.stackdump with the following
contents:

Stack trace:
Frame        Function    Args
001004D2D08  0018006F26E (001801E8666, 001801E8DD9, 00000000000, 00000229480)
001004D2D08  00180046E32 (0000022A4E8, FF000000808080, FFFF000000FF00,
FF00FF000000FF)
001004D2D08  00180046E72 (001801E8643, 00000000000, 00000000000, 00000000000)
001004D2D08  00180043983 (00076D22F7E, 00000000000, 00000000000, 00000000000)
001004D2D08  0018007B781 (FFFF000000FF00, FF00FF000000FF,
FFFFFF0000FFFF, 00180000088)
001004D2D08  0018007B91F (00000000000, 00000000000, 00000000000, 00000000000)
001004D2D08  0018007E024 (00000000000, 00000000000, 00000000000, 00000000000)
001004D2D00  001801266FD (00000000000, 00000000000, 1A1311121C011615,
001802E2788)
001004D4160  0018011197B (00000000000, 00000000000, 1A1311121C011615,
001802E2788)
End of stack trace

- With ssh.exe

ssh to some machine (Linux in my case) and execute the following bash script:

#!/bin/bash
for i in {1..123}; do
  echo -e "\033[5A\033[50C\033[0;35mhello\033[0m"
  head -n1000 /var/log/dmesg
done
vi /var/log/dmesg

ssh breaks with:

0 [main] ssh 12464 C:\cygwin64\bin\ssh.exe: *** fatal error - cmalloc
would have returned NULL

and leaves a ssh.exe.stackdump file in the current working directory
with the following contents:

Stack trace:
Frame        Function    Args
006000A267F  0018006F26E (001801E8666, 001801E8DD9, 00000000000, 00000226B60)
006000A267F  00180046E32 (00000227BC8, FF000000808080, FFFF000000FF00,
FF00FF000000FF)
006000A267F  00180046E72 (001801E8643, 00000000000, 00000000000, 00100000002)
006000A267F  00180043983 (00076D22F7E, 00000000000, 0018007B522, 0000000270E)
006000A267F  0018007B781 (FFFF000000FF00, FF00FF000000FF,
FFFFFF0000FFFF, 00180000088)
006000A267F  0018007B91F (000000001DC, 00000000000, 00000000000, 00000000000)
006000A267F  0018007E024 (00600077990, 00000000007, 00600077990, 00000000007)
006000A0490  001801266FD (00100426798, 00000000000, 00000000000, 00000000000)
0060006E850  0018011197B (00000000000, 00000000000, 00000000000, 00000000000)
0060006E850  00000004000 (00000000000, 00000000000, 00000000000, 21EF00000000)
0060006E850  00100426798 (00000000000, 001004928A0, 2BE9E0C5343523AB,
00000228090)
0060006E850  00600068670 (001004928A0, 2BE9E0C5343523AB, 00000228090,
00000000000)
0060006E850  003FEF96000 (001004928A0, 2BE9E0C5343523AB, 00000228090,
00000000000)
End of stack trace

**** More information:

- For both variants, you may need to tweak the number 123 in the for
loop above or the location of files if you don't have these - they
should be there, but if not pick any file with some log-like text in
it (a few hundred lines should be enough)

- The variants are just quick and dirty ways to reproduce - crashes
happen in regular work in various situations (i.e. real scenarios, not
contrived as above)

- Crashes can be reproduced always

- Taking the same steps as above when running from Cygwin terminal
(i.e. the one that comes bundled with Cygwin itself) does not result
in a crash

--
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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2015-08-28 22:05 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 16:35 Some programs (vi, ssh) crash when screen buffer height is big Sous Lesquels
2015-08-20 21:45 ` Warren Young
2015-08-20 22:21   ` Sous Lesquels
2015-08-20 22:36     ` Warren Young
2015-08-21 12:37       ` Sous Lesquels
2015-08-21 18:53         ` Warren Young
2015-08-21 21:41         ` Thomas Wolff
2015-08-24 12:08         ` Philip Daniels
2015-08-25 16:35           ` Sous Lesquels
2015-08-25 16:47             ` cyg Simple
2015-08-27 19:47               ` Sous Lesquels
2015-08-28 13:23                 ` Larry Hall (Cygwin)
2015-08-28 14:05                   ` Sous Lesquels
2015-08-28 18:50                     ` Larry Hall (Cygwin)
2015-08-28 21:31                       ` Sous Lesquels
2015-08-28 21:53                         ` Warren Young
2015-08-28 23:24                     ` Warren Young
2015-08-25 18:20             ` Andrey Repin
2015-08-27 20:00               ` Sous Lesquels
2015-08-28 14:48                 ` Andrey Repin
2015-08-28 21:09                   ` Sous Lesquels
2015-08-28 23:27                     ` Andrey Repin
2015-08-20 22:35   ` Andrey Repin
  -- strict thread matches above, loose matches on Subject: below --
2014-07-16 20:10 sous lesquels
2014-07-16 20:30 ` sous lesquels
2014-07-17  2:13   ` Christopher Faylor
2014-07-17  8:24   ` Corinna Vinschen
2014-07-18  3:28     ` Warren Young
2014-07-18 14:48   ` sous lesquels
2014-07-18 15:51     ` Larry Hall (Cygwin)
2014-07-18 16:59       ` sous lesquels
2014-07-18 17:59         ` Christopher Faylor
2014-07-18 18:48           ` Nellis, Kenneth
2014-07-18 20:35             ` sous lesquels
2014-07-21 12:32               ` Nellis, Kenneth
2014-07-23  0:50                 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).