Wineserver hangs / high load

Questions about Wine on Linux
Locked
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Wineserver hangs / high load

Post by anarki@butterblume »

Hey. Probably since some wine dependency update yesterday, I cannot launch any application using wine - neither in existing wineprefixes nor in a new one. While wine doesn't log anything to stdout, all i can see is that /usr/bin/wineserver hangs at high load and does not react to anything but SIGKILL.
Using wine version 1.9.21-1 on Arch64.

I downgraded the following dependencies of wine that were updated on Arch64 recently:
libpng to 1.6.25-1
lib32-libpng to 1.6.24-1
lib32-libxi to 1.7.7-1
wine to 1.9.19-1

But without any improvement of the situation.
Setting WINEDUBUG=+server, I get the following debug info while the wineserver process becomes not-responding:

write_process_memory( handle=ffffffff, addr=006f4088, data={e9,5f,f9,04,00} )
*signal* signal=19

With 19 being SIGSTOP, I think. But I'm not sure what that means for my wineserver.

Does anyone else experience such a situation?
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

Update

Sometimes, wine logs the following:
27390.678:0014:0015:err:ntdll:RtlpWaitForCriticalSection section 0x110060 "../../../wine/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 0015, blocked by 001c, retrying (5 min)
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

Update #2
For other users, the problem exists as well.
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

I've set up a chroot environment, installed wine and dependencies within and tried to run wine using my local X server. The result ist the same: /usr/bin/wineserver within chroot gets stuck, producing high load on one processor. So, the only connection between the chroot environment and the local arch seems to be the X server (and drivers).
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

I have the same problem, wine hangs with write_process_memory / signal=19 . ubuntu linux kernel 4.4.0-45. Is this something kernel related or wine version related (I have wine-1.6.2)?
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

I'm running 4.8.6-1-ARCH and the applications in question did work with earlier 4.8.*-versions. If you are experiencing a comparable issue, I don't think that it might be kernel related. But since your Wine version is quite different, it might even not be a Wine issue, too.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Wineserver hangs / high load

Post by Bob Wya »

anarki@butterblume wrote:I'm running 4.8.6-1-ARCH and the applications in question did work with earlier 4.8.*-versions. If you are experiencing a comparable issue, I don't think that it might be kernel related. But since your Wine version is quite different, it might even not be a Wine issue, too.
Potentially this could be an X.Org Server issue. Just thinking what I've read about the introduction of multi-threading to X. See this Phoronix article: X.Org Server 1.19 Is Ready To Freeze, Almost 600 Changes.

Possibly on a system with weak single-threaded performance you might experience more issues?? Wine will bang on the X Server quite a lot - with all the resulting user-space context switching. Hopefully that will improve a bit with the X.Org Server 1.19 series.

Wine is certainly not performant with 2D rendering. Just fire up an explorer window and try browsing around your filesystem - it's laggy as hell...

Just some random musings. 8)

Bob
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

It's quite a straying issue here - first time App is launched, second time works, then fails.
I am trying to understand what can be common between our issues - I beleive ubuntu 4.4 kernel contains some backports from 4.8.
Wine Application is Samo-Tour Agent 7 , http://www.samo.ru/touragent/support.html , written in Delphi, exe file is not publicly available for download
Ubuntu is 16.04.1, (package version show here are from different PC, could not check right now, but should be very similar)
xserver-xorg-core 2:1.18.4-0ubuntu0.1
xserver-xorg-video-intel 2:2.99.917+git20160325-1ubuntu1.1

could be some hardware issue then?
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

xorg-server 1.18.4-1 here, so Bob might be right. While we're waiting for the 1.19 release, I'll try a downgrade. Since my Wine broke in the week of october 27th, the issue must be related to some updates that occured during that period of time - while xorg-server was last time upgraded in august.

That applies to my workstation at work, but I'm using a comparable Arch 64 setup at home on completely different h/w, experiencing exactly the same issue - so I don't think that it might me h/w related.
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

Could it be because of glibc update? I noticed it was upgraded to 2.23-0ubuntu4 just before failure.
Tried to downgrade libc6 package to 2.23-0ubuntu3, and synaptic wants to delete all my i386 packages, very strange
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Wineserver hangs / high load

Post by Bob Wya »

savelov wrote: Wine Application is Samo-Tour Agent 7 , http://www.samo.ru/touragent/support.html , written in Delphi, exe file is not publicly available for download
Ubuntu is 16.04.1, (package version show here are from different PC, could not check right now, but should be very similar)
Can you find a reproduceable way (e.g. a FOSS or free Windows application) to test for the issue? Otherwise it's going to be really hard to pin down what the cause is!!

Bob
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

I fixed the problem by downgrading to ubuntu 4.4.0-31 kernel. So it is the kernel that affects it.
Agree I need a reproducible scneario with downloadable content from internet to file a bugreport - will try. Otherwise will need to bisect to find the kernel patch that breaks it.
Thanks a lot for help!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Wineserver hangs / high load

Post by Bob Wya »

savelov wrote:I fixed the problem by downgrading to ubuntu 4.4.0-31 kernel. So it is the kernel that affects it.
Agree I need a reproducible scneario with downloadable content from internet to file a bugreport - will try. Otherwise will need to bisect to find the kernel patch that breaks it.
Thanks a lot for help!
Canonical do kindly produce a diff, of the kernel source, from the base version (for each minor release). E.g. see Ubuntu Xenial Package: linux-image-4.4.0-45-generic (4.4.0-45.66) ...

Bob
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

Same here - the last working kernel is 4.8.2-1-ARCH. From 4.8.3-1-ARCH onwards, the issue occurs.
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

anarki@butterblume wrote:Same here - the last working kernel is 4.8.2-1-ARCH. From 4.8.3-1-ARCH onwards, the issue occurs.
Do you have a reproducible scenario with downloadable app in order to file a bug report ? Also need to decide whether to file a report against kernel or wine.
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

Yes - I already filed bug 41637.
kapriolzde
Newbie
Newbie
Posts: 1
Joined: Tue Nov 01, 2016 5:46 am

Wineserver hangs / high load

Post by kapriolzde »

Sorry if this is the wrong place for this post, but I dont know where the right place is. My system Athlon 1GHz, Mandrake 10.0 worked fine yesterday, and I didnt make any changes that I know of. Today it hangs at Configuring kernel parameters:. How do I even start fixing this?

Thanks.
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

kapriolzde wrote:Sorry if this is the wrong place for this post, but I dont know where the right place is. My system Athlon 1GHz, Mandrake 10.0 worked fine yesterday, and I didnt make any changes that I know of. Today it hangs at Configuring kernel parameters:. How do I even start fixing this?

Thanks.
This seems to be hang in linux kernel initialization, not related to wine, offtopic here. Look at bugs similar to https://bugzilla.redhat.com/show_bug.cgi?id=139724
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

Meanwhile I found more similarities in my case with Samotour application hanging and Altium Designer - they both written in Delphi, could be some strange usages of inter-process writing in each-other's memory in Dephi libraries. (as it hangs after write_process_memory call)
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

Savelov, I compared the ptrace part of patch-4.8.3 with the existing function kernel_stack_pointer of ptrace.c of linux-4.8.2 source - the latter already has the changes, that patch-4.8.3 suggests - so the function was not changed from 4.8.2 to 4.8.3 at all.

from linux-4.8.2/arch/x86/kernel/ptrace.c:
unsigned long kernel_stack_pointer(struct pt_regs *regs)
{
unsigned long context = (unsigned long)regs & ~(THREAD_SIZE - 1);
unsigned long sp = (unsigned long)&regs->sp;
u32 *prev_esp;

if (context == (sp & ~(THREAD_SIZE - 1)))
return sp;

prev_esp = (u32 *)(context);
if (*prev_esp)
return (unsigned long)*prev_esp;

return (unsigned long)regs;
}
EXPORT_SYMBOL_GPL(kernel_stack_pointer);
savelov
Level 2
Level 2
Posts: 46
Joined: Sun Jan 10, 2010 5:46 am

Re: Wineserver hangs / high load

Post by savelov »

so does 4.8.3 kernel differ from 4.8.2 only by 4 commits?

http://git.kernel.org/cgit/linux/kernel ... /?h=v4.8.3

2016-10-20 mm: remove gup_flags FOLL_WRITE games from __get_user_pages() Linus Torvalds 2 -2/+13
2016-10-20 Make __xfs_xattr_put_listen preperly report errors. Artem Savkov 1 -0/+1
2016-10-20 scsi: configure runtime pm before calling device_add in scsi_add_host_with_dma Heiner Kallweit 1 -4/+8
2016-10-20 v4l: rcar-fcp: Don't force users to check for disabled FCP support
anarki@butterblume
Level 2
Level 2
Posts: 13
Joined: Thu Oct 27, 2016 7:22 am

Re: Wineserver hangs / high load

Post by anarki@butterblume »

I think so. What I can say so far is that a manual kernelbuild of 4.8.3 produces the error, while 4.8.2 does not. Currently I'm testing the four commits step by step.
Locked