rheostat2718 / conemu-maximus5

Automatically exported from code.google.com/p/conemu-maximus5
7 stars 1 forks source link

ConEmu breaks Cygwin's pipeline #1819

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Required information!
OS version: Win7 x64
ConEmu version: 141013 or 141016

*Bug description*
Cygwins pipeline operator is for some reason broken on ConEmus from 141016 up 
(possibly from 141013 but I couldn't check that). When we use that operator (or 
some script or process use it) everything breaks since pipeline doesn't 
redirect anything. Running Cygwin without ConEmu or with version 141012 or 
earlier make thinks work again.

*Steps to reproduction*
1. run Cygwin's task,
2. type: env | less
3. it should display all available environment variables, but is empty instead.

Original issue reported on code.google.com by mathew....@gmail.com on 20 Nov 2014 at 8:03

GoogleCodeExporter commented 8 years ago
What is "Cygwin's task"?

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 8:48

GoogleCodeExporter commented 8 years ago
"env | less" is working perfectly on my side. So it's hard to believe the 
problem is inside ConEmu or is related to ConEmu build no.

CygwinMsys

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 8:50

GoogleCodeExporter commented 8 years ago
By Cygwin's task I meant task which run cygwin.bat file inside Cygwin's 
installation.

If it's not ConEmu then why different version's of it results in different 
behavior on my side?

Original comment by mathew....@gmail.com on 20 Nov 2014 at 9:01

GoogleCodeExporter commented 8 years ago
Cygwin.bat? What for? Run sh.exe -l -i

I can repeat, I do not observe described behavior in the current ConEmu build.

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 9:09

GoogleCodeExporter commented 8 years ago
And of course 141013 is OldBuild

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 9:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Also.
Cygwin version?
Hiw exactly have you checked that "Running Cygwin without ConEmu make thinks 
work again"?

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 9:50

GoogleCodeExporter commented 8 years ago
Cygwin version: 1.7.32(0.274/5/3)

I check this by calling "env | less", but it more than that. I noticed this 
problem  when I upgraded to the newest version od ConEmu and python scripts 
used by Chromium builders stopped working. When I setup environment from 
scratch I found out that upgrading Cmder's ConEmu to newest version broke 
pipelines (|, >, <, etc.). With binary search I found that 141012 was the last 
one that didn't cause that behavior on my side.

When I use newest version my build scripts fails randomly, and "ninja -C 
out/Debug chrome > build.log" creates empty file. That's how I found out that 
there's something wrong with streams. Reverting to old build did the trick, 
though I have no idea how ConEmu could affect stream pipelining in its 
subprocesses.

Original comment by mathew....@gmail.com on 20 Nov 2014 at 10:29

Attachments:

GoogleCodeExporter commented 8 years ago
Windows 7 is 64-bit,
Cygwin is x86_64 version,
ConEmu tested on both 32- and 64-bit (same result).

Original comment by mathew....@gmail.com on 20 Nov 2014 at 10:34

GoogleCodeExporter commented 8 years ago
So what about build 141013?
http://sourceforge.net/projects/conemu/files/Alpha/ConEmuPack.141013.7z/download
What exact build breaks your behavior?

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 10:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
141013 works - so that change must appeared between and 141016 (broken).

Original comment by mathew....@gmail.com on 20 Nov 2014 at 10:48

GoogleCodeExporter commented 8 years ago
What is your "set | grep TERM"?

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 10:58

GoogleCodeExporter commented 8 years ago
Even with updated x64 cygwin install I have no problems with pipes in ConEmu... 
Grep is working.

May be that is cygwin config differences.

Run "ConEmu -basic -cmd sh -l -i"
Problem persists with "set | grep shell"?
If so I'm intested in some logs:
Go to Settings \ Info \ Debug
Check "Shell" radio log don't close the dialog
Run "set | grep TERM"
Save result log

Please do logs with good and bad builds

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 11:10

GoogleCodeExporter commented 8 years ago
TERM=cygwin

Original comment by mathew....@gmail.com on 20 Nov 2014 at 11:10

GoogleCodeExporter commented 8 years ago
With "set | grep TERM" I am able to see results. Similarly with "set | less". 
However just in case I added logs for both "env | grep TERM" and "set | grep 
TERM".

To clarify: my Cygwin installation is inside Cmder directory, but for tests I 
used separate installations of ConEmu.

Original comment by mathew....@gmail.com on 20 Nov 2014 at 11:22

Attachments:

GoogleCodeExporter commented 8 years ago
So there are no problems with piping in fact?
Run "set" alone and compare env list within different ConEmu builds. I'm pretty 
sure they will differ.

