On Sat, Mar 17, 2018 at 10:40:55PM +0100, Robert wrote: > Hi, > > Since about two weeks the X server keeps crashing (segfault) most of the > time when I start it (through xenodm). > I have to restart it (rcctl restart xenodm) about 5-10 times > until I get an (xfce) session that stays stable. > > I reinstalled today with the latest current/amd64, and now this issue became > worse: In addition, even when I get a stable session, it crashes as > soon as I do some actions, such as moving the mouse for a couple of > seconds or starting Firefox. > > Xorg.log says (from various such occurences): > (EE) Segmentation fault at address 0x64bfcd81018 > (EE) Segmentation fault at address 0x17e082969018 > (EE) Segmentation fault at address 0x78e6159b000 > > Any ideas / recommendations on how to debug or fix this? > (dmesg / xorg log below)
I see you have multiple screens in your Xorg log. I've just committed an update to xf86-video-ati 18.0.1 which mentions fixing a crash with multiple screens. https://lists.x.org/archives/xorg-announce/2018-March/002884.html * The Xorg process could crash when multiple primary screens are configured in xorg.conf. Index: configure =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/configure,v retrieving revision 1.23 diff -u -p -r1.23 configure --- configure 13 Mar 2018 06:13:13 -0000 1.23 +++ configure 17 Mar 2018 23:25:41 -0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xf86-video-ati 18.0.0. +# Generated by GNU Autoconf 2.69 for xf86-video-ati 18.0.1. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xf86-video-ati' PACKAGE_TARNAME='xf86-video-ati' -PACKAGE_VERSION='18.0.0' -PACKAGE_STRING='xf86-video-ati 18.0.0' +PACKAGE_VERSION='18.0.1' +PACKAGE_STRING='xf86-video-ati 18.0.1' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon' PACKAGE_URL='' @@ -1390,7 +1390,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-video-ati 18.0.0 to adapt to many kinds of systems. +\`configure' configures xf86-video-ati 18.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1460,7 +1460,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-video-ati 18.0.0:";; + short | recursive ) echo "Configuration of xf86-video-ati 18.0.1:";; esac cat <<\_ACEOF @@ -1616,7 +1616,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-video-ati configure 18.0.0 +xf86-video-ati configure 18.0.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2031,7 +2031,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-video-ati $as_me 18.0.0, which was +It was created by xf86-video-ati $as_me 18.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2862,7 +2862,7 @@ fi # Define the identity of the package. PACKAGE='xf86-video-ati' - VERSION='18.0.0' + VERSION='18.0.1' cat >>confdefs.h <<_ACEOF @@ -19881,7 +19881,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-video-ati $as_me 18.0.0, which was +This file was extended by xf86-video-ati $as_me 18.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19947,7 +19947,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xf86-video-ati config.status 18.0.0 +xf86-video-ati config.status 18.0.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Index: configure.ac =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/configure.ac,v retrieving revision 1.16 diff -u -p -r1.16 configure.ac --- configure.ac 13 Mar 2018 06:13:13 -0000 1.16 +++ configure.ac 17 Mar 2018 23:25:17 -0000 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-ati], - [18.0.0], + [18.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon], [xf86-video-ati]) Index: src/drmmode_display.c =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/src/drmmode_display.c,v retrieving revision 1.16 diff -u -p -r1.16 drmmode_display.c --- src/drmmode_display.c 13 Mar 2018 06:13:14 -0000 1.16 +++ src/drmmode_display.c 17 Mar 2018 23:25:17 -0000 @@ -37,6 +37,7 @@ #include "inputstr.h" #include "list.h" #include "micmap.h" +#include "mipointrst.h" #include "xf86cmap.h" #include "xf86Priv.h" #include "radeon.h" @@ -816,7 +817,7 @@ drmmode_crtc_scanout_update(xf86CrtcPtr radeon_scanout_do_update(crtc, scanout_id, screen->GetWindowPixmap(screen->root), - box); + *box); radeon_bo_wait(drmmode_crtc->scanout[scanout_id].bo); } } @@ -2750,8 +2751,8 @@ static void drmmode_sprite_do_set_cursor info->sprites_visible += device_priv->sprite_visible - sprite_visible; } -void drmmode_sprite_set_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, - CursorPtr pCursor, int x, int y) +static void drmmode_sprite_set_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(scrn); @@ -2762,11 +2763,11 @@ void drmmode_sprite_set_cursor(DeviceInt device_priv->cursor = pCursor; drmmode_sprite_do_set_cursor(device_priv, scrn, x, y); - info->SetCursor(pDev, pScreen, pCursor, x, y); + info->SpriteFuncs->SetCursor(pDev, pScreen, pCursor, x, y); } -void drmmode_sprite_move_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, - int y) +static void drmmode_sprite_move_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(scrn); @@ -2776,9 +2777,57 @@ void drmmode_sprite_move_cursor(DeviceIn drmmode_sprite_do_set_cursor(device_priv, scrn, x, y); - info->MoveCursor(pDev, pScreen, x, y); + info->SpriteFuncs->MoveCursor(pDev, pScreen, x, y); } +static Bool drmmode_sprite_realize_realize_cursor(DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + RADEONInfoPtr info = RADEONPTR(scrn); + + return info->SpriteFuncs->RealizeCursor(pDev, pScreen, pCursor); +} + +static Bool drmmode_sprite_realize_unrealize_cursor(DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + RADEONInfoPtr info = RADEONPTR(scrn); + + return info->SpriteFuncs->UnrealizeCursor(pDev, pScreen, pCursor); +} + +static Bool drmmode_sprite_device_cursor_initialize(DeviceIntPtr pDev, + ScreenPtr pScreen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + RADEONInfoPtr info = RADEONPTR(scrn); + + return info->SpriteFuncs->DeviceCursorInitialize(pDev, pScreen); +} + +static void drmmode_sprite_device_cursor_cleanup(DeviceIntPtr pDev, + ScreenPtr pScreen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + RADEONInfoPtr info = RADEONPTR(scrn); + + info->SpriteFuncs->DeviceCursorCleanup(pDev, pScreen); +} + +miPointerSpriteFuncRec drmmode_sprite_funcs = { + .RealizeCursor = drmmode_sprite_realize_realize_cursor, + .UnrealizeCursor = drmmode_sprite_realize_unrealize_cursor, + .SetCursor = drmmode_sprite_set_cursor, + .MoveCursor = drmmode_sprite_move_cursor, + .DeviceCursorInitialize = drmmode_sprite_device_cursor_initialize, + .DeviceCursorCleanup = drmmode_sprite_device_cursor_cleanup, +}; + + void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -3233,7 +3282,7 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn } radeon_scanout_do_update(crtc, scanout_id, new_front, - &extents); + extents); drmmode_crtc_wait_pending_event(drmmode_crtc, pRADEONEnt->fd, drmmode_crtc->scanout_update_pending); Index: src/drmmode_display.h =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/src/drmmode_display.h,v retrieving revision 1.10 diff -u -p -r1.10 drmmode_display.h --- src/drmmode_display.h 13 Mar 2018 06:13:14 -0000 1.10 +++ src/drmmode_display.h 17 Mar 2018 23:25:17 -0000 @@ -206,10 +206,6 @@ extern Bool drmmode_pre_init(ScrnInfoPtr extern void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr); -extern void drmmode_sprite_set_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, - CursorPtr pCursor, int x, int y); -extern void drmmode_sprite_move_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, - int y); extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y); extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, @@ -247,6 +243,9 @@ int drmmode_get_current_ust(int drm_fd, Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type, uint32_t target_seq, unsigned long signal, uint64_t *ust, uint32_t *result_seq); + + +miPointerSpriteFuncRec drmmode_sprite_funcs; #endif Index: src/radeon.h =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/src/radeon.h,v retrieving revision 1.18 diff -u -p -r1.18 radeon.h --- src/radeon.h 13 Mar 2018 06:13:14 -0000 1.18 +++ src/radeon.h 17 Mar 2018 23:25:18 -0000 @@ -557,9 +557,7 @@ typedef struct { CreateScreenResourcesProcPtr CreateScreenResources; CreateWindowProcPtr CreateWindow; WindowExposuresProcPtr WindowExposures; - void (*SetCursor) (DeviceIntPtr pDev, ScreenPtr pScreen, - CursorPtr pCursor, int x, int y); - void (*MoveCursor) (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); + miPointerSpriteFuncPtr SpriteFuncs; /* Number of SW cursors currently visible on this screen */ int sprites_visible; @@ -674,7 +672,7 @@ Bool radeon_dri3_screen_init(ScreenPtr s /* radeon_kms.c */ Bool radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id, - PixmapPtr src_pix, BoxPtr extents); + PixmapPtr src_pix, BoxRec extents); void RADEONWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0) , RegionPtr pBSRegion Index: src/radeon_kms.c =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-ati/src/radeon_kms.c,v retrieving revision 1.16 diff -u -p -r1.16 radeon_kms.c --- src/radeon_kms.c 13 Mar 2018 06:13:14 -0000 1.16 +++ src/radeon_kms.c 17 Mar 2018 23:25:18 -0000 @@ -903,10 +903,10 @@ radeon_dirty_update(ScrnInfoPtr scrn) Bool radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id, - PixmapPtr src_pix, BoxPtr extents) + PixmapPtr src_pix, BoxRec extents) { drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private; - RegionRec region = { .extents = *extents, .data = NULL }; + RegionRec region = { .extents = extents, .data = NULL }; ScrnInfoPtr scrn = xf86_crtc->scrn; ScreenPtr pScreen = scrn->pScreen; RADEONInfoPtr info = RADEONPTR(scrn); @@ -915,11 +915,11 @@ radeon_scanout_do_update(xf86CrtcPtr xf8 if (!xf86_crtc->enabled || !drmmode_crtc->scanout[scanout_id].pixmap || - extents->x1 >= extents->x2 || extents->y1 >= extents->y2) + extents.x1 >= extents.x2 || extents.y1 >= extents.y2) return FALSE; pDraw = &drmmode_crtc->scanout[scanout_id].pixmap->drawable; - if (!radeon_scanout_extents_intersect(xf86_crtc, extents)) + if (!radeon_scanout_extents_intersect(xf86_crtc, &extents)) return FALSE; if (drmmode_crtc->tear_free) { @@ -965,9 +965,9 @@ radeon_scanout_do_update(xf86CrtcPtr xf8 pScreen->SourceValidate = NULL; CompositePicture(PictOpSrc, src, NULL, dst, - extents->x1, extents->y1, 0, 0, extents->x1, - extents->y1, extents->x2 - extents->x1, - extents->y2 - extents->y1); + extents.x1, extents.y1, 0, 0, extents.x1, + extents.y1, extents.x2 - extents.x1, + extents.y2 - extents.y1); pScreen->SourceValidate = SourceValidate; free_dst: @@ -981,9 +981,9 @@ radeon_scanout_do_update(xf86CrtcPtr xf8 ValidateGC(pDraw, gc); (*gc->ops->CopyArea)(&src_pix->drawable, pDraw, gc, - xf86_crtc->x + extents->x1, xf86_crtc->y + extents->y1, - extents->x2 - extents->x1, extents->y2 - extents->y1, - extents->x1, extents->y1); + xf86_crtc->x + extents.x1, xf86_crtc->y + extents.y1, + extents.x2 - extents.x1, extents.y2 - extents.y1, + extents.x1, extents.y1); FreeScratchGC(gc); } @@ -1015,7 +1015,7 @@ radeon_scanout_update_handler(xf86CrtcPt drmmode_crtc->dpms_mode == DPMSModeOn) { if (radeon_scanout_do_update(crtc, drmmode_crtc->scanout_id, screen->GetWindowPixmap(screen->root), - ®ion->extents)) + region->extents)) RegionEmpty(region); } @@ -1096,7 +1096,7 @@ radeon_scanout_flip(ScreenPtr pScreen, R scanout_id = drmmode_crtc->scanout_id ^ 1; if (!radeon_scanout_do_update(xf86_crtc, scanout_id, pScreen->GetWindowPixmap(pScreen->root), - ®ion->extents)) + region->extents)) return; RegionEmpty(region); @@ -2017,12 +2017,8 @@ static Bool RADEONCursorInit_KMS(ScreenP return FALSE; } - if (PointPriv->spriteFuncs->SetCursor != drmmode_sprite_set_cursor) { - info->SetCursor = PointPriv->spriteFuncs->SetCursor; - info->MoveCursor = PointPriv->spriteFuncs->MoveCursor; - PointPriv->spriteFuncs->SetCursor = drmmode_sprite_set_cursor; - PointPriv->spriteFuncs->MoveCursor = drmmode_sprite_move_cursor; - } + info->SpriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &drmmode_sprite_funcs; } if (xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) @@ -2186,10 +2182,8 @@ static Bool RADEONCloseScreen_KMS(Screen miPointerScreenPtr PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); - if (PointPriv->spriteFuncs->SetCursor == drmmode_sprite_set_cursor) { - PointPriv->spriteFuncs->SetCursor = info->SetCursor; - PointPriv->spriteFuncs->MoveCursor = info->MoveCursor; - } + if (PointPriv->spriteFuncs == &drmmode_sprite_funcs) + PointPriv->spriteFuncs = info->SpriteFuncs; } pScreen->BlockHandler = info->BlockHandler;