[Vm-dev] Fwd: [Pharo-dev] Pharo 7 Repeatable crash: XIO: fatal IO error 14 (Bad address) on X server ":0"

Jan Vrany jan.vrany at fit.cvut.cz
Fri Mar 2 08:49:20 UTC 2018


Hi Martin,

I'm sorry, I have no specific ideas as I don't know squeak specifics. 

But generally speaking, when debugging X11, I ussually do
following:

1) run the X client in "synchronous mode", i.e., XSynchronize(True)
2) trace and log requests/responses to/from an X server, I usually
   use `xtrace`. 

then, you should be able to pinpoint the exact request that generated
the error. Once you know which request it is, you can make an educated
guess what XLib function may have generated such a request. Then put a
breakpoint in XLib and collect both C and smalltalk backtrace. 
This makes a good start for the debugging. 

Laborious indeed. Worked for me couple times. 

HTH, Jan

P.S.: Are you running by chance under XWayland? If so, watch out
especially for  XGetImage() which does not work under XWayland.
But I doubt this is the problem here. 

On Thu, 2018-03-01 at 22:05 -0800, Martin McClure wrote:
>  
> On 02/28/2018 07:08 AM, Eliot Miranda wrote:
> > > I built a debug VM, and as expected running under GDB produced no
> > > new
> > > info, the process just prints the error and exits. 
> > 
> > That's strange.  Can you put a breakpoint in write or exit so that
> > gdb does stop rather than exit?  Martin, if I were trying t debug
> > this I would be trying to get the error to occur within gdb said I
> > could poke around.  I don't know any better way if solving problems
> > like this than by first because no able to examine the exception in
> > situ.  I get that it's frustrating but there's no magic
> > bullet.  One has the keep trying until one can find out what caused
> > the crash.
> > 
> 
> By putting a breakpoint in exit I was able to get the stack below. I
> hope this gives you a clue as to where to look next. Once again, what
> I'm doing at the point of failure is dragging the corner of the X
> window
> to resize it larger.
> 
> Regards,
> 
> -Martin
> 
> (gdb) break exit
> Breakpoint 1 at 0x1c2d0
> (gdb) run ~/apps/Pharo7Builds/2018-02-26-32bit/scratch.image
> Starting program:
> /home/martin/Repositories/opensmalltalk-
> vm/build.linux32x86/pharo.cog.spur/build.debug/squeak
> ~/apps/Pharo7Builds/2018-02-26-32bit/scratch.image
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> [New Thread 0xf7833b40 (LWP 26198)]
> XIO:  fatal IO error 14 (Bad address) on X server ":0"
>       after 2906 requests (2872 known processed) with 0 events
> remaining.
> 
> Thread 1 "squeak" hit Breakpoint 1, 0xf7d4b470 in exit () from
> /lib32/libc.so.6
> (gdb) where
> #0  0xf7d4b470 in exit () from /lib32/libc.so.6
> #1  0xf7950688 in _XDefaultIOError () from /usr/lib32/libX11.so.6
> #2  0xf79508ed in _XIOError () from /usr/lib32/libX11.so.6
> #3  0xf794df16 in _XEventsQueued () from /usr/lib32/libX11.so.6
> #4  0xf793f652 in XPending () from /usr/lib32/libX11.so.6
> #5  0xf7fc0743 in handleEvents () at
> /home/martin/Repositories/opensmalltalk-vm/platforms/unix/vm-display-
> X11/sqUnixX11.c:3952
> #6  0xf7fc077c in xHandler (fd=0x3, data=0x0, flags=0x2)
>     at
> /home/martin/Repositories/opensmalltalk-vm/platforms/unix/vm-display-
> X11/sqUnixX11.c:3964
> #7  0x5663f51c in aioPoll (microSeconds=0x0) at
> /home/martin/Repositories/opensmalltalk-
> vm/platforms/unix/vm/aio.c:292
> #8  0x5657271d in ioProcessEvents () at
> /home/martin/Repositories/opensmalltalk-
> vm/platforms/unix/vm/sqUnixMain.c:652
> #9  0x565e9d7f in checkForEventsMayContextSwitch
> (mayContextSwitch=0x1)
>     at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:60739
> #10 0x565f0836 in handleStackOverflowOrEventAllowContextSwitch
> (mayContextSwitch=0x1)
>     at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:63988
> #11 0x56591a1c in activateCoggedNewMethod (inInterpreter=0x0)
>     at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:14059
> #12 0x56598fc4 in executeNewMethod () at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:17329
> #13 0x56597216 in ceSendsupertonumArgs (selector=0x5758a480,
> superNormalBar=0x1, rcvr=0x57b7e788, numArgs=0x0)
>     at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:16371
> #14 0x5680034a in ?? ()
> #15 0x5657789d in interpret () at
> /home/martin/Repositories/opensmalltalk-vm/spursrc/vm/gcc3x-
> cointerp.c:2706
> #16 0x56576175 in main (argc=0x2, argv=0xffffc8c4, envp=0xffffc8d0)
>     at
> /home/martin/Repositories/opensmalltalk-
> vm/platforms/unix/vm/sqUnixMain.c:2099
> 


More information about the Vm-dev mailing list