Starcraft II crashes before login in 12.04 (regression from 11.10)

Bug #978678 reported by Daniel Horn
136
This bug affects 27 people
Affects Status Importance Assigned to Milestone
Wine
Won't Fix
Medium
wine1.4 (Ubuntu)
Fix Released
High
Enki1122
Precise
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu precise (development branch)
Release: 12.04
wine-1.4
In previous version of ubuntu, wine-1.4 works with StarCraft II and the same version of wine (and all other versions of wine) fail with starcraft on nvidia drivers. Dozens of versions of nvidia drivers and 3 versions of wine were also tested with the same regression on Ubuntu 12.04 that all worked on Ubuntu 11.10

Other users are experiencing the bug and reporting it

http://www.codeweavers.com/support/tickets/browse/?ticket_id=883964;list=6;ticket_level=0

http://ubuntuforums.org/archive/index.php/t-1939902.html
http://ubuntuforums.org/showthread.php?t=1939902

It could be a kernel issue.
After successfully testing Starcraft on my Ubuntu 8.04 64-bit system, I compared the logs. They're quite similar, except for this, in 12.04:

fixme:dbghelp:EnumerateLoadedModulesW64

tags: added: amd64
Revision history for this message
In , Daniel Horn (danielreiterhorn) wrote :

Created attachment 39753
The output of wine

Description: Ubuntu precise (development branch)
Release: 12.04
Linux 3.2.0-22-generic #35-Ubuntu SMP Tue Apr 3 18:33:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

wine-1.5.1
In previous version of ubuntu, wine-1.4 works with StarCraft II and the same version of wine (and all other versions of wine) fail with starcraft on nvidia drivers. Dozens of versions of nvidia drivers and 3 versions of wine including 1.5.1 and top of tree 31f6f48bfd7a82d7229cdd7dff812272c27ae812 were also tested with the same regression on Ubuntu 12.04 that all worked on Ubuntu 11.10

Other users are experiencing the bug and reporting it

http://www.codeweavers.com/support/tickets/browse/?ticket_id=883964;list=6;ticket_level=0

http://ubuntuforums.org/archive/index.php/t-1939902.html
http://ubuntuforums.org/showthread.php?t=1939902

It could be a kernel issue.
After successfully testing Starcraft on my Ubuntu 8.04 64-bit system, I compared the logs. They're quite similar, except for this, in 12.04:

fixme:dbghelp:EnumerateLoadedModulesW64

Revision history for this message
In , Daniel Horn (danielreiterhorn) wrote :

Created attachment 39754
Console output of wine

Changed in wine:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Shadows_Friend (shadows-friend) wrote :

Does executing "echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope" in a terminal before starting Stacraft 2 help?
If so it seems to be the ptrace stuff that somehow reappeared in Ubuntu 12.04.
http://bugs.winehq.org/show_bug.cgi?id=24193
https://bugs.launchpad.net/ubuntu/+source/wine1.2/+bug/632206

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine1.4 (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Austin English (austinenglish) wrote :

May not be related, but:
err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.

should really be fixed before filing bugs.

Revision history for this message
In , Daniel Horn (danielreiterhorn) wrote :

typing

echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope

before running starcraft 2 avoids the issue

Revision history for this message
Daniel Horn (danielreiterhorn) wrote :

Shadows_Friend: yes running
echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope
before launching Starcraft 2 indeed avoids the issue

Revision history for this message
In , Daniel Horn (danielreiterhorn) wrote :

Given the fix, it could be related to this bug
https://bugs.launchpad.net/ubuntu/+source/wine1.2/+bug/632206
or this one
http://bugs.winehq.org/show_bug.cgi?id=24193
Thanks to Shadows_Friend for pointing these out here
https://bugs.launchpad.net/ubuntu/+source/wine1.4/+bug/978678

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Indeed, it looks like I'll have to reinvoke the ptrace sysctl file.

Changed in wine1.4 (Ubuntu):
assignee: nobody → Scott Ritchie (scottritchie)
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
In , Hverbeet (hverbeet) wrote :

I guess Ubuntu broke ptrace again, we might as well revert 9227eb2 if it doesn't help anymore anyway.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

This is really odd as from what I can tell the /etc/sysctl.d/ configuration hasn't changed from 11.10 to 12.04 -- kernel.yama.ptrace_scope = 1 in both cases.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I have a hunch that the multiarchness might be an issue. Does this only occur on 64 bit?

You can try a 32-bit only wine by installing the wine1.4:i386 package.

Revision history for this message
Daniel Horn (danielreiterhorn) wrote :

I built a 32 bit version of wine and had the same issue

file wine
/usr/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24

it required the /proc/sys/kernel/yama/ptrace_scope to be set to 1 to get past the login

Revision history for this message
Eric-pouech (eric-pouech) wrote :

from looking a bit more at the traces, when a new process is started, it get's the pid of the server (which will call ptrace on this process later on) through SCM_CREDENTIALS information of first recvmsg call
however, only the first process gets the correct pid, the next processes receive 0 as pid, hence breaking the stuff
this used to work in 11.10...

Revision history for this message
Eric-pouech (eric-pouech) wrote :

and for further inquiries, if I tweak wine to get (in prctl(pt_set_ptracer...) the right server pid, things work as expected
hence: ptrace behavior is ok
sendmsg/recvsmg behavior has changed beween the two versions
is there a simple way to get the diffs in kernel source code (and likely glibc) ?
A+

Revision history for this message
In , Removed by request (removed1836289) wrote :

*** Bug 30322 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dan Kegel (dank) wrote :

Daniel, have you seen Eric's workaround patch?
http://www.winehq.org/pipermail/wine-devel/2012-May/095388.html

Revision history for this message
In , Removed by request (removed1836289) wrote :

*** Bug 30539 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Removed by request (removed1836289) wrote :

Confirming

Revision history for this message
In , Dimesio (dimesio) wrote :

(In reply to comment #10)
> Confirming

Shouldn't this be UPSTREAM?

Revision history for this message
In , Removed by request (removed1836289) wrote :

yeah, though we might have to put it back to new if we get lots of dupes

Changed in wine:
status: New → Won't Fix
Revision history for this message
Piedro Kulman (piedro) wrote :

I have the same issue, any version of wine i tested ...

Why is the status set to: Won't fix!?
Why not? This should be fixed, right?

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Upstream believes it's an Ubuntu-specific problem, as it's due to an underlying kernel breakage and the "fix" is a workaround to the kernel bug. I'm not convinced it's only in Ubuntu, but it's nevertheless not exactly Wine's fault here.

I'm going to test and carry that workaround patch in our Wine packages.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

I've got a report that this one also affects Diablo III. To be more precise - it fails to log in into Battle.Net with "error 3007". Disabling ptrace_scope reported to fix the problem.

Revision history for this message
In , Loris Zinsou (nepenthes) wrote :

I confirm this bug with Portal 2.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine1.4 (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
In , Mateusz Stachowski (stachowski-mateusz) wrote :

I'm using Ubuntu 12.04 which is updated day by day (proposed actualisations enabled) and I'm experiencing this bug. In my case it affects two games:

StarCraft II Demo
Portal 2

Running echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope before starting those resloves this issue.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Please try the wine1.4 package from the winehq PPA for 12.04, it contains a workaround patch now. I will be uploading it to Precise-updates soon if it works.

Revision history for this message
In , Nikita Nedvetskiy (n-nedvetskiy) wrote :

(In reply to comment #16)
> Please try the wine1.4 package from the winehq PPA for 12.04, it contains a
> workaround patch now. I will be uploading it to Precise-updates soon if it
> works.

A week ago I tried, sadly, I even couldn't install some applications on that version.
Looking forward to fixing that in 1.5.6, it's quite annoying to write stuff in the terminal after each reboot to play MTA San Andreas.

Revision history for this message
In , Sir Wallsy (sir-wallsy) wrote :

I'm using Ubuntu 12.04. I'm experiencing this bug on Portal 2.

Running echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope before starting
those resloves this issue.

Revision history for this message
In , Dan Kegel (dank) wrote :

*** Bug 30214 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fabio Nydza Ramos (fabio-nydza) wrote :

(In reply to comment #18)
> I'm using Ubuntu 12.04. I'm experiencing this bug on Portal 2.
>
> Running echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope before starting
> those resloves this issue.

Ok with this command opened normally.

Thank you!

Revision history for this message
In , Dan Kegel (dank) wrote :

*** Bug 30977 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fabio Nydza Ramos (fabio-nydza) wrote :

(In reply to comment #20)
> (In reply to comment #18)
> > I'm using Ubuntu 12.04. I'm experiencing this bug on Portal 2.
> >
> > Running echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope before starting
> > those resloves this issue.
>
> Ok with this command opened normally.
>
> Thank you!

After restarting the pc he again presented runtime error, I went back to do the command echo 0 | sudo tee / proc / sys / kernel / yama / ptrace_scope and he opened up error.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Ubuntu Wine PPA has this patch now for 1.5.7.

I'm also gonna try and pull it in for Wine 1.4.1, which I'll be pushing as a stable release update for people who don't have the PPA

Revision history for this message
In , Nikita Nedvetskiy (n-nedvetskiy) wrote :

(In reply to comment #23)
> Ubuntu Wine PPA has this patch now for 1.5.7.
>
> I'm also gonna try and pull it in for Wine 1.4.1, which I'll be pushing as a
> stable release update for people who don't have the PPA

Upgraded to the patched 1.5.7 and started getting errors when trying to run some applications, like gta san andreas game (which had no problem at all before).
Also, in winecfg on the "drives" tab it says:
-Drive mappings-
Failed to connect to the mount manager, the drive configuration cannot be edited.
And in terminal it's: err:winecfg:open_mountmgr failed to open mount manager err 2

That used to happen with the previous patched version of wine, 1.4, if I'm not mistaken.

Good luck with fixing that!

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Hi, thank you for testing. Can you confirm:

1) That the issue didn't happen with the 1.5.7 just before the patch?
2) That the issue persists if you don't have the other workaround (ie after running echo 1|sudo tee /proc/sys/kernel/yama/ptrace_scope)

Thanks!

Revision history for this message
In , Dan Kegel (dank) wrote :

The patch in comment #8 doesn't work for Pulsen, a free download at
http://pulsengame.com/
It barfs right on process startup. Better to add the sysconf.d file that
overrides ptrace_scope, at least until the kernel bug is found.

Revision history for this message
In , Dan Kegel (dank) wrote :

err, meant "add the sysctl.d file", sorry.

Revision history for this message
Kees Cook (kees) wrote :

Try using this patch, which is effectively the same as doing the echo 0 to ptrace_scope, but only for Wine processes.

Revision history for this message
In , Nikita Nedvetskiy (n-nedvetskiy) wrote :

(In reply to comment #25)
> Hi, thank you for testing. Can you confirm:
>
> 1) That the issue didn't happen with the 1.5.7 just before the patch?
> 2) That the issue persists if you don't have the other workaround (ie after
> running echo 1|sudo tee /proc/sys/kernel/yama/ptrace_scope)
>
> Thanks!

I can, both.

tags: added: patch
Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Kees posted one more patch to experiment with on Launchpad that I'll integrate, it should be the same as the syslog change but only affecting Wine processes.

Revision history for this message
Kees Cook (kees) wrote :

I'm seeing the same thing eric mentioned:

$ grep 0x59616d61 /tmp/notepad.log
[pid 4777] prctl(0x59616d61 /* PR_??? */, 0x12ad, 0x10, 0xffb081b8, 0x4 <unfinished ...>
[pid 4788] prctl(0x59616d61 /* PR_??? */, 0, 0x10, 0xffe63188, 0x4) = 0
[pid 4802] prctl(0x59616d61 /* PR_??? */, 0, 0x10, 0xffaa6088, 0x4) = 0
[pid 4820] prctl(0x59616d61 /* PR_??? */, 0, 0x10, 0xff86fa88, 0x4) = 0

(note the 0 values instead of a real pid.)

But I'm not able to reproduce this with a simple server that passes fds to a client. I'm not sure what's different yet.

Revision history for this message
In , Nikita Nedvetskiy (n-nedvetskiy) wrote :

(In reply to comment #29)
> Kees posted one more patch to experiment with on Launchpad that I'll integrate,
> it should be the same as the syslog change but only affecting Wine processes.

This time I completely removed all the wine stuff from the HDD, even cleared cache, lol.
Tried installing that 1.5.7 again but got the same issue.
Then added your personal ppa with 'newer' 1.5.7 build, updated through the update manager and now everything works just as expected.

Neither new bugs, not ptrace issue :) Thanks!

Revision history for this message
In , Loris Zinsou (nepenthes) wrote :

I don't know exactly what happened here, but with the latest wine 1.5.7 update from ubuntu ppa (last night), Dead Space is broken (Securom missing security module).
I played Dead Space smoothly on wine 1.5.7 yesterday, it was working fine.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

I pushed another update today that uses a different version of the patch (Kees' instead of Erik's), let me know if it fixes things. According to Kees, it should be the same as simply doing the echo 1|sudo tee /proc/sys/kernel/yama/ptrace_scope trick.

I'm currently building it for 1.4.1 and will be pushing that to the PPA as well this evening.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Created attachment 40791
The working ptrace-disabling patch for Ubuntu

Here is the fully working patch in the package.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "wine1.4_1.4-0ubuntu5.debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.4 - 1.4-0ubuntu5

---------------
wine1.4 (1.4-0ubuntu5) quantal; urgency=low

  * debian/patches/ptrace-from-init.patch: disable ptrace restrictions
    for all Wine processes if the kernel is buggy (LP: #978678).
 -- Kees Cook <email address hidden> Wed, 27 Jun 2012 15:31:52 -0700

Changed in wine1.4 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

I also uploaded this as ubuntu4.1 to the precise-proposed queue, waiting for the SRU team to review. Unsubscribing sponsors now.

Changed in wine1.4 (Ubuntu Precise):
status: Confirmed → In Progress
Revision history for this message
In , Dan Kegel (dank) wrote :

*** Bug 31226 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Webservant (webservant) wrote :

I'm having similar issues but not with this windows program nor with this version of wine. The fix seems to be the same. Is there a wine1.5 version of this (same OS)?

Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted wine1.4 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/wine1.4/1.4-0ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in wine1.4 (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Thomas Mashos (tgm4883) wrote :

The package from precise proposed has resolved the issue for me

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-======================================-======================================-============================================================================================
ii wine1.4 1.4-0ubuntu4.1 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii wine1.4-amd64 1.4-0ubuntu4.1 Microsoft Windows Compatibility Layer (64-bit support)
ii wine1.4-common 1.4-0ubuntu4.1 Microsoft Windows Compatibility Layer (transitional package)
un wine1.4-i386 <none> (no description available)
thomas@ares:~$

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks for testing Thomas!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.4 - 1.4-0ubuntu4.1

---------------
wine1.4 (1.4-0ubuntu4.1) precise-proposed; urgency=low

  * debian/patches/ptrace-from-init.patch: disable ptrace restrictions
    for all Wine processes if the kernel is buggy (LP: #978678).
 -- Kees Cook <email address hidden> Wed, 27 Jun 2012 15:31:52 -0700

Changed in wine1.4 (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Kees' patch should be in the 1.5.x packages available from the Wine PPA, as well as packages in stock Ubuntu (which doesn't have 1.5.x yet). I don't know about other sources of Wine.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

(In reply to comment #33)
> Created attachment 40791 [details]
> The working ptrace-disabling patch for Ubuntu
>
> Here is the fully working patch in the package.

Is there some reason this patch isn't included in git?

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

I presumed it wasn't wanted since it was Ubuntu-specific (and this bug was resolved similarly)

Enki1122 (xerotonin)
Changed in wine1.4 (Ubuntu):
assignee: Scott Ritchie (scottritchie) → Enki1122 (xerotonin)
Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

(In reply to comment #38)
> I presumed it wasn't wanted since it was Ubuntu-specific (and this bug was
> resolved similarly)

It looks like this just got resolved the other day anyway (commit 7457f37e4a69ce7c778c41559e0d39246b12d812).

Revision history for this message
In , Bruno Gonçalves de Jesus (00cpxxx) wrote :

It looks like the launchpad bug is resolved fixed. Can't we close this?

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

(In reply to comment #40)
> It looks like the launchpad bug is resolved fixed. Can't we close this?

How the bug was fixed? In the Ubuntu kernel or just by applying the referenced
hack to the packaged Wine?

Revision history for this message
In , Bruno Gonçalves de Jesus (00cpxxx) wrote :

(In reply to comment #41)
> How the bug was fixed? In the Ubuntu kernel or just by applying the referenced
> hack to the packaged Wine?

I guess this is the message:
https://bugs.launchpad.net/ubuntu/+source/wine1.4/+bug/978678/comments/56

Revision history for this message
In , Dmitry-baikal (dmitry-baikal) wrote :

(In reply to comment #42)
> > How the bug was fixed? In the Ubuntu kernel or just by applying the referenced
> > hack to the packaged Wine?
>
> I guess this is the message:
> https://bugs.launchpad.net/ubuntu/+source/wine1.4/+bug/978678/comments/56

Sounds like a hack applied to Wine. That's not a fix.

Revision history for this message
In , Rihigenu (rihigenu) wrote :

it is not downloading, i tried to load on my website https://www.talktosonic.info/ which gives info about getting free drinks by just filling survey.

Revision history for this message
In , Austin English (austinenglish) wrote :

Closing.

Revision history for this message
In , Austin English (austinenglish) wrote :

This was inadvertently caught up in my unclosed bugs filter. NOTOURBUG should only be closed when fixed upstream.

Setting back to RESOLVED NOTOURBUG.

Sorry for the spam.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.