Discussion:
[OpenIndiana-discuss] Wine and recent Openindiana
b***@chez.com
2018-05-22 00:27:47 UTC
Permalink
I did the update and I can say that wine (3.0) works.

$ uname -a
SunOS kamahi 5.11 OS-6906-0-g1d9a8ab82e i86pc i386 i86pc Solaris

It's interesting as I tried to disable KPTI (in /boot/conf.d/) but
couln't run wine.

Best regards.
Ben
Hi. The issue seems similar to sbcl one. I'd blame KPTI, but this need
confirming. Can you check it on illumos-gate prior to KPTI changes?
I've published illumos-gate prior to KPTI changes here -
http://buildzone.oi-build.r61.net:8151/en/index.shtml
You can add on-nightly preferred publisher, make openindiana.org
publisher non-sticky and try updating and see if it fixes wine issues.
Apostolos Syropoulos via openindiana-discuss
2018-05-22 17:48:37 UTC
Permalink
Hi, can you rebuild it with -ggdb -O0 and resend the back trace?
$ gdb /opt/gnu/wine/bin/wine core
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/gnu/wine/bin/wine...done.
[New LWP 1]
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `wine DVD Shrink 3.2.exe'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xfeda902d in wine_set_fs (val=4103) at ../../include/wine/library.h:188
188     __DEFINE_SET_SEG(fs)
[Current thread is 3 (Thread 1 (LWP 1))]
(gdb) bt
#0  0xfeda902d in wine_set_fs (val=4103) at ../../include/wine/library.h:188
#1  wine_ldt_init_fs (sel=4103, entry=0x8047300) at ldt.c:433
#2  0x7ff7e046 in signal_init_thread (teb=0x3fff8000) at signal_i386.c:2547
#3  0x7ff8676a in thread_init () at thread.c:354
#4  0x7ff54872 in __wine_process_init () at loader.c:3341
#5  0xfedaa407 in wine_init (argc=2, argv=0x804787c, error=0x804740c "",
    error_size=1024) at loader.c:979
#6  0x0805146c in main (argc=2, argv=0x804787c) at main.c:258
(gdb)

Hope this helps!

A.S.

----------------------
Apostolos Syropoulos
Xanthi, Greece
openbabel
2018-05-23 11:24:49 UTC
Permalink
Has anyone managed to compile the latest versions 3.x of wine ?

regards,

Robert
Post by Apostolos Syropoulos via openindiana-discuss
Hi, can you rebuild it with -ggdb -O0 and resend the back trace?
$ gdb /opt/gnu/wine/bin/wine core
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11".
Type "show configuration" for configuration details.
<http://www.gnu.org/software/gdb/bugs/>.
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/gnu/wine/bin/wine...done.
[New LWP 1]
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `wine DVD Shrink 3.2.exe'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xfeda902d in wine_set_fs (val=4103) at ../../include/wine/library.h:188
188 __DEFINE_SET_SEG(fs)
[Current thread is 3 (Thread 1 (LWP 1))]
(gdb) bt
#0 0xfeda902d in wine_set_fs (val=4103) at ../../include/wine/library.h:188
#1 wine_ldt_init_fs (sel=4103, entry=0x8047300) at ldt.c:433
#2 0x7ff7e046 in signal_init_thread (teb=0x3fff8000) at signal_i386.c:2547
#3 0x7ff8676a in thread_init () at thread.c:354
#4 0x7ff54872 in __wine_process_init () at loader.c:3341
#5 0xfedaa407 in wine_init (argc=2, argv=0x804787c, error=0x804740c "",
error_size=1024) at loader.c:979
#6 0x0805146c in main (argc=2, argv=0x804787c) at main.c:258
(gdb)
Hope this helps!
A.S.
----------------------
Apostolos Syropoulos
Xanthi, Greece
_______________________________________________
openindiana-discuss mailing list
https://openindiana.org/mailman/listinfo/openindiana-discuss
b***@chez.com
2018-05-23 23:33:16 UTC
Permalink
Yes, thanks for the work by the OI team, it is quite easy to compile
recent version.

For wine 3.8, just use the following patch :
================= BEGIN
--- dlls/ntdll/signal_i386.c 2016-12-24 08:52:13.000000000 +1300
+++ dlls/ntdll/signal_i386.c 2017-01-03 15:34:44.137167786 +1300
@@ -326,6 +326,10 @@
#define gregs regs
#endif

+#if defined(__sun) && defined(__SVR4)
+#include <sys/regset.h>
+#endif
+
#define EAX_sig(context) ((context)->uc_mcontext.gregs[EAX])
#define EBX_sig(context) ((context)->uc_mcontext.gregs[EBX])
#define ECX_sig(context) ((context)->uc_mcontext.gregs[ECX])
--- dlls/ntdll/virtual.c 2018-05-12 06:20:21.000000000 +0000
+++ dlls/ntdll/virtual.c 2018-05-22 14:00:17.283013377 +0000
@@ -1853,7 +1853,7 @@
*/
void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info )
{
-#ifdef HAVE_SYSINFO
+#if defined(HAVE_SYSINFO) && !defined(__sun)
struct sysinfo sinfo;
#endif

@@ -1862,7 +1862,7 @@
info->PageSize = page_size;
info->MmLowestPhysicalPage = 1;
info->MmHighestPhysicalPage = 0x7fffffff / page_size;
-#ifdef HAVE_SYSINFO
+#if defined(HAVE_SYSINFO) && !defined(__sun)
if (!sysinfo(&sinfo))
{
ULONG64 total = (ULONG64)sinfo.totalram * sinfo.mem_unit;
================= END

then :
make sure you have /usr/gnu/bin first in you PATH
$ ./configure CFLAGS=-std=gnu99 CXXFLAGS=-std=gnu99 LDFLAGS=-lumem
--prefix=/opt/wine
$ gmake -j4
# gmake install (as root)
$ export UMEM_OPTIONS=backend=mmap

And enjoy.

If you want wine staging, apply the staging patches first then the above
patch.
This only compile 32bits, I haven't find the way to compile the 64bits
version (in between the libs path in the linux world and the solaris
world and the 64bits switches).

Best regards.
Ben
Post by openbabel
Has anyone managed to compile the latest versions 3.x of wine ?
regards,
Robert
b***@chez.com
2018-05-29 00:35:33 UTC
Permalink
I recompiled wine (3.9) with -ggdb and -O0
Here is the output (using WINEDEBUG=+all env)

$ gdb --args /opt/wine/bin/wine winefile
GNU gdb (GDB) 7.10.1
[...]
Reading symbols from /opt/wine/bin/wine...done.
(gdb) r
Starting program: /opt/wine/bin/wine winefile
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
trace:virtual:NtAllocateVirtualMemory ffffffff 7ffe0000 00010000 3000
00000004
trace:virtual:VIRTUAL_DumpView View: 7ffe0000 -
7ffefffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 7ffe0000 - 7ffeffff c-rw-
trace:virtual:NtAllocateVirtualMemory ffffffff 0 00000230 101000
00000004
trace:virtual:map_view got mem in reserved area 3ffff000-40000000
trace:virtual:VIRTUAL_DumpView View: 3ffff000 -
3ffffffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 3ffff000 - 3fffffff c-rw-
trace:ntdll:RtlInitializeBitMap (7ffddf6c,3ffff044,64)
trace:ntdll:RtlInitializeBitMap (7ffddf74,3ffff154,1024)
trace:ntdll:RtlInitializeBitMap (7ffddf7c,3ffff21c,128)
trace:ntdll:RtlSetBits (7ffddf6c,0,1)
trace:ntdll:RtlSetBits (7ffddf7c,0,1)
trace:virtual:NtAllocateVirtualMemory ffffffff 0 00004000 101000
00000004
trace:virtual:map_view got mem in reserved area 3fff8000-3fffc000
trace:virtual:VIRTUAL_DumpView View: 3fff8000 -
3fffbffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 3fff8000 - 3fffbfff c-rw-

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfeda904d in wine_set_fs (val=4103) at ../../include/wine/library.h:188
188 __DEFINE_SET_SEG(fs)
(gdb) bt full
#0 0xfeda904d in wine_set_fs (val=4103) at
../../include/wine/library.h:188
No locals.
#1 wine_ldt_init_fs (sel=4103, entry=0x8046ac0) at ldt.c:433
No locals.
#2 0x7ff7e6ca in signal_init_thread (teb=0x3fff8000) at
signal_i386.c:2319
fpu_cw = 639
thread_data = 0x3fff81d4
fs_entry = {LimitLow = 4095, BaseLow = 32768, HighWord = {Bytes
= {BaseMid = 255 '\377',
Flags1 = 243 '\363', Flags2 = 64 '@', BaseHi = 63 '?'},
Bits = {BaseMid = 255,
Type = 19, Dpl = 3, Pres = 1, LimitHi = 0, Sys = 0,
Reserved_0 = 0, Default_Big = 1,
Granularity = 0, BaseHi = 63}}}
ss = {ss_sp = 0x3fff9000, ss_size = 12288, ss_flags = 0}
#3 0x7ff86f6d in thread_init () at thread.c:360
teb = 0x3fff8000
addr = 0x3ffff000
suspend = 256
size = 4096
info_size = 1
exe_file = 0x0
now = {u = {LowPart = 134507336, HighPart = -16954553}, {LowPart
= 134507336,
HighPart = -16954553}, QuadPart = -72819250518791352}
status = 0
thread_data = 0x3fff81fc
debug_info = {str_pos = 0x0, out_pos = 0x0, strings = '\000'
<repeats 1023 times>,
output = '\000' <repeats 1023 times>}
#4 0x7ff54454 in __wine_process_init () at loader.c:3440
kernel32W = {107, 101, 114, 110, 101, 108, 51, 50, 46, 100, 108,
108, 0}
wm = 0x8046ba8
status = -19225578
func_name = {Length = 27560, MaximumLength = 2052, Buffer =
0xfef525d4 "\264"}
init_func = 0xfeda97af <free_dll_path+12>
#5 0xfedaa427 in wine_init (argc=2, argv=0x8047044, error=0x8046bcc "",
error_size=1024)
at loader.c:979
context = {index = 3, buffer = 0x8a1cf98 "", name = 0x8a1cfb4
"/ntdll.dll.so", namelen = 10,
win16 = 0}
path = 0x8a1cfa2 "/opt/wine/lib/wine/ntdll.dll.so"
ntdll = 0xfebc04f0
init_func = 0x7ff5443d <__wine_process_init>
#6 0x0805149c in main (argc=2, argv=0x8047044) at main.c:258
error =
"\000\000\000\000\000\000\000\000\364\344\374\376\250\260\377\376H\211\314\***@s\324\376",
'\000' <repeats 12 times>,
"\002\000\000\000\000\000\000\***@s\324\376\004\000\000\000\200\231\324\376\000\000\000\000\000\000\000\000\000
\324\376@*\275\376\000\000\000\000\070l\004\b\337\224\314\***@s\324\376\000\000\000\000\001\000\000\000S\230\313\376\000
\324\376@*\275\376xl\004\bR\260\314\376@*\275\376\000\000\000\000\210l\004\bk\274\314\***@s\324\376\000\000\000\000\300s\324\376\000s\324\376@*\275\376\000\000\000\000\210l\004\b\250\260\377\376\200\000\000\000\020\310\377\376\230l\004\b\221\233\374\376\003\000\000\000\020\310\377\376\250l\004\b\371!\374\376\003\000\000\000"...
i = 134551599


Best regards.
Ben
On 21.05.2018 19:23, Apostolos Syropoulos via openindiana-discuss
Hi I used to compile Wine and it used to work quite well but recent
update to OpenIndiana nailed it quite hard as it seg fault's  for
anything more than --version.
I would like to confirm that wine-2.21 worked just fine before
upgrading
Segmentation Fault (core dumped)
(gdb) bt full
#0  0xfeda8f08 in wine_ldt_init_fs () from
/opt/gnu/wine/lib/libwine.so.1
No symbol table info available.
#1  0x7ff7ddec in signal_init_thread ()
   from /opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#2  0x7ff862ee in thread_init () from
/opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#3  0x7ff54fdd in __wine_process_init ()
   from /opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#4  0xfedaa291 in wine_init () from /opt/gnu/wine/lib/libwine.so.1
No symbol table info available.
#5  0x0805149f in main ()
No symbol table info available.
Hi, can you rebuild it with -ggdb -O0 and resend the back trace?
---
System Administrator of Southern Federal University Computer Center
b***@chez.com
2018-05-29 21:07:16 UTC
Permalink
As additional note, there is a bug file with wine. The comment for the
Wine team leader is "It sounds like LDT support got broken somehow. If
you haven't done that already, you should probably file a bug against
the OpenIndiana kernel."

I found an article (https://lwn.net/Articles/741878/) stating that " On
current Linux systems, the LDT is almost unused but some applications
(Wine, for example) still need it. When it is used, the LDT must be
available to both kernel and user space, but it must live in kernel
space."

I'm not sure how it is tackled down in illumos kernel as it is way
beyond my comprehension level, 'just throwing stuff as brainstorming
information.

Should I open a bug report on illumos bugtracker ?

Best regards.
Ben
Post by b***@chez.com
I recompiled wine (3.9) with -ggdb and -O0
Here is the output (using WINEDEBUG=+all env)
$ gdb --args /opt/wine/bin/wine winefile
GNU gdb (GDB) 7.10.1
[...]
Reading symbols from /opt/wine/bin/wine...done.
(gdb) r
Starting program: /opt/wine/bin/wine winefile
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
trace:virtual:NtAllocateVirtualMemory ffffffff 7ffe0000 00010000 3000
00000004
trace:virtual:VIRTUAL_DumpView View: 7ffe0000 -
7ffefffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 7ffe0000 - 7ffeffff c-rw-
trace:virtual:NtAllocateVirtualMemory ffffffff 0 00000230 101000
00000004
trace:virtual:map_view got mem in reserved area 3ffff000-40000000
trace:virtual:VIRTUAL_DumpView View: 3ffff000 -
3ffffffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 3ffff000 - 3fffffff c-rw-
trace:ntdll:RtlInitializeBitMap (7ffddf6c,3ffff044,64)
trace:ntdll:RtlInitializeBitMap (7ffddf74,3ffff154,1024)
trace:ntdll:RtlInitializeBitMap (7ffddf7c,3ffff21c,128)
trace:ntdll:RtlSetBits (7ffddf6c,0,1)
trace:ntdll:RtlSetBits (7ffddf7c,0,1)
trace:virtual:NtAllocateVirtualMemory ffffffff 0 00004000 101000
00000004
trace:virtual:map_view got mem in reserved area 3fff8000-3fffc000
trace:virtual:VIRTUAL_DumpView View: 3fff8000 -
3fffbffftrace:virtual:VIRTUAL_DumpView (valloc)
trace:virtual:VIRTUAL_DumpView 3fff8000 - 3fffbfff c-rw-
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfeda904d in wine_set_fs (val=4103) at
../../include/wine/library.h:188
188 __DEFINE_SET_SEG(fs)
(gdb) bt full
#0 0xfeda904d in wine_set_fs (val=4103) at
../../include/wine/library.h:188
No locals.
#1 wine_ldt_init_fs (sel=4103, entry=0x8046ac0) at ldt.c:433
No locals.
#2 0x7ff7e6ca in signal_init_thread (teb=0x3fff8000) at
signal_i386.c:2319
fpu_cw = 639
thread_data = 0x3fff81d4
fs_entry = {LimitLow = 4095, BaseLow = 32768, HighWord =
{Bytes = {BaseMid = 255 '\377',
Bits = {BaseMid = 255,
Type = 19, Dpl = 3, Pres = 1, LimitHi = 0, Sys = 0,
Reserved_0 = 0, Default_Big = 1,
Granularity = 0, BaseHi = 63}}}
ss = {ss_sp = 0x3fff9000, ss_size = 12288, ss_flags = 0}
#3 0x7ff86f6d in thread_init () at thread.c:360
teb = 0x3fff8000
addr = 0x3ffff000
suspend = 256
size = 4096
info_size = 1
exe_file = 0x0
now = {u = {LowPart = 134507336, HighPart = -16954553},
{LowPart = 134507336,
HighPart = -16954553}, QuadPart = -72819250518791352}
status = 0
thread_data = 0x3fff81fc
debug_info = {str_pos = 0x0, out_pos = 0x0, strings = '\000'
<repeats 1023 times>,
output = '\000' <repeats 1023 times>}
#4 0x7ff54454 in __wine_process_init () at loader.c:3440
kernel32W = {107, 101, 114, 110, 101, 108, 51, 50, 46, 100,
108, 108, 0}
wm = 0x8046ba8
status = -19225578
func_name = {Length = 27560, MaximumLength = 2052, Buffer =
0xfef525d4 "\264"}
init_func = 0xfeda97af <free_dll_path+12>
#5 0xfedaa427 in wine_init (argc=2, argv=0x8047044, error=0x8046bcc
"", error_size=1024)
at loader.c:979
context = {index = 3, buffer = 0x8a1cf98 "", name = 0x8a1cfb4
"/ntdll.dll.so", namelen = 10,
win16 = 0}
path = 0x8a1cfa2 "/opt/wine/lib/wine/ntdll.dll.so"
ntdll = 0xfebc04f0
init_func = 0x7ff5443d <__wine_process_init>
#6 0x0805149c in main (argc=2, argv=0x8047044) at main.c:258
error =
'\000' <repeats 12 times>,
i = 134551599
Best regards.
Ben
On 21.05.2018 19:23, Apostolos Syropoulos via openindiana-discuss
Hi I used to compile Wine and it used to work quite well but recent
update to OpenIndiana nailed it quite hard as it seg fault's  for
anything more than --version.
I would like to confirm that wine-2.21 worked just fine before
upgrading
Segmentation Fault (core dumped)
(gdb) bt full
#0  0xfeda8f08 in wine_ldt_init_fs () from
/opt/gnu/wine/lib/libwine.so.1
No symbol table info available.
#1  0x7ff7ddec in signal_init_thread ()
   from /opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#2  0x7ff862ee in thread_init () from
/opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#3  0x7ff54fdd in __wine_process_init ()
   from /opt/gnu/wine/lib/wine/ntdll.dll.so
No symbol table info available.
#4  0xfedaa291 in wine_init () from /opt/gnu/wine/lib/libwine.so.1
No symbol table info available.
#5  0x0805149f in main ()
No symbol table info available.
Hi, can you rebuild it with -ggdb -O0 and resend the back trace?
---
System Administrator of Southern Federal University Computer Center
_______________________________________________
openindiana-discuss mailing list
https://openindiana.org/mailman/listinfo/openindiana-discuss
Apostolos Syropoulos via openindiana-discuss
2018-06-11 17:07:47 UTC
Permalink
Post by b***@chez.com
I found an article (https://lwn.net/Articles/741878/) stating that " On
current Linux systems, the LDT is almost unused but some applications
(Wine, for example) still need it. When it is used, the LDT must be
available to both kernel and user space, but it must live in kernel
space."
I'm not sure how it is tackled down in illumos kernel as it is way
beyond my comprehension level, 'just throwing stuff as brainstorming
information.
I think we need a feature like the one described below:

https://cateee.net/lkddb/web-lkddb/MODIFY_LDT_SYSCALL.html

Currently, sys/segments.h defines things related to LDT.

A.S.


----------------------
Apostolos Syropoulos
Xanthi, Greece

Loading...