[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xorg segfaults on iMac G3 with Rage 128 Pro



Hello,

On 4/16/23 10:18 PM, Paul Wise wrote:
There is also the case where you launch Xorg via gdb and then run it.

    $ gdb `which Xorg`
    (gdb) run
    (gdb) bt full

Perfect! I was able to get a full backtrace, which is attached. Here's
the part that I think is important:

    Program received signal SIGSEGV, Segmentation fault.
    0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
    432     ../../src/r128_output.c: No such file or directory.
    (gdb) bt full
    #0  0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
            info = 0x776ed0
            bios_header = <error reading variable bios_header (Cannot access memory at address 0x48)>
            offset = <optimized out>
            i = 2

Here's part of the relevant funtion in r128_output.c [1]:

    void R128GetConnectorInfoFromBIOS(ScrnInfoPtr pScrn, R128OutputType *otypes)
    {
        R128InfoPtr info = R128PTR(pScrn);
        uint16_t bios_header, offset;
        uint32_t i;

        for (i = 0; i < R128_MAX_BIOS_CONNECTOR; i++) {
            otypes[i] = OUTPUT_NONE;
        }

        /* non-x86 platform */
        if (!info->VBIOS) {
            otypes[0] = OUTPUT_VGA;
        }

        bios_header = R128_BIOS16(0x48);

There's more after this, but it seems to crash at that last line,
failing to read the memory at 0x48 to get the BIOS' connector info.

The last version of Debian that I successfully ran Xorg on this machine
with was jessie, so it's not like the r128 driver has never worked on
PowerPC. I don't know how recent this breaking change was since I never
ran Xorg on my Debian sid install until now. Hopefully this information
is useful to someone who knows what to do with it!

Thanks,
--
Ben Westover

[1] https://sources.debian.org/src/xserver-xorg-video-r128/6.12.1-1/src/r128_output.c/
(gdb) run
Starting program: /usr/lib/xorg/Xorg 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".

X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
Current Operating System: Linux iMacG3 6.1.0-7-powerpc #1 Debian 6.1.20-2 (2023-04-08) ppc
Kernel command line: BOOT_IMAGE=/boot/vmlinux-6.1.0-7-powerpc root=UUID=3b090de3-b669-4818-8bb3-8f0cfbb6fe9e ro quiet
xorg-server 2:21.1.7-2 (https://www.debian.org/support) 
Current version of pixman: 0.42.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 17 18:34:08 2023
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Program received signal SIGSEGV, Segmentation fault.
0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
432	../../src/r128_output.c: No such file or directory.
(gdb) bt full
#0  0xa6e7cc98 in R128GetConnectorInfoFromBIOS (pScrn=pScrn@entry=0x776620, otypes=otypes@entry=0xaffff0f4) at ../../src/r128_output.c:432
        info = 0x776ed0
        bios_header = <error reading variable bios_header (Cannot access memory at address 0x48)>
        offset = <optimized out>
        i = 2
#1  0xa6e7cdf8 in R128SetupConnectors (pScrn=pScrn@entry=0x776620) at ../../src/r128_output.c:471
        info = 0x776ed0
        pR128Ent = 0x776a70
        otypes = {OUTPUT_VGA, OUTPUT_NONE}
        output = <optimized out>
        num_vga = 0
        num_dvi = 0
        i = <optimized out>
#2  0xa6e790b4 in R128PreInitControllers (pInt10=0x0, pScrn=0x776620) at ../../src/r128_driver.c:1163
        config = 0x778770
        found = 0
        i = <optimized out>
        config = <optimized out>
        found = <optimized out>
        i = <optimized out>
        output = <optimized out>
#3  R128LegacyMS (pScrn=0x776620) at ../../src/r128_driver.c:1371
        info = <optimized out>
        pInt10 = 0x0
        ret = 0
        freeInt10 = <optimized out>
        info = <optimized out>
        pInt10 = <optimized out>
        ret = <optimized out>
        exit = <optimized out>
        freeInt10 = <optimized out>
#4  R128PreInit (pScrn=0x776620, flags=<optimized out>) at ../../src/r128_driver.c:1520
        info = <optimized out>
#5  0x004c1a74 in InitOutput (pScreenInfo=pScreenInfo@entry=0x73a044 <screenInfo>, argc=argc@entry=1, argv=argv@entry=0xaffff594) at ../../../../../../hw/xfree86/common/xf86Init.c:478
        i = 0
        j = <optimized out>
        k = <optimized out>
        scr_index = <optimized out>
        modulelist = <optimized out>
        optionlist = 0x75c9e0
        autoconfig = <optimized out>
        sigio_blocked = 0
        want_hw_access = <optimized out>
        configured_device = <optimized out>
#6  0x0046fd1c in dix_main (argc=1, argv=0xaffff594, envp=<optimized out>) at ../../../../dix/main.c:190
        i = <optimized out>
        alwaysCheckForInput = {0, 1}
#7  0x00451fa4 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../../../../dix/stubmain.c:34
No locals.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: