Subject: Re: Problems with wine
To: Stephen Nelson <st3phen@paradise.net.nz>
From: Alicia da Conceicao <alicia@engine.ca>
List: port-i386
Date: 01/06/2004 02:30:58
> I just used 'unlimit' (!/bin/csh) to raise all limits.
> I also have 512MB RAM
> I would guess that 'memorylocked' problem limit, but I don't have that much
> experience with NetBSD
> 'limit' before 'unlimit':
>         datasize        131072 kbytes
> after:
>         datasize        1048576 kbytes

Thank you Stephen!  My datasize limit was too small.  Once I set it to
the same large value you specificed, I was able to able to run wine
without that memory error.  Unfortunately, it now freezes for me in
the exact same way it freezes for you.

> changing ulimit allows me to run wine, but thats about as far as it goes - 
> nothing pops up. If I exec 'wine --debugmsg +all notepad', I get a long 
> stream of text, which suddenly stops with:
> 
> Get key \\Machine\\Software\\Wine\\Wine\\Config\\x11drv value 
> "DesktopDoubleBuffered"="N"
> 0009: get_key_value() = 0 { type=1, total=4, data={4e,00,00,00} }
> 0009:Ret  ntdll.NtQueryValueKey() retval=00000000 ret=407aa9fd
> 0009:Call ntdll.RtlUnicodeToMultiByteSize(4069f6d8,4069f6f4,00000004) 
> ret=407aaaf3
> 0009:Ret  ntdll.RtlUnicodeToMultiByteSize() retval=00000000 ret=407aaaf3
> 0009:Call 
> ntdll.RtlUnicodeToMultiByteN(4069f97c,00000002,00000000,4069f6f4,00000004) 
> ret=407aab34
> 0009:Ret  ntdll.RtlUnicodeToMultiByteN() retval=00000000 ret=407aab34
> 0009:Call ntdll.RtlNtStatusToDosError(00000000) ret=407aaa36
> 0009:Ret  ntdll.RtlNtStatusToDosError() retval=00000000 ret=407aaa36
> 0009:Ret  advapi32.RegQueryValueExA() retval=00000000 ret=40bd3def
> 0009:Call advapi32.RegCloseKey(00000024) ret=40bd3dbf
> 0009:Call ntdll.NtClose(00000024) ret=407a9f73
> 0009: close_handle( handle=0x24 )
> 0009: close_handle() = 0 { fd=-1 }
> 0009:Ret  ntdll.NtClose() retval=00000000 ret=407a9f73
> 0009:Call ntdll.RtlNtStatusToDosError(00000000) ret=407a9f79
> 0009:Ret  ntdll.RtlNtStatusToDosError() retval=00000000 ret=407a9f79
> 0009:Ret  advapi32.RegCloseKey() retval=00000000 ret=40bd3dbf

When I also run "wine --debugmsg +all notepad" *I GET THE EXACT SAME
OUTPUT BYTE FOR BYTE AS YOU SPECIFIED ABOVE*, and then it also freezes
for me.  Stephen, are you also running the 20031212 wine build?

> After this, nothing happens, 'top' shows wine using up my processor, and 'Ctrl 
> + C' has no effect.
> I have tried running './tools/winecheck' from the source, and it comes up with 
> the following errors:

When I run "winecheck" I do not get any error.  More than a year ago, I
copy my fake_windows directories and fake_registry settings from a Linux
machine running Cross-Over Office.  And I was previously able to run these
fake_windows directories and fake_registry settings on NetBSD 1.60 with
the +year old 20021007nb1 wine build from pkgsrc.

In fact when I run that old 20021007nb1 wine build on NetBSD-1.6ZG with
a kernel running NetBSD-current that is less than a week old, I also get
the same freeze as it did with the new 20031212 wine build.

Since I was able to run that old 20021007nb1 wine build on NetBSD-1.60
with the same fake_windows directories and fake_registry settings, but
it freezes with a NetBSD-1.6ZG userland and NetBSD-current kernel, the
key question is what has changed between the userland in NetBSD-1.60 &
NetBSD-1.GZG and the kernel in NetBSD-1.60 & NetBSD-current, that
would cause wine to freeze.

BTW, when I run "ktrace wine --debugmsg +all notepad", in "kdump", I
get:

  ...
  ...
  ...
  1195 wine     CALL  open(0x405ba380,0,0x406bf640)
  1195 wine     NAMI  "/usr/lib/libpthread.so.0"
  1195 wine     RET   open 9
  1195 wine     CALL  __fstat13(0x9,0x406bf640)
  1195 wine     RET   __fstat13 0
  1195 wine     CALL  mmap(0,0x1000,0x1,0x1,0x9,0,0,0)
  1195 wine     RET   mmap 1077342208/0x4036f000
  1195 wine     CALL  munmap(0x4036f000,0x1000)
  1195 wine     RET   munmap 0
  1195 wine     CALL  mmap(0,0x11000,0x5,0x2,0x9,0,0,0)
  1195 wine     RET   mmap 1088823296/0x40e62000
  1195 wine     CALL  mmap(0x40e71000,0x1000,0x3,0x12,0x9,0,0xe000,0)
  1195 wine     RET   mmap 1088884736/0x40e71000
  1195 wine     CALL  mmap(0x40e72000,0x1000,0x3,0x1012,0xffffffff,0,0,0)
  1195 wine     RET   mmap 1088888832/0x40e72000
  1195 wine     CALL  close(0x9)
  1195 wine     RET   close 0
  1195 wine     CALL  open(0x405ba3c0,0,0x406bf640)
  1195 wine     NAMI  "/usr/X11R6/lib/libXt.so.6"
  1195 wine     RET   open 9
  1195 wine     CALL  __fstat13(0x9,0x406bf640)
  1195 wine     RET   __fstat13 0
  1195 wine     CALL  mmap(0,0x1000,0x1,0x1,0x9,0,0,0)
  1195 wine     RET   mmap 1077342208/0x4036f000
  1195 wine     CALL  munmap(0x4036f000,0x1000)
  1195 wine     RET   munmap 0
  1195 wine     CALL  mmap(0,0x49000,0x5,0x2,0x9,0,0,0)
  1195 wine     RET   mmap 1088892928/0x40e73000
  1195 wine     CALL  mmap(0x40eb8000,0x4000,0x3,0x12,0x9,0,0x44000,0)
  1195 wine     RET   mmap 1089175552/0x40eb8000
  1195 wine     CALL  mmap(0x40ebc000,0,0x3,0x1012,0xffffffff,0,0,0)
  1195 wine     RET   mmap 1089191936/0x40ebc000
  1195 wine     CALL  close(0x9)
  1195 wine     RET   close 0
  1195 wine     CALL  mprotect(0x40c3c000,0x1f5000,0x7)
  1195 wine     RET   mprotect 0
  1195 wine     CALL  mprotect(0x40c3c000,0x1f5000,0x5)
  1195 wine     RET   mprotect 0
  1195 wine     CALL  mprotect(0x40e62000,0xf000,0x7)
  1195 wine     RET   mprotect 0
  1195 wine     CALL  mprotect(0x40e62000,0xf000,0x5)
  1195 wine     RET   mprotect 0
  1195 wine     CALL  __sysctl(0x406bf8ac,0x2,0x406bf8a4,0x406bf8a8,0,0)
  1195 wine     RET   __sysctl 0
  1195 wine     CALL  rasctl(0x40e6bd21,0xb,0)
  1195 wine     RET   rasctl 0
  1195 wine     CALL  __sysctl(0x406bf818,0x2,0x406bf810,0x406bf814,0,0)
  1195 wine     RET   __sysctl 0
  1195 wine     CALL  mprotect(0x40681000,0x1000,0)
  1195 wine     RET   mprotect 0
  1195 wine     CALL  __sigprocmask14(0,0,0x40680064)
  1195 wine     RET   __sigprocmask14 0
  1195 wine     CALL  __sigprocmask14(0,0,0x40e72164)
  1195 wine     RET   __sigprocmask14 0
  1195 wine     CALL  __sysctl(0x406bf8ac,0x2,0x406bf8a4,0x406bf8a8,0,0)
  1195 wine     RET   __sysctl 0
  1195 wine     CALL  __sigprocmask14(0,0,0x406bf938)
  1195 wine     RET   __sigprocmask14 0
  1195 wine     CALL  getpid
  1195 wine     RET   getpid 1195/0x4ab, 637/0x27d
  1195 wine     CALL  kill(0x4ab, SIGABRT)
  1195 wine     RET   kill 0
  1195 wine     PSIG  SIGABRT caught handler=0x40251c1c mask=() code=0x0
  1195 wine     PSIG  SIGBUS caught handler=0x40251950 mask=(2,6,31) code=0x4

Notice that SIGABRT & SIGBUS signals were triggered, and their signal
handlers appear to be responsible for the freeze.  So what is it in
the newer NetBSD userland and kernel that is causing these signals to
be triggered?

Any ideas or suggestions are greatly appreciated.

Alicia.