Icaros Desktop won't start

ascendant · 927

ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #30 on: May 06, 2022, 10:24:13 PM
It was surprisingly easy to rebuild the libx11 package with debugging symbols not stripped and install it. Here is the relevant part from GDB:

Code: [Select]
Thread 2.1 "AROSBootstrap" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7fbe480 (LWP 1981338)]
0xf3816e20 in _XSend (dpy=0x565b7a30, data=0x0, size=0) at xcb_io.c:569
569 xcb_io.c: No such file or directory.
(gdb) loadbt
Checking frame #0
Checking frame #1
Checking frame #2
Checking frame #3

add symbol table from file "Devs/Drivers/x11gfx.hidd" at
.text_addr = 0xf4ca2fc0
.rodata_addr = 0xf4cb07e0
.data_addr = 0xf4cb31e0
.eh_frame_addr = 0xf4c37f28
.bss_addr = 0xf4cb4280
Checking frame #4

add symbol table from file "Arch/linux/kernel" at
.text_addr = 0xf3974000
.rodata_addr = 0xf3993c00
.data_addr = 0x565638e0
.eh_frame_addr = 0x56563948
.bss_addr = 0x56563a40
Checking frame #5
No matching module for this address
Checking frame #6
(gdb) bt full
#0  0xf3816e20 in _XSend (dpy=0x565b7a30, data=0x0, size=0) at xcb_io.c:569
        dummy_request = {reqType = 0 '\000', data = 0 '\000', length = 0}
        pad = "\000\000"
        vec = {{iov_base = 0x565c05e0, iov_len = 1156}, {iov_base = 0x0, iov_len = 0}, {iov_base = 0xf4afc054,
            iov_len = 4107067556}}
        requests = <optimized out>
        dpy_request = 1100
        ext = <optimized out>
        c = 0x565b8390