So run ProcessExplorer and check process tree for environment.

Originally you was complaining about "env | less". Attach debug shell logs from 
that command.

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 11:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
And as I said before I'm interested in logs from both versions. Good and bad. 
Only comparison makes sense...

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 11:33

GoogleCodeExporter commented 8 years ago
Comparing environment the only actual change I noticed was:
PATH=[..]\dir\ConEmu;[..]\dir; (141013)
PATH=[..]\dir;[..]\dir\ConEmu; (141117)

There was much more visible differences between shell logs for "set/env | less".

Original comment by mathew....@gmail.com on 20 Nov 2014 at 11:47

Attachments:

GoogleCodeExporter commented 8 years ago
Here are two patches, please check them.
https://www.dropbox.com/s/5l3rfjuzexn7gpo/ConEmuHk.141016a.dll.7z?dl=0
https://www.dropbox.com/s/7iqwb0cm5p2utus/ConEmuHk.141016b.dll.7z?dl=0

Original comment by ConEmu.Maximus5 on 20 Nov 2014 at 3:15

GoogleCodeExporter commented 8 years ago
Patch a didn't change anything, patch b fixed the issue.

Original comment by mathew....@gmail.com on 21 Nov 2014 at 7:27

GoogleCodeExporter commented 8 years ago
How about this patch:
https://www.dropbox.com/s/ojadcphkdnhqwfs/ConEmuHk.141117a.dll.7z?dl=0

It is a patch for latest preview

Original comment by ConEmu.Maximus5 on 21 Nov 2014 at 8:45

GoogleCodeExporter commented 8 years ago
This one didn't fix the problem.

On a side note - at a different machine everything works so there must be 
something particular about my current configuration that triggers this issue.

Original comment by mathew....@gmail.com on 21 Nov 2014 at 9:39

GoogleCodeExporter commented 8 years ago
> at a different machine everything works so there must be 
> something particular about my current configuration

Exactly. And it would be much better to find this setting.
Because ConEmu must not break standard behavior and
it would be much easier to fix the problem.
Otherwise I need to create more test patches...

Original comment by ConEmu.Maximus5 on 21 Nov 2014 at 10:56

GoogleCodeExporter commented 8 years ago
I suppose these settings are related to alternative buffers but I'm not sure...

Original comment by ConEmu.Maximus5 on 21 Nov 2014 at 10:57

GoogleCodeExporter commented 8 years ago
Reset to default settings and removal of both register keys and ConEmu.xml 
didn't change anything. Once I'll have access to the other machine I'll 
generate dumps and ConEmu.xml and compare them for differences.

Original comment by mathew....@gmail.com on 21 Nov 2014 at 11:28

GoogleCodeExporter commented 8 years ago
I'm almost sure that it's not related to ConEmu config, but related to your 
cygwin's profile.

Original comment by ConEmu.Maximus5 on 21 Nov 2014 at 11:30

GoogleCodeExporter commented 8 years ago
Check please these two patches
https://www.dropbox.com/s/796yhulej4ggc73/ConEmuHk.141117b.dll.7z?dl=0
https://www.dropbox.com/s/h7lsxuqiy1qr1jx/ConEmuHk.141117c.dll.7z?dl=0

Even they are working I'm still interested in settings leading to wrong 
behavior.

Original comment by ConEmu.Maximus5 on 21 Nov 2014 at 12:13

GoogleCodeExporter commented 8 years ago
Patch b no change, patch c fixes error.

I'm also confused - basically I have portable Cygwin installation inside a 
cloud storage, so (in theory) both environments should be exactly the same. If 
some environment variable differs (in theory) it should be something else than 
ConEmu (I'm testing portable versions) and Cygwin (both env should be 1:1 copy 
of each other).

But something obviously differs and I have no idea what.

Original comment by mathew....@gmail.com on 21 Nov 2014 at 1:56

GoogleCodeExporter commented 8 years ago
Patch b no change, patch c fixes error.

I'm also confused - basically I have portable Cygwin installation inside a 
cloud storage, so (in theory) both environments should be exactly the same. If 
some environment variable differs (in theory) it should be something else than 
ConEmu (I'm testing portable versions) and Cygwin (both env should be 1:1 copy 
of each other).

But something obviously differs and I have no idea what.

Original comment by mathew....@gmail.com on 21 Nov 2014 at 1:57

GoogleCodeExporter commented 8 years ago
141123

Original comment by ConEmu.Maximus5 on 24 Nov 2014 at 11:26