Subject: Re: bug#56869: 29.0.50; segfault, "assertion 'GDK_IS_DEVICE (device)' failed"

From: Eli Zaretskii <[email-masked]>
Date: Fri, 12 Aug 2022 15:35:18 +0300

> Cc: [email-masked]
> Date: Fri, 12 Aug 2022 12:45:48 +0100
> From:  Joe Corneli via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> Po Lu writes:
> 
> > Joe Corneli <[email-masked]> writes:
> >
> >> Now it’s produced the following, alongside the crash.  I’m happy to
> >> adapt the instrumentation further if this is not yet sufficiently
> >> useful!
> >
> > Could you please type "coredumpctl debug emacs", and then in the
> > debugger prompt, type "bt", and send the complete backtrace?
> 
> My core file was produced via running Emacs under GDB and running
> generate-core-file, hopefully the result is the same!  The backtrace is
> below.

The backtrace says:

 . the main loop called some command
 . that command signaled an error
 . the error caused the Lisp debugger to be called
 . the debugger was invoked and entered recursive-edit
 . while waiting for user input, a timer fired
 . the timer function called write-region
 . write-region called lock-file
 . lock-file called a Lisp function, probably to report some conflict
   with another process(??) locking the file
 . Emacs prompted the user, probably about the lock
 . while waiting for user response, Emacs checked timers, and as
   result called process_pending_signals
 . one of the pending signals was SIGIO, so Emacs called read-socket,
   which segfaulted inside GTK

Does the above sound reasonable for your Emacs sessions?