#1  0xf38172ae in _XFlush (dpy=0x565b7a30) at xcb_io.c:609
No locals.
#2  0xf37f8075 in XFlush (dpy=0x565b7a30) at Flush.c:39
No locals.
#3  0xf4ca5875 in x11task_entry (xtpparam=0xf4c9cbec) at /home/jlm/code/AROS_build/AROS/arch/all-hosted/hidd/x11/./x11.c:286
        node = 0xf4cce260
        keyrelease_pending = 0
        sigs = 65536
        event = {type = 0, xany = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0}, xkey = {type = 0, serial = 0,
            send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0, y_root = 0,
            state = 0, keycode = 0, same_screen = 0}, xbutton = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0,
            root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0, y_root = 0, state = 0, button = 0, same_screen = 0},
          xmotion = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0, time = 0, x = 0,
            y = 0, x_root = 0, y_root = 0, state = 0, is_hint = 0 '\000', same_screen = 0}, xcrossing = {type = 0, serial = 0,
            send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0, y_root = 0,
            mode = 0, detail = 0, same_screen = 0, focus = 0, state = 0}, xfocus = {type = 0, serial = 0, send_event = 0,
            display = 0x0, window = 0, mode = 0, detail = 0}, xexpose = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, x = 0, y = 0, width = 0, height = 0, count = 0}, xgraphicsexpose = {type = 0, serial = 0, send_event = 0,
            display = 0x0, drawable = 0, x = 0, y = 0, width = 0, height = 0, count = 0, major_code = 0, minor_code = 0},
          xnoexpose = {type = 0, serial = 0, send_event = 0, display = 0x0, drawable = 0, major_code = 0, minor_code = 0},
          xvisibility = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, state = 0}, xcreatewindow = {type = 0,
            serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0, x = 0, y = 0, width = 0, height = 0,
            border_width = 0, override_redirect = 0}, xdestroywindow = {type = 0, serial = 0, send_event = 0, display = 0x0,
            event = 0, window = 0}, xunmap = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0,
            from_configure = 0}, xmap = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0,
            override_redirect = 0}, xmaprequest = {type = 0, serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0},
          xreparent = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0, parent = 0, x = 0, y = 0,
            override_redirect = 0}, xconfigure = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0,
            x = 0, y = 0, width = 0, height = 0, border_width = 0, above = 0, override_redirect = 0}, xgravity = {type = 0,
            serial = 0, send_event = 0, display = 0x0, event = 0, window = 0, x = 0, y = 0}, xresizerequest = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, width = 0, height = 0}, xconfigurerequest = {type = 0,
            serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0, x = 0, y = 0, width = 0, height = 0,
            border_width = 0, above = 0, detail = 0, value_mask = 0}, xcirculate = {type = 0, serial = 0, send_event = 0,
            display = 0x0, event = 0, window = 0, place = 0}, xcirculaterequest = {type = 0, serial = 0, send_event = 0,
            display = 0x0, parent = 0, window = 0, place = 0}, xproperty = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, atom = 0, time = 0, state = 0}, xselectionclear = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, selection = 0, time = 0}, xselectionrequest = {type = 0, serial = 0, send_event = 0, display = 0x0,
            owner = 0, requestor = 0, selection = 0, target = 0, property = 0, time = 0}, xselection = {type = 0, serial = 0,
            send_event = 0, display = 0x0, requestor = 0, selection = 0, target = 0, property = 0, time = 0}, xcolormap = {
            type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, colormap = 0, new = 0, state = 0}, xclient = {
            type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, message_type = 0, format = 0, data = {
              b = '\000' <repeats 19 times>, s = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, l = {0, 0, 0, 0, 0}}}, xmapping = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, request = 0, first_keycode = 0, count = 0}, xerror = {type = 0,
            display = 0x0, resourceid = 0, serial = 0, error_code = 0 '\000', request_code = 0 '\000', minor_code = 0 '\000'},
          xkeymap = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, key_vector = '\000' <repeats 31 times>},
          xgeneric = {type = 0, serial = 0, send_event = 0, display = 0x0, extension = 0, evtype = 0}, xcookie = {type = 0,
            serial = 0, send_event = 0, display = 0x0, extension = 0, evtype = 0, cookie = 0, data = 0x0}, pad = {
            0 <repeats 24 times>}}
        keyrelease_event = {type = 0, xany = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0}, xkey = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0,
            y_root = 0, state = 0, keycode = 0, same_screen = 0}, xbutton = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0, y_root = 0, state = 0, button = 0,
            same_screen = 0}, xmotion = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0,
            time = 0, x = 0, y = 0, x_root = 0, y_root = 0, state = 0, is_hint = 0 '\000', same_screen = 0}, xcrossing = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, root = 0, subwindow = 0, time = 0, x = 0, y = 0, x_root = 0,
            y_root = 0, mode = 0, detail = 0, same_screen = 0, focus = 0, state = 0}, xfocus = {type = 0, serial = 0,
            send_event = 0, display = 0x0, window = 0, mode = 0, detail = 0}, xexpose = {type = 0, serial = 0, send_event = 0,
            display = 0x0, window = 0, x = 0, y = 0, width = 0, height = 0, count = 0}, xgraphicsexpose = {type = 0, serial = 0,
            send_event = 0, display = 0x0, drawable = 0, x = 0, y = 0, width = 0, height = 0, count = 0, major_code = 0,
            minor_code = 0}, xnoexpose = {type = 0, serial = 0, send_event = 0, display = 0x0, drawable = 0, major_code = 0,
            minor_code = 0}, xvisibility = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, state = 0},
          xcreatewindow = {type = 0, serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0, x = 0, y = 0, width = 0,
            height = 0, border_width = 0, override_redirect = 0}, xdestroywindow = {type = 0, serial = 0, send_event = 0,
            display = 0x0, event = 0, window = 0}, xunmap = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0,
            window = 0, from_configure = 0}, xmap = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0,
            override_redirect = 0}, xmaprequest = {type = 0, serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0},
          xreparent = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0, parent = 0, x = 0, y = 0,
            override_redirect = 0}, xconfigure = {type = 0, serial = 0, send_event = 0, display = 0x0, event = 0, window = 0,
            x = 0, y = 0, width = 0, height = 0, border_width = 0, above = 0, override_redirect = 0}, xgravity = {type = 0,
            serial = 0, send_event = 0, display = 0x0, event = 0, window = 0, x = 0, y = 0}, xresizerequest = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, width = 0, height = 0}, xconfigurerequest = {type = 0,
            serial = 0, send_event = 0, display = 0x0, parent = 0, window = 0, x = 0, y = 0, width = 0, height = 0,
            border_width = 0, above = 0, detail = 0, value_mask = 0}, xcirculate = {type = 0, serial = 0, send_event = 0,
            display = 0x0, event = 0, window = 0, place = 0}, xcirculaterequest = {type = 0, serial = 0, send_event = 0,
            display = 0x0, parent = 0, window = 0, place = 0}, xproperty = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, atom = 0, time = 0, state = 0}, xselectionclear = {type = 0, serial = 0, send_event = 0, display = 0x0,
            window = 0, selection = 0, time = 0}, xselectionrequest = {type = 0, serial = 0, send_event = 0, display = 0x0,
            owner = 0, requestor = 0, selection = 0, target = 0, property = 0, time = 0}, xselection = {type = 0, serial = 0,
            send_event = 0, display = 0x0, requestor = 0, selection = 0, target = 0, property = 0, time = 0}, xcolormap = {
            type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, colormap = 0, new = 0, state = 0}, xclient = {
            type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, message_type = 0, format = 0, data = {
              b = '\000' <repeats 19 times>, s = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, l = {0, 0, 0, 0, 0}}}, xmapping = {type = 0,
            serial = 0, send_event = 0, display = 0x0, window = 0, request = 0, first_keycode = 0, count = 0}, xerror = {type = 0,
            display = 0x0, resourceid = 0, serial = 0, error_code = 0 '\000', request_code = 0 '\000', minor_code = 0 '\000'},
          xkeymap = {type = 0, serial = 0, send_event = 0, display = 0x0, window = 0, key_vector = '\000' <repeats 31 times>},
          xgeneric = {type = 0, serial = 0, send_event = 0, display = 0x0, extension = 0, evtype = 0}, xcookie = {type = 0,
            serial = 0, send_event = 0, display = 0x0, extension = 0, evtype = 0, cookie = 0, data = 0x0}, pad = {
            0 <repeats 24 times>}}
        nmsg = 0xf4c9d050
        notifysig = 65536
        nmsg_list = {mlh_Head = 0xf4cce26c, mlh_Tail = 0x0, {mlh_TailPred = 0xf4cce268, mlh_TailPred_ = 0xf4cce268}}
        xwindowlist = {mlh_Head = 0xf4c43d70, mlh_Tail = 0x0, {mlh_TailPred = 0xf4c43d70, mlh_TailPred_ = 0xf4c43d70}}
        hostclipboardmask = 131072
        f12_down = 0
        ks = 0
        task_Parent = 0xf4be4b80
        task_SigKill = 4096
        xsd = 0xf4c42df8
        myint = {is_Node = {ln_Succ = 0xf4b226ac, ln_Pred = 0xf4b44aa8, ln_Name = 0xf4cb1327 "X11 VBlank server",
            ln_Type = 2 '\002', ln_Pri = 0 '\000'}, is_Data = 0xf4c437a0, is_Code = 0xf4ca500f <x11VBlank>}
        __PRETTY_FUNCTION__ = "x11task_entry"
#4  0xf397e202 in __inline_Exec_InitSemaphore (__arg1=0x0, __SysBase=0x0)
    at /home/jlm/code/AROS_build/alt-abiv0-linux-i386-d/bin/linux-i386/gen/rom/exec/include/inline/exec.h:1321
No locals.
#5  0xf4c9cbec in ?? ()
No symbol table info available.



ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #31 on: May 06, 2022, 11:17:56 PM
This was with line 311 commented out. So it looks like that just kicks the can down the road to the next XCALL. Uncommenting that line returns a very similar stacktrace, with the top of the stack in the X11 code identical.

I see some lines <optimized out>, and attempted to rebuild libX11 without it doing that, but failed, so I think these are not aggressive optimizations but just the most basic ones. Though it is odd that the very line is seg-faults on is one for assigning to requests, which it optimized out. I printed the dpy, dpy->xcb, and dpy->xcb->last_flushed values from GDB and nothing was null.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1064
    • Karma: +104/-0
Reply #32 on: May 07, 2022, 06:42:19 AM
I was afraid it will end up with kicking the can down the road :/ I've seen these problems before. There is some faulty X call that gets added to the queue and only when XFlush is called, the call is processed and crash happens. This needs step by step debugging, adding XFlush after every X call to see which one is the offending one.

Before we embark on this path though, I'd like to ask you to build Linux-x86_64 version using these instructions: https://github.com/deadw00d/AROS/blob/master/INSTALL.md. x86_64 has a newer code base, so the problem might have already been fixed there.



aros-sg

  • Newbie
  • *
    • Posts: 2
    • Karma: +0/-0
Reply #33 on: May 07, 2022, 04:50:05 PM
I think I remember something about similiar problem when I first switched to a 64 bit linux distro and running the existing 32 bit AROS from old HD. IIRC the issue was the 32 bit libX11 or libxcb or whatever on new distro relied on 16 byte stack alignment (it used sse or something so it would crash if alignment was wrong -> disassemble crash address).  I messed around in arch/i386-all/newstackswap.c and preparecontext.c to try to fix alignement and maybe elsewhere and then managed to boot/run AROS. But I did not do much additional tests. So maybe more fixes would be needed in other places.

Google for this stack alignment change from 4 to 16 they did to 32 bit Linux x86 which can break compatibility with old apps or something.




ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #34 on: May 08, 2022, 04:01:32 AM
I was able to build and run AROS 64bit with very little problems. There was one build error. I think you need to make a similar change in another location for _STAT_VER:


Code: [Select]
~/code/AROS64/AROS 141> git diff
diff --git a/arch/all-unix/devs/hostdisk/hostdisk_host.h b/arch/all-unix/devs/hostdisk/hostdisk_host.h
index 1b4befc472..936a19269d 100644
--- a/arch/all-unix/devs/hostdisk/hostdisk_host.h
+++ b/arch/all-unix/devs/hostdisk/hostdisk_host.h
@@ -62,7 +62,7 @@ struct HostInterface
     off_t          (*lseek)(int fildes, off_t offset, int whence);
 #endif
     int           *(*__error)(void);
-#ifdef HOST_OS_linux
+#if defined(HOST_OS_linux) && defined(_STAT_VER)
     int            (*__fxstat64)(int ver, int fd, struct stat64 *buf);
     #define fstat64(fd, buf) __fxstat64(_STAT_VER, fd, buf)
 #else

Even the Python 2 problems I had with the 32-bit branch where not there at all. I think this bodes well for getting the 64-bit version of Icaros Desktop running.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1064
    • Karma: +104/-0
Reply #35 on: May 08, 2022, 06:57:32 AM
Great. :) Does 64-bit hosted start for you correctly then? No X crash?



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1064
    • Karma: +104/-0
Reply #36 on: May 08, 2022, 06:59:13 AM
I think I remember something about similiar problem when I first switched to a 64 bit linux distro and running the existing 32 bit AROS from old HD. IIRC the issue was the 32 bit libX11 or libxcb or whatever on new distro relied on 16 byte stack alignment (it used sse or something so it would crash if alignment was wrong -> disassemble crash address).  I messed around in arch/i386-all/newstackswap.c and preparecontext.c to try to fix alignement and maybe elsewhere and then managed to boot/run AROS. But I did not do much additional tests. So maybe more fixes would be needed in other places.

Google for this stack alignment change from 4 to 16 they did to 32 bit Linux x86 which can break compatibility with old apps or something.

That's actually a good suggestion. I remember having similar problems as well.

@ascendant

Can you boot 32-bit to a crash and the issue following commands:

"loadbt"
"f 0"
"disassemble"

The last one will show assembly listing. Look for a line with "=>" on the left and paste in the assembler output.



ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #37 on: May 08, 2022, 12:11:43 PM
Yes, the 64-bit AROS runs fine. I get a desktop. I can do stuff.

Here's the 32-bit output:

Code: [Select]
Thread 2.1 "AROSBootstrap" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7fbe480 (LWP 3066206)]
0xf3816e20 in _XSend (dpy=0x565b7a30, data=0x0, size=0) at xcb_io.c:569
569 xcb_io.c: No such file or directory.
(gdb) loadbt
Checking frame #0
Checking frame #1
Checking frame #2
Checking frame #3

add symbol table from file "Devs/Drivers/x11gfx.hidd" at
.text_addr = 0xf4ca2fc0
.rodata_addr = 0xf4cb1be0
.data_addr = 0xf4cb47e0
.eh_frame_addr = 0xf4c37f28
.bss_addr = 0xf4cb5880
Checking frame #4

add symbol table from file "Arch/linux/kernel" at
.text_addr = 0xf3974000
.rodata_addr = 0xf3993c00
.data_addr = 0x565638e0
.eh_frame_addr = 0x56563948
.bss_addr = 0x56563a40
Checking frame #5
No matching module for this address
Checking frame #6
(gdb) f 0
#0  0xf3816e20 in _XSend (dpy=0x565b7a30, data=0x0, size=0) at xcb_io.c:569
569 in xcb_io.c
(gdb) disassemble
Dump of assembler code for function _XSend:
   0xf3816cb0 <+0>: endbr32
   0xf3816cb4 <+4>: call   0xf37f1b98 <__x86.get_pc_thunk.ax>
   0xf3816cb9 <+9>: add    $0x1167af,%eax
   0xf3816cbe <+14>: push   %ebp
   0xf3816cbf <+15>: push   %edi
   0xf3816cc0 <+16>: push   %esi
   0xf3816cc1 <+17>: push   %ebx
   0xf3816cc2 <+18>: sub    $0x5c,%esp
   0xf3816cc5 <+21>: mov    0x70(%esp),%ebx
   0xf3816cc9 <+25>: mov    0x74(%esp),%edi
   0xf3816ccd <+29>: mov    %eax,0x18(%esp)
   0xf3816cd1 <+33>: mov    0x538(%ebx),%ecx
   0xf3816cd7 <+39>: mov    %gs:0x14,%eax
   0xf3816cdd <+45>: mov    %eax,0x4c(%esp)
   0xf3816ce1 <+49>: xor    %eax,%eax
   0xf3816ce3 <+51>: mov    (%ecx),%eax
   0xf3816ce5 <+53>: mov    %eax,0x1c(%esp)
   0xf3816ce9 <+57>: mov    0x94(%ebx),%eax
   0xf3816cef <+63>: test   $0x1,%al
   0xf3816cf1 <+65>: jne    0xf3816ee4 <_XSend+564>
   0xf3816cf7 <+71>: mov    0x68(%ebx),%eax
   0xf3816cfa <+74>: cmp    %eax,0x6c(%ebx)
   0xf3816cfd <+77>: jne    0xf3816d0b <_XSend+91>
   0xf3816cff <+79>: mov    0x78(%esp),%esi
   0xf3816d03 <+83>: test   %esi,%esi
   0xf3816d05 <+85>: je     0xf3816ee4 <_XSend+564>
   0xf3816d0b <+91>: mov    0x948(%ebx),%eax
   0xf3816d11 <+97>: xor    %edx,%edx
   0xf3816d13 <+99>: movd   %edx,%xmm1
   0xf3816d17 <+103>: xor    %edx,%edx
   0xf3816d19 <+105>: movd   %eax,%xmm0
   0xf3816d1d <+109>: mov    0x60(%ebx),%eax
   0xf3816d20 <+112>: movd   %edx,%xmm2
   0xf3816d24 <+116>: mov    0x2c(%ecx),%edx
   0xf3816d27 <+119>: punpckldq %xmm1,%xmm0
   0xf3816d2b <+123>: psllq  $0x20,%xmm0
   0xf3816d30 <+128>: movd   %eax,%xmm1
   0xf3816d34 <+132>: movdqa %xmm0,%xmm3
   0xf3816d38 <+136>: punpckldq %xmm2,%xmm1
   0xf3816d3c <+140>: paddq  %xmm1,%xmm3
   0xf3816d40 <+144>: movdqa %xmm3,%xmm0
   0xf3816d44 <+148>: movq   %xmm3,0x10(%esp)
   0xf3816d4a <+154>: movd   %xmm3,%ebp
   0xf3816d4e <+158>: psrlq  $0x20,%xmm0
   0xf3816d53 <+163>: movd   %xmm0,%esi
   0xf3816d57 <+167>: movq   0x24(%ecx),%xmm0
   0xf3816d5c <+172>: test   %edx,%edx
   0xf3816d5e <+174>: je     0xf3816f00 <_XSend+592>
   0xf3816d64 <+180>: mov    0x18(%esp),%eax
   0xf3816d68 <+184>: movdqa -0x9d838(%eax),%xmm1
   0xf3816d70 <+192>: paddq  %xmm0,%xmm1
   0xf3816d74 <+196>: movdqa %xmm1,%xmm2
   0xf3816d78 <+200>: movd   %xmm1,%edx
   0xf3816d7c <+204>: movd   %xmm1,0x8(%esp)
   0xf3816d82 <+210>: psrlq  $0x20,%xmm2
   0xf3816d87 <+215>: cmp    %edx,%ebp
   0xf3816d89 <+217>: mov    %esi,%edx
   0xf3816d8b <+219>: movd   %xmm2,%eax
   0xf3816d8f <+223>: sbb    %eax,%edx
   0xf3816d91 <+225>: jb     0xf3816de7 <_XSend+311>
   0xf3816d93 <+227>: mov    0x8(%esp),%edx
   0xf3816d97 <+231>: movd   %xmm2,%ecx
   0xf3816d9b <+235>: lea    0x0(%esi,%eiz,1),%esi
   0xf3816d9f <+239>: nop
   0xf3816da0 <+240>: mov    %ebx,%eax
   0xf3816da2 <+242>: movq   %xmm1,0x8(%esp)
   0xf3816da8 <+248>: call   0xf38165d0 <append_pending_request>
   0xf3816dad <+253>: mov    0x18(%esp),%eax
   0xf3816db1 <+257>: movq   0x8(%esp),%xmm1
   0xf3816db7 <+263>: movdqa -0x9d838(%eax),%xmm0
   0xf3816dbf <+271>: mov    %esi,%eax
   0xf3816dc1 <+273>: paddq  %xmm0,%xmm1
   0xf3816dc5 <+277>: movdqa %xmm1,%xmm0
   0xf3816dc9 <+281>: movd   %xmm1,%edx
   0xf3816dcd <+285>: psrlq  $0x20,%xmm0
   0xf3816dd2 <+290>: cmp    %edx,%ebp
   0xf3816dd4 <+292>: movd   %xmm0,%ecx
   0xf3816dd8 <+296>: sbb    %ecx,%eax
   0xf3816dda <+298>: jae    0xf3816da0 <_XSend+240>
   0xf3816ddc <+300>: mov    0x538(%ebx),%ecx
   0xf3816de2 <+306>: movq   0x24(%ecx),%xmm0
   0xf3816de7 <+311>: movq   0x10(%esp),%xmm5
   0xf3816ded <+317>: mov    %edi,0x3c(%esp)
   0xf3816df1 <+321>: movq   %xmm5,0x24(%ecx)
   0xf3816df6 <+326>: mov    0x68(%ebx),%eax
   0xf3816df9 <+329>: mov    0x6c(%ebx),%edx
   0xf3816dfc <+332>: movdqa %xmm5,%xmm4
   0xf3816e00 <+336>: mov    0x50c(%ebx),%ebp
   0xf3816e06 <+342>: psubq  %xmm0,%xmm4
   0xf3816e0a <+346>: sub    %eax,%edx
   0xf3816e0c <+348>: mov    %eax,0x34(%esp)
   0xf3816e10 <+352>: mov    0x78(%esp),%eax
   0xf3816e14 <+356>: mov    %edx,0x38(%esp)
   0xf3816e18 <+360>: mov    %eax,0x40(%esp)
   0xf3816e1c <+364>: mov    0x18(%esp),%eax
=> 0xf3816e20 <+368>: movaps %xmm4,0x20(%esp)
   0xf3816e25 <+373>: lea    -0x9d8a0(%eax),%eax
   0xf3816e2b <+379>: mov    %eax,0x44(%esp)
   0xf3816e2f <+383>: mov    0x78(%esp),%eax
   0xf3816e33 <+387>: neg    %eax
   0xf3816e35 <+389>: and    $0x3,%eax
   0xf3816e38 <+392>: mov    %eax,0x48(%esp)
--Type <RET> for more, q to quit, c to continue without paging--c
   0xf3816e3c <+396>: lea    0x34(%esp),%eax
   0xf3816e40 <+400>: mov    %eax,0x10(%esp)
   0xf3816e44 <+404>: test   %ebp,%ebp
   0xf3816e46 <+406>: je     0xf3816e94 <_XSend+484>
   0xf3816e48 <+408>: mov    %ebx,0x8(%esp)
   0xf3816e4c <+412>: lea    0x4c(%esp),%esi
   0xf3816e50 <+416>: mov    0x10(%esp),%ebx
   0xf3816e54 <+420>: lea    0x4(%ebp),%edi
   0xf3816e57 <+423>: test   %edx,%edx
   0xf3816e59 <+425>: je     0xf3816e69 <_XSend+441>
   0xf3816e5b <+427>: push   %edx
   0xf3816e5c <+428>: push   (%ebx)
   0xf3816e5e <+430>: push   %edi
   0xf3816e5f <+431>: push   0x14(%esp)
   0xf3816e63 <+435>: call   *0x40(%ebp)
   0xf3816e66 <+438>: add    $0x10,%esp
   0xf3816e69 <+441>: add    $0x8,%ebx
   0xf3816e6c <+444>: cmp    %ebx,%esi
   0xf3816e6e <+446>: je     0xf3816e7e <_XSend+462>
   0xf3816e70 <+448>: mov    0x4(%ebx),%edx
   0xf3816e73 <+451>: test   %edx,%edx
   0xf3816e75 <+453>: jne    0xf3816e5b <_XSend+427>
   0xf3816e77 <+455>: add    $0x8,%ebx
   0xf3816e7a <+458>: cmp    %ebx,%esi
   0xf3816e7c <+460>: jne    0xf3816e70 <_XSend+448>
   0xf3816e7e <+462>: mov    0x44(%ebp),%ebp
   0xf3816e81 <+465>: test   %ebp,%ebp
   0xf3816e83 <+467>: je     0xf3816e90 <_XSend+480>
   0xf3816e85 <+469>: mov    0x38(%esp),%edx
   0xf3816e89 <+473>: jmp    0xf3816e50 <_XSend+416>
   0xf3816e8b <+475>: lea    0x0(%esi,%eiz,1),%esi
   0xf3816e8f <+479>: nop
   0xf3816e90 <+480>: mov    0x8(%esp),%ebx
   0xf3816e94 <+484>: sub    $0xc,%esp
   0xf3816e97 <+487>: push   0x30(%esp)
   0xf3816e9b <+491>: push   0x30(%esp)
   0xf3816e9f <+495>: push   $0x3
   0xf3816ea1 <+497>: push   0x28(%esp)
   0xf3816ea5 <+501>: push   0x38(%esp)
   0xf3816ea9 <+505>: mov    0x38(%esp),%eax
   0xf3816ead <+509>: call   *0x410(%eax)
   0xf3816eb3 <+515>: add    $0x20,%esp
   0xf3816eb6 <+518>: test   %eax,%eax
   0xf3816eb8 <+520>: js     0xf3816f13 <_XSend+611>
   0xf3816eba <+522>: mov    0x68(%ebx),%eax
   0xf3816ebd <+525>: mov    %eax,0x6c(%ebx)
   0xf3816ec0 <+528>: mov    0x18(%esp),%eax
   0xf3816ec4 <+532>: lea    -0x9d8a4(%eax),%eax
   0xf3816eca <+538>: mov    %eax,0x64(%ebx)
   0xf3816ecd <+541>: mov    %ebx,%eax
   0xf3816ecf <+543>: call   0xf38160a0 <check_internal_connections>
   0xf3816ed4 <+548>: test   %eax,%eax
   0xf3816ed6 <+550>: je     0xf3816ee4 <_XSend+564>
   0xf3816ed8 <+552>: sub    $0xc,%esp
   0xf3816edb <+555>: push   %ebx
   0xf3816edc <+556>: call   0xf3818650 <_XSetSeqSyncFunction>
   0xf3816ee1 <+561>: add    $0x10,%esp
   0xf3816ee4 <+564>: mov    0x4c(%esp),%eax
   0xf3816ee8 <+568>: sub    %gs:0x14,%eax
   0xf3816eef <+575>: jne    0xf3816f26 <_XSend+630>
   0xf3816ef1 <+577>: add    $0x5c,%esp
   0xf3816ef4 <+580>: pop    %ebx
   0xf3816ef5 <+581>: pop    %esi
   0xf3816ef6 <+582>: pop    %edi
   0xf3816ef7 <+583>: pop    %ebp
   0xf3816ef8 <+584>: ret   
   0xf3816ef9 <+585>: lea    0x0(%esi,%eiz,1),%esi
   0xf3816f00 <+592>: mov    0x4c8(%ebx),%eax
   0xf3816f06 <+598>: test   %eax,%eax
   0xf3816f08 <+600>: jne    0xf3816d64 <_XSend+180>
   0xf3816f0e <+606>: jmp    0xf3816de7 <_XSend+311>
   0xf3816f13 <+611>: sub    $0xc,%esp
   0xf3816f16 <+614>: push   %ebx
   0xf3816f17 <+615>: mov    0x28(%esp),%eax
   0xf3816f1b <+619>: call   *0x49c(%eax)
   0xf3816f21 <+625>: add    $0x10,%esp
   0xf3816f24 <+628>: jmp    0xf3816ee4 <_XSend+564>
   0xf3816f26 <+630>: call   0xf387ebf0 <__stack_chk_fail_local>
End of assembler dump.

I did make a modification to the XCALL #define to also print out debug info about the file and line number to help determine which XCALL was the culprit, but I don't think that effects the assembly output above. I also searched the internet for that stack alignment change but haven't found anything yet.



aros-sg

  • Newbie
  • *
    • Posts: 2
    • Karma: +0/-0
Reply #38 on: May 08, 2022, 12:17:52 PM
You said you recompiled libX11. Can you try redoing that with compiler flag "-mstackrealign".



ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #39 on: May 08, 2022, 02:00:52 PM
That works. I was able to bring up the AROS desktop. I doubt I can get the Arch package maintainer to add that compile flag. They'll probably say "well, no other 32-bit programs need it."

I fired up Icaros Desktop and it also works. I started going through the first boot options, and it was in the middle of extracting extra packages when it crashed again. Oh, well.



ascendant

  • Newbie
  • *
    • Posts: 21
    • Karma: +0/-0
Reply #40 on: May 10, 2022, 11:21:35 AM
I reran Icaros Desktop and it successfully installed I am able to launch it no problems, but it doesn't last long before it goes out of stack bounds. I have to see how to increase its stack size.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1064
    • Karma: +104/-0
Reply #41 on: May 10, 2022, 11:28:23 AM
With Icaros you get quite a comprehensive  manual in PDF format - that can be helpful. Otherwise, the stack can be set via an Icon property or if you start something from Shell, by issuing Stack command.



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 2124
    • Karma: +48/-1
  • AROS One
    • AROS One
Reply #42 on: May 10, 2022, 12:08:35 PM
@deadwood

On OS3 I use the "StackAttack" application to automatically get a higher stack when required, I must say it works well, on aminet "StackAttack" includes a small source in "ASM", do you think it could be ported to AROS x86?

https://aminet.net/package/util/boot/StackAttack2