The icebp/int01 instructions (opcode 0xf1) is no longer causing a SIGTRAP. This is a regression caused by 08d68323d1f0c34452e614263b212ca556dae47f. Since this commit, send_sigtrap() is skipped because icebp doesn't set any of the DR6 bits. This is breaking several Windows application under Wine, notably World of Warcraft. See http://bugs.winehq.org/show_bug.cgi?id=23323 and http://bugs.winehq.org/show_bug.cgi?id=23222 for the gory details. The patch posted at http://bugs.winehq.org/show_bug.cgi?id=23323#c84 has been confirmed to fix the problem.
Thanks for reporting this. I'll cook a fix ASAP.
Created attachment 26981 [details] Fix for testing This patch should fix the issue. Please test and tell me. If it's fine, I'll push it for 2.6.35 and backport it for versions that need it (presumably since 2.6.31). Thanks.
Created attachment 26982 [details] Homemade testcase Note, I've been using this homemade testcase to test the patch. However I would feel more comfortable if someone could try the real testcase (ie: Wow) just to see if it really fixes the issue.
This is against 2.6.34
Yes, it works fine for WoW. Thanks!
Tested this patch against: - 2.6.34 + Gentoo patches (x86_64) - Wine 1.2_rc2 Works just fine. Thanks!
Verified Fix.
Patch works very well! When it will be included into stable version 2.6.34-xx or 2.6.36?
> Patch works very well! When it will be included into stable version > 2.6.34-xx or 2.6.36? It's already in v2.6.35-rc4, and it should be in .33.x and .32.x soon as well [in a few weeks], as it has a -stable backport tag. Thanks, Ingo
Tested on Mandriva Linux 2010.1, with a Compilated Parched kernel 2.6.34... Works Fine. Im in Wow rigth now.
Tested on Ubuntu Lucid (10.04) with a Mainline (vanilla) 2.6.35-rc4. Does not seem to work. I tried to run the "homemade testcase" attached to this bug and it segfaults. Also, I cannot login to WoW. Please see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/604261 where I first filed the bugreport (before finding out this was not ubuntu-kernel related).
> Tested on Ubuntu Lucid (10.04) with a Mainline (vanilla) 2.6.35-rc4. Does > not seem to work. The fix was merged after -rc4 - please wait for -rc5 or use Linus's latest linus/master tree: http://people.redhat.com/mingo/tip.git/README Thanks, Ingo
just checked out linus and tip. It appears it was merged before -rc4 according to gitk on the commit for this patch: Author: Frederic Weisbecker <fweisbec@gmail.com> 2010-06-30 15:09:06 Committer: Frederic Weisbecker <fweisbec@gmail.com> 2010-06-30 16:16:20 Parent: b70e4f0529c089b00d0a6da13106db4de1ada4c7 (tracing: Fix undeclared ENOSYS in include/linux/tracepoint.h) Child: a147b88fd00962ba42c3c7f4e9b8fd013f565d2e (Merge branch 'perf/urgent') Child: c214909b36efec632432acdcbfacdd46a6e11370 (perf tools: Fix find tids routine by excluding "." and "..") Child: bf25ff66633b6f0e57e3b20d099efac22aae079d (Merge branches 'perf/urgent', 'sched/urgent' and 'sched/core' into auto-latest) Branches: remotes/linus/master, remotes/tip/auto-latest, remotes/tip/master, remotes/tip/out-of-tree, remotes/tip/perf-fixes-for-linus, remotes/tip/perf/core, remotes/tip/perf/urgent, remotes/tip/x86/alternatives, remotes/tip/x86/apic, remotes/tip/x86/fpu, remotes/tip/x86/urgent, tip-latest Follows: v2.6.35-rc1 Precedes: v2.6.35-rc4 x86: Send a SIGTRAP for user icebp traps Also, I checked the kernel source I'm using (ubuntu 2.6.35-7.11~lucid1 backport kernel) and the fix is included there as well. On both this kernel, and mainline 2.6.35-rc4 the icebp.c testcase segfaults. Please let me know what I can do to debug this issue further.
Is this a regression that you see (as reported in Description: https://bugzilla.kernel.org/show_bug.cgi?id=16315#c0)? Do you see this behaviour after the patch commit, cited in description or is it a different WoW bug?
for playing WoW, it's a regression. On my ubuntu kernel (2.6.32.*) WoW works fine. On 2.6.35-rc4 (mainline and ubuntu version) WoW breaks when logging in. As far as I've seen (searched quite a lot) this is the issue that's being described here, since I couldn't find any kernel-related WoW issues (just wine version/settings). The strange thing is: I would have expected the icebp.c testcase to work on 2.6.32 and not on 2.6.35 (as indeed this bug is described as a regression), but on both 2.6.32 (where WoW works) as on 2.6.35, the icebp.c testcase segfaults. So that seems to indicate this bug might not be related to my WoW issue, but on the other hand, the kernels I tested (mainline 2.6.35-rc4 and ubuntu version of it) should succeed with the testcase, which they don't on my system. Whether or not my WoW problem is related is not relevant I think. If the problem persists _after_ I find the testcase succeeding, I will need to look elsewhere for that problem.
Created attachment 27071 [details] testcase Better testcase, should pass through NX data page protection.
PLease test the new testcase. It's possible you have NX page protection on your data pages, which was required to be off with the previous testcase.
Ok, sorry to have bothered you all here. the new testcase succeeds in all 3 kernels: 2.6.32 (ubuntu lucid) 2.6.35-rc4 (mainline) 2.6.35-7.11 (ubuntu maverick backport) So my wow issue must be related to something else. Thanks
This is broken again in 2.6.36-rc1; I did a bit of rebasing, and found the commit that broke it, by Mr. Frederic Weisbecker again. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f7809da x86: Support for instruction breakpoints Reverting this commit fixes it.
(In reply to comment #19) > This is broken again in 2.6.36-rc1; I did a bit of rebasing, and found the > commit that broke it, by Mr. Frederic Weisbecker again. > > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f7809da > > x86: Support for instruction breakpoints > > Reverting this commit fixes it. Is it the same issue? I mean, does the testcase https://bugzilla.kernel.org/attachment.cgi?id=27071 work for you?
Hmm, the test case does work, so perhaps this is a different issue that has broken the game. I'll wait for an update from the wine bug. Does reverting this commit (locally) alone have any nasty side effects?
(In reply to comment #21) > Hmm, the test case does work, so perhaps this is a different issue that has > broken the game. I'll wait for an update from the wine bug. This is indeed a different issue. But still a bad issue. Could you please apply the patch that follows, rebuild your kernel and test again the game? It will still fail but this time it will dump the informations I need to debug it. Could you then post the result of: dmesg | grep ptrace_pokeusr > Does reverting this commit (locally) alone have any nasty side effects? No, it should be fine. Thanks.
Created attachment 27671 [details] Dump ptrace breakpoint requests Dump ptrace breakpoint requests.
Thank you for your response. This is the output: Aug 22 21:31:53 pantagruel kernel: [ 121.066134] ptrace_pokeusr: nr: 0 val: 3c93e830 err: 0 Aug 22 21:31:53 pantagruel kernel: [ 121.066144] ptrace_pokeusr: nr: 1 val: 3c95b410 err: 0 Aug 22 21:31:53 pantagruel kernel: [ 121.066152] ptrace_pokeusr: nr: 2 val: 3c976610 err: 0 Aug 22 21:31:53 pantagruel kernel: [ 121.066159] ptrace_pokeusr: nr: 3 val: 3c941e80 err: 0 Aug 22 21:31:53 pantagruel kernel: [ 121.066167] ptrace_pokeusr: nr: 7 val: 155 err: -22 Aug 22 21:32:04 pantagruel kernel: [ 132.061330] ptrace_pokeusr: nr: 0 val: 3c93e830 err: 0 Aug 22 21:32:04 pantagruel kernel: [ 132.061337] ptrace_pokeusr: nr: 1 val: 3c95b410 err: 0 Aug 22 21:32:04 pantagruel kernel: [ 132.061342] ptrace_pokeusr: nr: 2 val: 3c976610 err: 0 Aug 22 21:32:04 pantagruel kernel: [ 132.061347] ptrace_pokeusr: nr: 3 val: 3c941e80 err: 0 Aug 22 21:32:04 pantagruel kernel: [ 132.061354] ptrace_pokeusr: nr: 7 val: 0 err: 0 The -22 error is where the crash happens.
If this helps at all, I also did a run with the commit reverted (normal behaviour?) Aug 22 21:21:14 pantagruel kernel: [ 436.556494] ptrace_pokeusr: nr: 0 val: 3c93e830 err: 0 Aug 22 21:21:14 pantagruel kernel: [ 436.556499] ptrace_pokeusr: nr: 1 val: 3c95b410 err: 0 Aug 22 21:21:14 pantagruel kernel: [ 436.556503] ptrace_pokeusr: nr: 2 val: 3c976610 err: 0 Aug 22 21:21:14 pantagruel kernel: [ 436.556507] ptrace_pokeusr: nr: 3 val: 3c941e80 err: 0 Aug 22 21:21:14 pantagruel kernel: [ 436.556512] ptrace_pokeusr: nr: 7 val: 155 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036177] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036183] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036187] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036191] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036195] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036409] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036414] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036419] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036423] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036426] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036637] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036642] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036646] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036650] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036653] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036834] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036839] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036843] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036848] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.036851] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037031] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037036] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037041] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037045] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037048] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037256] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037261] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037266] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037271] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037274] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037449] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037454] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037459] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037465] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037468] ptrace_pokeusr: nr: 7 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037689] ptrace_pokeusr: nr: 0 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037692] ptrace_pokeusr: nr: 1 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037695] ptrace_pokeusr: nr: 2 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037697] ptrace_pokeusr: nr: 3 val: 0 err: 0 Aug 22 21:21:20 pantagruel kernel: [ 442.037700] ptrace_pokeusr: nr: 7 val: 0 err: 0 And everything is fine here.
Created attachment 28081 [details] Fix Thanks a lot for your test. I think the following patch should fix it. Can you give it a try? Thanks.
It works beautifully. Thanks.
I'll push the fix soon, thanks a lot!
The WoW crash Kelvie Wong had may also be http://bugs.winehq.org/show_bug.cgi?id=24193 as it occurs after login as well.