WineHQ
Bug Tracking Database – Bug 26944

 Bugzilla

 

Last modified: 2014-02-07 13:06:54 UTC  

taskkill needs to handle both / and - switches

Bug 26944 - taskkill needs to handle both / and - switches
taskkill needs to handle both / and - switches
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: programs
1.3.18
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://lastmile.gomez.com/PEERInstall...
: download, patch, source
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-04-27 11:24 UTC by Ken Sharp
Modified: 2014-02-07 13:06 UTC (History)
1 user (show)

See Also:
Regression SHA1:
Fixed by SHA1: 8a7687d868728bd3c9fe922562f5a78045f05242
Distribution: ---
Staged patchset:


Attachments
Wine 1.3.18 console output (53.39 KB, text/plain)
2011-04-27 11:24 UTC, Ken Sharp
Details
Simplest patch (1.19 KB, patch)
2012-09-28 22:08 UTC, Ken Sharp
Details | Diff
Bit more involved patch (1.77 KB, patch)
2012-09-28 22:08 UTC, Ken Sharp
Details | Diff
Patch (2.76 KB, patch)
2012-10-08 18:12 UTC, Ken Sharp
Details | Diff
taskkill.exe (Linux) (21.04 KB, application/x-lzma)
2012-10-08 18:17 UTC, Ken Sharp
Details
Dashes to slashes (579 bytes, patch)
2012-10-08 18:29 UTC, Bruno Jesus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Sharp 2011-04-27 11:24:20 UTC
Created attachment 34375 [details]
Wine 1.3.18 console output

GomezPEER runs it's own implementation of the Mozilla client (which I believe is based on Firefox 3.5.8).  After so long the PEER complains that gozilla.exe is already running and should be closed before continuing.  gozilla.exe does indeed stay loaded and does not exit.  Under Windows 7 the PEER does not have this problem.

After exiting GomezPEER normally, gozilla.exe remains in memory and has to be killed, which is what happens in the log when this occurs
err:ntdll:RtlpWaitForCriticalSection section 0x8765ac "?" wait timed out in thread 005e, blocked by 004a, retrying (60 sec)
not sure what it's waiting for.

Log attached, although it doesn't offer a great deal (ignore the trickle errors).

vcrun2005 is installed due to bug 24745 but this makes no noticeable difference to the application at all (although it's nearly all background).

You need to log in to see this behaviour.
Comment 1 Ken Sharp 2011-09-25 19:27:24 UTC
Still true in Wine 1.3.28, and I can confirm that this problem does not occur in Windows XP or 7.
Comment 2 Ken Sharp 2011-11-07 08:34:19 UTC
Still present in Wine 1.3.31 but apparently fixed in 1.3.32.  Ran overnight and the problem did not occur.
Comment 3 Alexandre Julliard 2011-11-18 13:04:54 UTC
Closing bugs fixed in 1.3.33.
Comment 4 Ken Sharp 2012-07-23 19:57:23 UTC
Problem occurs at random intervals and is probably due to the fact that gozilla.exe is a Firefox variant that, apparently, runs various tasks. It's not possible to figure out what is actually happening as it is a background app.

Firefox is open source, but it's not clear if Gómez should be sharing the modified source.

Bug is back in 1.5.9 or was never fixed - difficult to tell and regressions are incredibly difficult to bisect in Precise.
Comment 5 Ken Sharp 2012-07-31 18:00:14 UTC
This occurs a LOT more often when the hard disk utilisation is high (such as during partition to partition copies or when memory is being swapped out).

I'm not sure what would cause this but it certainly seems relevant.
Comment 6 Austin English 2012-08-01 13:19:25 UTC
(In reply to comment #5)
> This occurs a LOT more often when the hard disk utilisation is high (such as
> during partition to partition copies or when memory is being swapped out).
> 
> I'm not sure what would cause this but it certainly seems relevant.

That brings up the possibility that it's a kernel bug.
Comment 8 Ken Sharp 2012-09-28 22:06:11 UTC
The solution is unbelievably simple!

GómezPEER executes TASKKILL -F -IM gozilla.exe

This fails because taskkill only handled / switches.

Changing two characters in the source works around this bug. I have no idea how to add "/ or -" to the code (efficiently) or I would submit a patch.

I will come back to this in a couple of days as it's late here.

Attaching two simple patches to solve the Gómez problem only, for reference.
Comment 9 Ken Sharp 2012-09-28 22:08:04 UTC
Created attachment 41873 [details]
Simplest patch
Comment 10 Ken Sharp 2012-09-28 22:08:59 UTC
Created attachment 41874 [details]
Bit more involved patch

There's bound to be a better way to do this then to define the "dash"es but I'll look at it later.
Comment 12 Ken Sharp 2012-10-08 18:12:44 UTC
Created attachment 42030 [details]
Patch

This works perfectly well, and traces show this. Feel free to "correct" this as I clearly have no idea what I'm doing.
Comment 13 Ken Sharp 2012-10-08 18:17:22 UTC
Created attachment 42031 [details]
taskkill.exe (Linux)

Alternatively drop this precompiled .exe in-place and it works fine, but only works on Linux. It's still safer to compile yourself...
Comment 14 Bruno Jesus 2012-10-08 18:29:38 UTC
Created attachment 42032 [details]
Dashes to slashes

Please, give this patch a try.
Comment 15 Ken Sharp 2012-10-09 17:51:09 UTC
Thanks Bruno. This patch seems to work fine.
Comment 16 Bruno Jesus 2012-10-09 19:13:07 UTC
Feel free to send to wine-patches.
Comment 18 Austin English 2013-03-05 17:09:38 UTC
Still in wine-1.5.25-69-g402b100
Comment 19 Ken Sharp 2014-01-19 12:11:02 UTC
Still present in Wine 1.7.11.

Wine's regedit handles both - and / but in a very different way (for reference).
Comment 20 Ken Sharp 2014-01-19 12:54:25 UTC
Scrub that: it actually seems to work although I cannot find any change in the code.

$ wine-git notepad & sleep 10 ; wine-git taskkill /im notepad.exe
[1] 347579
Close message sent to top-level windows of process "notepad.exe" with PID 8.

$ wine-git notepad & sleep 10 ; wine-git taskkill -im notepad.exe
[1] 347679
Close message sent to top-level windows of process "notepad.exe" with PID 8.

Fixed then.
Comment 21 Ken Sharp 2014-01-21 12:42:01 UTC
Turns out I had a "fixed" taskkill.exe in my path!
Comment 22 Ken Sharp 2014-01-21 12:42:18 UTC
Still an issue in Wine 1.7.11.
Comment 24 Alexandre Julliard 2014-02-07 13:06:54 UTC
Closing bugs fixed in 1.7.12.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers