New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 possible incompatibility #65

Closed
dgtlrift opened this Issue Dec 6, 2016 · 20 comments

Comments

Projects
None yet
4 participants
@dgtlrift

dgtlrift commented Dec 6, 2016

Is there any known issues with Windows 10? I know this is open ended, but we are seeing a phantom issue (inconsistently) where scripts somehow have extra characters injected into their pipes. Specifically we see a

5

by itself on an output line. It's inconsistent when and where it happens, but it is only on Windows 10 installations.

@dgtlrift

This comment has been minimized.

Show comment
Hide comment
@dgtlrift

dgtlrift Dec 6, 2016

Additional note:
It has been confirmed that when running Win 10 in Win 7 compatibility mode that this phantom issue goes away.

dgtlrift commented Dec 6, 2016

Additional note:
It has been confirmed that when running Win 10 in Win 7 compatibility mode that this phantom issue goes away.

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Dec 7, 2016

Owner

I haven't seen anything like this, but then I rarely use Windows 10.

Can you provide an example of the sort of thing that results in this issue? Also, there have been lots of changes in upstream BusyBox recently; could you try an older version of the binary, say with a FRP version less than 400, to see if it's something that's been introduced recently?

Owner

rmyorston commented Dec 7, 2016

I haven't seen anything like this, but then I rarely use Windows 10.

Can you provide an example of the sort of thing that results in this issue? Also, there have been lots of changes in upstream BusyBox recently; could you try an older version of the binary, say with a FRP version less than 400, to see if it's something that's been introduced recently?

@roffel79

This comment has been minimized.

Show comment
Hide comment
@roffel79

roffel79 Dec 21, 2016

We've been using BusyBox for about two years to launch our main application on the machines of our customers and it used to work great. But ever since the introduction of Windows 10, we've been plagued by infrequent unexplainable busybox.exe crashes. As the OP noted, it goes away if Windows 7 compatibility mode is used.

We've tried all sorts of other workarounds, moving the executable away from share to local disk, disabling anti-virus, etc. It's damn hard to debug as it just works most of the time.

Thought I'd let you know. Sadly, we're forced to move away from BusyBox, which would otherwise be ideal, but we just can't accept any instability in our setup or adjust every single icon/link our customers might have.

We've been using BusyBox for about two years to launch our main application on the machines of our customers and it used to work great. But ever since the introduction of Windows 10, we've been plagued by infrequent unexplainable busybox.exe crashes. As the OP noted, it goes away if Windows 7 compatibility mode is used.

We've tried all sorts of other workarounds, moving the executable away from share to local disk, disabling anti-virus, etc. It's damn hard to debug as it just works most of the time.

Thought I'd let you know. Sadly, we're forced to move away from BusyBox, which would otherwise be ideal, but we just can't accept any instability in our setup or adjust every single icon/link our customers might have.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 25, 2017

I have Windows 10 Pro - Version 10.0.14393 Build 14393

The steps I followed were:

  • Created a shortcut to busybox.exe and added added "sh -l" to the end of the command in Target, without the quotes around it. (The -l isn't required to exhibit the problem).
  • Double clicked the shortcut
  • Typed ls
  • First time, Windows has informed me that busybox.exe has stopped working. if I click the shortcut again and do ls, then it is normally fine that time.
  • Chose "Close program" in the the "Debug" / "Close program" window (depending on your Window Error Reporting settings, you may get a different screen)
  • Busybox stays running and has outputted a 5 and gives you a prompt for another command.
  • Type ls
  • Most times, at this point it works but sometimes it can 'stop working' again'

The executable that did it had a sha256sum of 6a7db8778837f9ba7943f7ca784265501e15ef61f8cd1b5d9a1f4c046c3716c8

I tried it with busybox-w32-FRP-314-g3ebb829.exe and I get the same problem.

donno commented Mar 25, 2017

I have Windows 10 Pro - Version 10.0.14393 Build 14393

The steps I followed were:

  • Created a shortcut to busybox.exe and added added "sh -l" to the end of the command in Target, without the quotes around it. (The -l isn't required to exhibit the problem).
  • Double clicked the shortcut
  • Typed ls
  • First time, Windows has informed me that busybox.exe has stopped working. if I click the shortcut again and do ls, then it is normally fine that time.
  • Chose "Close program" in the the "Debug" / "Close program" window (depending on your Window Error Reporting settings, you may get a different screen)
  • Busybox stays running and has outputted a 5 and gives you a prompt for another command.
  • Type ls
  • Most times, at this point it works but sometimes it can 'stop working' again'

The executable that did it had a sha256sum of 6a7db8778837f9ba7943f7ca784265501e15ef61f8cd1b5d9a1f4c046c3716c8

I tried it with busybox-w32-FRP-314-g3ebb829.exe and I get the same problem.

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 25, 2017

Owner

Thanks for the additional information, donno. I'll look into this further in due course. In the meantime if anyone is using 64-bit Windows 10 it would be helpful if they could try a 64-bit build of busybox. I've put a copy of the latest version on the frippery.org website as busybox-w64-FRP-1035-g74163a5.exe. (If installing to a system directory note the caution in the README.md which appears on the main page for rmyorston/busybox-w32.)

Owner

rmyorston commented Mar 25, 2017

Thanks for the additional information, donno. I'll look into this further in due course. In the meantime if anyone is using 64-bit Windows 10 it would be helpful if they could try a 64-bit build of busybox. I've put a copy of the latest version on the frippery.org website as busybox-w64-FRP-1035-g74163a5.exe. (If installing to a system directory note the caution in the README.md which appears on the main page for rmyorston/busybox-w32.)

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 28, 2017

Owner

I'm still unable to reproduce the problem. I've tried 32- and 64-bit versions of Windows 10 Enterprise Evaluation Build 14393 with both the 32- and 64-bit versions of busybox.exe and everything works as expected.

Owner

rmyorston commented Mar 28, 2017

I'm still unable to reproduce the problem. I've tried 32- and 64-bit versions of Windows 10 Enterprise Evaluation Build 14393 with both the 32- and 64-bit versions of busybox.exe and everything works as expected.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 31, 2017

I don't have the same problem with that 64-bit version executable.

Is it possible for you to produce the 32-bit executable with debug symbols? Perhaps I could run that under gdb to get further information).

(I do not copy busybox into my system directory).

donno commented Mar 31, 2017

I don't have the same problem with that 64-bit version executable.

Is it possible for you to produce the 32-bit executable with debug symbols? Perhaps I could run that under gdb to get further information).

(I do not copy busybox into my system directory).

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 31, 2017

Owner

Thanks for your perseverance.

busybox_unstripped.exe is a 32-bit executable with debug. The build process produces a couple of extra files which may or may not be necessary so I've uploaded them too: busybox_unstripped.exe.out and busybox_unstripped.exe.map.

Owner

rmyorston commented Mar 31, 2017

Thanks for your perseverance.

busybox_unstripped.exe is a 32-bit executable with debug. The build process produces a couple of extra files which may or may not be necessary so I've uploaded them too: busybox_unstripped.exe.out and busybox_unstripped.exe.map.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 31, 2017

Oh wow that was quick, I was just about to report, I was able to build my own version from git, and gdb is able to find the symbols but it unfortunately, I have not had any luck with gdb seeing an the crash/exception occurring. Windows' "A problem caused the program to stop working correctly" still kicks in. The most Visual Studio can really say is its died in a call to free() (given that VS can't understand the DWARF symbol information).

Unhandled exception at 0x77438DCD (ntdll.dll) in busybox_unstripped.exe: 0xC0000005: Access violation reading location 0x01065442.
(note: that was from my version of the exe)

That is what is strange as busybox continues after continuing the debugger, which is quite odd.

I've tried running launching it through gdb (on Windows), and even attaching to it with gdbserver then attaching to that from Ubuntu, both have the same results that gdb doesn't see the problem, Windows takes over.

donno commented Mar 31, 2017

Oh wow that was quick, I was just about to report, I was able to build my own version from git, and gdb is able to find the symbols but it unfortunately, I have not had any luck with gdb seeing an the crash/exception occurring. Windows' "A problem caused the program to stop working correctly" still kicks in. The most Visual Studio can really say is its died in a call to free() (given that VS can't understand the DWARF symbol information).

Unhandled exception at 0x77438DCD (ntdll.dll) in busybox_unstripped.exe: 0xC0000005: Access violation reading location 0x01065442.
(note: that was from my version of the exe)

That is what is strange as busybox continues after continuing the debugger, which is quite odd.

I've tried running launching it through gdb (on Windows), and even attaching to it with gdbserver then attaching to that from Ubuntu, both have the same results that gdb doesn't see the problem, Windows takes over.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 31, 2017

A little more digging and I came across rainers/cv2pdb which can claims to be able to convert the DWARF symbols to PDB format, so Visual Studio can see the function names, etc..

Well for me it seemed to work as now in Visual Studio, it says thefree() is being performed by clearenv() (which in turn was called by tryexce() (tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);) in shellexec()/ash.c )

donno commented Mar 31, 2017

A little more digging and I came across rainers/cv2pdb which can claims to be able to convert the DWARF symbols to PDB format, so Visual Studio can see the function names, etc..

Well for me it seemed to work as now in Visual Studio, it says thefree() is being performed by clearenv() (which in turn was called by tryexce() (tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);) in shellexec()/ash.c )

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 31, 2017

Owner

I'm not at all surprised that clearenv() is involved. There have been problems in that area before.
That's why there's a configuration option (SAFE_ENV) to choose between 'safe' and 'dangerous' APIs to manipulate the environment.

One difference between a 32- and 64-bit build of busybox.exe is that SAFE_ENV is set for the latter but not for the former. I tried a 32-bit build with SAFE_ENV set but that doesn't seem to work on Windows 10.

Owner

rmyorston commented Mar 31, 2017

I'm not at all surprised that clearenv() is involved. There have been problems in that area before.
That's why there's a configuration option (SAFE_ENV) to choose between 'safe' and 'dangerous' APIs to manipulate the environment.

One difference between a 32- and 64-bit build of busybox.exe is that SAFE_ENV is set for the latter but not for the former. I tried a 32-bit build with SAFE_ENV set but that doesn't seem to work on Windows 10.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 31, 2017

I just realised why its able to continue and why I couldn't get anything in gdb, its actually a sub-process that is failing (sh --forkshell 1ec)

donno commented Mar 31, 2017

I just realised why its able to continue and why I couldn't get anything in gdb, its actually a sub-process that is failing (sh --forkshell 1ec)

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 31, 2017

Owner

Actually, there was an unrelated problem. The 32-bit 'safe' version of busybox.exe does run on Windows 10. I've uploaded busybox_safe.exe. It would be interesting to know if this helps.

Owner

rmyorston commented Mar 31, 2017

Actually, there was an unrelated problem. The 32-bit 'safe' version of busybox.exe does run on Windows 10. I've uploaded busybox_safe.exe. It would be interesting to know if this helps.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Mar 31, 2017

busybox_safe.exe works for me.

donno commented Mar 31, 2017

busybox_safe.exe works for me.

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Mar 31, 2017

Owner

Ah, that is interesting.

Perhaps Windows 10 no longer properly supports the 'unsafe' environment API (except in compatibility mode). In the past I've only bothered to supply a 32-bit, 'unsafe' binary as that seemed to work on the widest possible range of platforms: everything from 32-bit Windows XP to 64-bit Windows 10. Only ReactOS wasn't supported. If the 'unsafe' API doesn't work reliably on Windows 10 I might need to provide more than one binary.

Owner

rmyorston commented Mar 31, 2017

Ah, that is interesting.

Perhaps Windows 10 no longer properly supports the 'unsafe' environment API (except in compatibility mode). In the past I've only bothered to supply a 32-bit, 'unsafe' binary as that seemed to work on the widest possible range of platforms: everything from 32-bit Windows XP to 64-bit Windows 10. Only ReactOS wasn't supported. If the 'unsafe' API doesn't work reliably on Windows 10 I might need to provide more than one binary.

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston May 30, 2017

Owner

I still haven't been able to reproduce the problems some of you have been encountering on Windows 10.

I have, though, just merged the latest changes from upstream and have refreshed the busybox_safe.exe binary. Can you confirm that this works? If it does I'll add a link to it from my web page.

Owner

rmyorston commented May 30, 2017

I still haven't been able to reproduce the problems some of you have been encountering on Windows 10.

I have, though, just merged the latest changes from upstream and have refreshed the busybox_safe.exe binary. Can you confirm that this works? If it does I'll add a link to it from my web page.

@donno

This comment has been minimized.

Show comment
Hide comment
@donno

donno Jun 2, 2017

The latest version of busybox_safe.exe works for me (md5: e52e9d1bcfd7e218e5d4e3c806a40487).

I tried downloading busybox.exe as well to check if it still had the problem however it gets picked up by Windows Defender as Trojan:Win32/Spursint.F!cl

donno commented Jun 2, 2017

The latest version of busybox_safe.exe works for me (md5: e52e9d1bcfd7e218e5d4e3c806a40487).

I tried downloading busybox.exe as well to check if it still had the problem however it gets picked up by Windows Defender as Trojan:Win32/Spursint.F!cl

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Jun 4, 2017

Owner

I've added a link to busybox_safe.exe to my web page.

It looks as though Windows Defender may be complaining about malware downloading busybox.exe. I suspect only the default URL is being blocked so I've added a link to the binary which specifies the full version in the filename. There have been previous issues with false positives from antivirus software so I've also suggested that downloading a different version might help.

Owner

rmyorston commented Jun 4, 2017

I've added a link to busybox_safe.exe to my web page.

It looks as though Windows Defender may be complaining about malware downloading busybox.exe. I suspect only the default URL is being blocked so I've added a link to the binary which specifies the full version in the filename. There have been previous issues with false positives from antivirus software so I've also suggested that downloading a different version might help.

@roffel79

This comment has been minimized.

Show comment
Hide comment
@roffel79

roffel79 Jul 8, 2017

I was able to reproduce the problem consistently on my machine in another project. I also see the "5" and busybox_safe solves it. Here's my test setup: busybox_crashtest.zip

roffel79 commented Jul 8, 2017

I was able to reproduce the problem consistently on my machine in another project. I also see the "5" and busybox_safe solves it. Here's my test setup: busybox_crashtest.zip

@rmyorston

This comment has been minimized.

Show comment
Hide comment
@rmyorston

rmyorston Jul 8, 2017

Owner

Since we've now had more than one report that busybox_safe.exe fixes the problem I'm going to close this now.

I've also added a busybox64.exe to my web page. The 64-bit build has safe mode enabled by default, so it should also work on Windows 10.

Owner

rmyorston commented Jul 8, 2017

Since we've now had more than one report that busybox_safe.exe fixes the problem I'm going to close this now.

I've also added a busybox64.exe to my web page. The 64-bit build has safe mode enabled by default, so it should also work on Windows 10.

@rmyorston rmyorston closed this Jul 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment