From jmhdassen at yahoo.com Sat Feb 20 11:24:32 2010 From: jmhdassen at yahoo.com (Jos Dassen) Date: Sat, 20 Feb 2010 03:24:32 -0800 (PST) Subject: [cl-gtk2-devel] Can not run cl-gtk2 on sbcl 1.0.35 multithreaded Message-ID: <578292.38709.qm@web55006.mail.re4.yahoo.com> Hi, I am trying to install cl-gtk2 on my system and get error messages related to multithreading. My system is: Ubuntu 8.0.4 64 bit SBCL 1.0.35 64 bit with multithreading. When loading cl-gtk2 I get the following messages: * (require :cl-gtk2-gtk) ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-pango.asd ; into # ; registering # as CL-GTK2-PANGO ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/iterate.asd ; into # ; registering # as ITERATE ; registering # as ITERATE-PG ; registering # as ITERATE-TESTS ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-glib.asd ; into # ; registering # as CL-GTK2-GLIB ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/closer-mop.asd ; into # ; registering # as CLOSER-MOP ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/lw-compat.asd ; into # ; registering # as LW-COMPAT ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/bordeaux-threads.asd ; into # ; registering # as BORDEAUX-THREADS ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/alexandria.asd ; into # ; registering # as ALEXANDRIA ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/trivial-garbage.asd ; into # ; registering # as TRIVIAL-GARBAGE ; registering # as ; TRIVIAL-GARBAGE-TESTS ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cffi.asd into ; # ; registering # as CFFI ; loading system definition from ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-gdk.asd ; into # ; registering # as CL-GTK2-GDK debugger invoked on a SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR in thread #: Attempt to call an undefined alien function. Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [TRY-RECOMPILING] Recompile glib and try loading it again 1: [RETRY ] Retry performing # on #. 2: [ACCEPT ] Continue, treating # on # as having been successful. 3: [ABORT ] Exit debugger, returning to top level. (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR) 0] p (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR) 0] down ("foreign function: #x4215B0") 1] down (G-THREAD-GET-INITIALIZED) 2] down (SB-FASL::FOP-FUNCALL) 3] down (SB-FASL::LOAD-FASL-GROUP #) 4] Any ideas of what might be wrong ??? JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalyanov.dmitry at gmail.com Sat Feb 20 13:21:24 2010 From: kalyanov.dmitry at gmail.com (Kalyanov Dmitry) Date: Sat, 20 Feb 2010 16:21:24 +0300 Subject: [cl-gtk2-devel] Can not run cl-gtk2 on sbcl 1.0.35 multithreaded In-Reply-To: <578292.38709.qm@web55006.mail.re4.yahoo.com> References: <578292.38709.qm@web55006.mail.re4.yahoo.com> Message-ID: <201002201621.28554.Kalyanov.Dmitry@gmail.com> On Saturday 20 February 2010 14:24:32, Jos Dassen wrote: > Hi, > > I am trying to install cl-gtk2 on my system and get error messages related > to multithreading. > > My system is: > Ubuntu 8.0.4 64 bit > SBCL 1.0.35 64 bit with multithreading. > > When loading cl-gtk2 I get the following messages: > > * (require :cl-gtk2-gtk) > > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-pa > ngo.asd ; into # > ; registering # as CL-GTK2-PANGO > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/iterate.as > d ; into # > ; registering # as ITERATE > ; registering # as ITERATE-PG > ; registering # as ITERATE-TESTS > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-gl > ib.asd ; into # > ; registering # as CL-GTK2-GLIB > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/closer-mop > .asd ; into # > ; registering # as CLOSER-MOP > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/lw-compat. > asd ; into # > ; registering # as LW-COMPAT > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/bordeaux-t > hreads.asd ; into # > ; registering # as BORDEAUX-THREADS > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/alexandria > .asd ; into # > ; registering # as ALEXANDRIA > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/trivial-ga > rbage.asd ; into # > ; registering # as TRIVIAL-GARBAGE > ; registering # as > ; TRIVIAL-GARBAGE-TESTS > ; loading system definition from > ; /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cffi.asd > into ; # > ; registering # as CFFI > ; loading system definition from > ; > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/cl-gtk2-gd > k.asd ; into # > ; registering # as CL-GTK2-GDK > > debugger invoked on a SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR in thread > #: Attempt to call an > undefined alien function. > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [TRY-RECOMPILING] Recompile glib and try loading it again > 1: [RETRY ] Retry performing # on > #. > 2: [ACCEPT ] Continue, treating # > on # as having been successful. > 3: [ABORT ] Exit debugger, returning to top level. > > (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR) > 0] p > (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR) > 0] down > ("foreign function: #x4215B0") > 1] down > (G-THREAD-GET-INITIALIZED) > 2] down > (SB-FASL::FOP-FUNCALL) > 3] down > (SB-FASL::LOAD-FASL-GROUP > # for "file > /home/dassen/programming/lisp/sbcl-1.0.35/lib/sbcl/site-systems/source/cl- > gtk2-0.1.1/glib/glib.fasl" {1003AC0271}>) > 4] > > > > Any ideas of what might be wrong ??? > > > JD The error message is not related to threading, the actual error is "Attempt to call an undefined alien function." which means that cl-gtk2 tried to call a function that is not present in a library. cl-gtk2 requires gtk+ >= 2.16 (and glib >= 2.20) but ubuntu 8.04 has too old versions of them (gtk+-2.12 and glib-2.16 according to http://packages.ubuntu.com/hardy/libglib2.0-0). You should update them (I'm sorry I can't help with that - I don't know ubuntu well enough). In the current development version of cl-gtk2 (and in next released versions) the error message about libraries versions will be more clear. ---- ???????? ??????? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From mathrick at gmail.com Sun Feb 21 02:24:01 2010 From: mathrick at gmail.com (Maciej Katafiasz) Date: Sun, 21 Feb 2010 03:24:01 +0100 Subject: [cl-gtk2-devel] Odd hangs when resizing Message-ID: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> Hi, I'm hitting (and have been, it just took me forever to identify the cause) an odd bug. Namely, if I ever resize or hide (that includes minimising or switching to another desktop) a CL-GTK2 window, the whole thing hangs. That is, the GTK+ part stops being responsive at all, and Lisp is pretty wedged too, with slime-threads view failing to work, etc. As soon as it tries to touch the GTK+ main loop, it hangs too, although the main thread in *inferior-lisp* and SLIME thread remain responsive. Still, I have to restart it to get it back in order. Needless to say, this kind of bug makes it rather impossible to do anything. Has anyone else seen anything like that? The test is trivial, just run the gtk-hello example and minimise and restore the window. For me it comes back completely gray and stops responding to anything. The same happens actually any time the window loses focus at all. I'm utterly stumped, as I have no idea how to debug it. It's impossible to touch it from the Lisp side, and trying to attach GDB to SBCL ends with SBCL dying, which doesn't help matters. Now, a bunch of info about my system: - SBCL 1.0.31 from ubuntu, but it happened before too - cl-gtk2 updated all the way up to a0010ebc6fed79a09ca3da43d84fea224312ee37 - GTK+ 2.18.3-1ubuntu2.2 If you have any idea how to tackle it, I'm dying to hear. I have code to write, and I can't get anywhere while this is broken. Cheers, Maciej From kalyanov.dmitry at gmail.com Sun Feb 21 12:14:53 2010 From: kalyanov.dmitry at gmail.com (Kalyanov Dmitry) Date: Sun, 21 Feb 2010 15:14:53 +0300 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> Message-ID: <201002211515.02947.Kalyanov.Dmitry@gmail.com> On Sunday 21 February 2010 05:24:01, Maciej Katafiasz wrote: > Hi, > > I'm hitting (and have been, it just took me forever to identify the > cause) an odd bug. Namely, if I ever resize or hide (that includes > minimising or switching to another desktop) a CL-GTK2 window, the > whole thing hangs. That is, the GTK+ part stops being responsive at > all, and Lisp is pretty wedged too, with slime-threads view failing to > work, etc. As soon as it tries to touch the GTK+ main loop, it hangs > too, although the main thread in *inferior-lisp* and SLIME thread > remain responsive. Still, I have to restart it to get it back in > order. > > Needless to say, this kind of bug makes it rather impossible to do > anything. Has anyone else seen anything like that? The test is > trivial, just run the gtk-hello example and minimise and restore the > window. For me it comes back completely gray and stops responding to > anything. The same happens actually any time the window loses focus at > all. I'm utterly stumped, as I have no idea how to debug it. It's > impossible to touch it from the Lisp side, and trying to attach GDB to > SBCL ends with SBCL dying, which doesn't help matters. I've also encountered similar behaviour (but not hanging) but could not yet find its cause. Also similar behavior happens in CCL on Windows. I've been trying to debug it for some time with no success. My current guess at the moment is that it has something to do with signals. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From mathrick at gmail.com Sun Feb 21 12:47:49 2010 From: mathrick at gmail.com (Maciej Katafiasz) Date: Sun, 21 Feb 2010 13:47:49 +0100 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <201002211515.02947.Kalyanov.Dmitry@gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <201002211515.02947.Kalyanov.Dmitry@gmail.com> Message-ID: <50b7e5181002210447w3ad00c7dm7e41f3e94b727e88@mail.gmail.com> On Sun, Feb 21, 2010 at 13:14, Kalyanov Dmitry wrote: > On Sunday 21 February 2010 05:24:01, Maciej Katafiasz wrote: >> Needless to say, this kind of bug makes it rather impossible to do >> anything. Has anyone else seen anything like that? The test is >> trivial, just run the gtk-hello example and minimise and restore the >> window. For me it comes back completely gray and stops responding to >> anything. The same happens actually any time the window loses focus at >> all. I'm utterly stumped, as I have no idea how to debug it. It's >> impossible to touch it from the Lisp side, and trying to attach GDB to >> SBCL ends with SBCL dying, which doesn't help matters. > > I've also encountered similar behaviour (but not hanging) but could not yet > find its cause. Also similar behavior happens in CCL on Windows. Is it reproducible for you? Here it happens every time. I haven't had the chance to test it on another system yet, so I don't know if it has something to do with the particulars of my box, or if it happens always. Cheers, Maciej From kalyanov.dmitry at gmail.com Sun Feb 21 17:53:44 2010 From: kalyanov.dmitry at gmail.com (Kalyanov Dmitry) Date: Sun, 21 Feb 2010 20:53:44 +0300 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <50b7e5181002210447w3ad00c7dm7e41f3e94b727e88@mail.gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <201002211515.02947.Kalyanov.Dmitry@gmail.com> <50b7e5181002210447w3ad00c7dm7e41f3e94b727e88@mail.gmail.com> Message-ID: <201002212053.50514.Kalyanov.Dmitry@gmail.com> On Sunday 21 February 2010 15:47:49, Maciej Katafiasz wrote: > On Sun, Feb 21, 2010 at 13:14, Kalyanov Dmitry > > wrote: > > On Sunday 21 February 2010 05:24:01, Maciej Katafiasz wrote: > >> Needless to say, this kind of bug makes it rather impossible to do > >> anything. Has anyone else seen anything like that? The test is > >> trivial, just run the gtk-hello example and minimise and restore the > >> window. For me it comes back completely gray and stops responding to > >> anything. The same happens actually any time the window loses focus at > >> all. I'm utterly stumped, as I have no idea how to debug it. It's > >> impossible to touch it from the Lisp side, and trying to attach GDB to > >> SBCL ends with SBCL dying, which doesn't help matters. > > > > I've also encountered similar behaviour (but not hanging) but could not > > yet find its cause. Also similar behavior happens in CCL on Windows. > > Is it reproducible for you? Here it happens every time. I haven't had > the chance to test it on another system yet, so I don't know if it has > something to do with the particulars of my box, or if it happens > always. > > Cheers, > Maciej I've noticed that resizing windows to small sizes makes everything slower and laggy. But simply running gtk-demo:demo and moving/resizing/minimizing/maximizing windows does not hang or crash on any of my systems (x86_64 gentoo sbcl, ccl; x86 ubuntu sbcl, ccl; x86 windows sbcl, ccl). ---- ???????? ??????? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From mathrick at gmail.com Sun Feb 21 18:37:31 2010 From: mathrick at gmail.com (Maciej Katafiasz) Date: Sun, 21 Feb 2010 19:37:31 +0100 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <201002212053.50514.Kalyanov.Dmitry@gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <201002211515.02947.Kalyanov.Dmitry@gmail.com> <50b7e5181002210447w3ad00c7dm7e41f3e94b727e88@mail.gmail.com> <201002212053.50514.Kalyanov.Dmitry@gmail.com> Message-ID: <50b7e5181002211037u411d2f42ld428c2b03315c5e6@mail.gmail.com> On Sun, Feb 21, 2010 at 18:53, Kalyanov Dmitry wrote: >> > I've also encountered similar behaviour (but not hanging) but could not >> > yet find its cause. Also similar behavior happens in CCL on Windows. >> >> Is it reproducible for you? Here it happens every time. I haven't had >> the chance to test it on another system yet, so I don't know if it has >> something to do with the particulars of my box, or if it happens >> always. > > I've noticed that resizing windows to small sizes makes everything slower and > laggy. But simply running gtk-demo:demo and > moving/resizing/minimizing/maximizing windows does not hang or crash on any of > my systems (x86_64 gentoo sbcl, ccl; x86 ubuntu sbcl, ccl; x86 windows sbcl, > ccl). Odd. It's Ubuntu x86 with SBCL here. The same doesn't happen on CLISP. On CCL it dies with another strange error, which I haven't investigated yet. I'm switching to CLISP for now if I succeed with building a threaded image, but I'll try to investigate it when I have some time. It find the non-debuggability of this issue immensely frustrating. Cheers, Maciej From mathrick at gmail.com Mon Feb 22 16:43:52 2010 From: mathrick at gmail.com (Maciej Katafiasz) Date: Mon, 22 Feb 2010 17:43:52 +0100 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <50b7e5181002211037u411d2f42ld428c2b03315c5e6@mail.gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <201002211515.02947.Kalyanov.Dmitry@gmail.com> <50b7e5181002210447w3ad00c7dm7e41f3e94b727e88@mail.gmail.com> <201002212053.50514.Kalyanov.Dmitry@gmail.com> <50b7e5181002211037u411d2f42ld428c2b03315c5e6@mail.gmail.com> Message-ID: <50b7e5181002220843p4a3ccbbif33c3e2b22efd752@mail.gmail.com> On Sun, Feb 21, 2010 at 19:37, Maciej Katafiasz wrote: >> I've noticed that resizing windows to small sizes makes everything slower and >> laggy. But simply running gtk-demo:demo and >> moving/resizing/minimizing/maximizing windows does not hang or crash on any of >> my systems (x86_64 gentoo sbcl, ccl; x86 ubuntu sbcl, ccl; x86 windows sbcl, >> ccl). > > Odd. It's Ubuntu x86 with SBCL here. The same doesn't happen on CLISP. > On CCL it dies with another strange error, which I haven't > investigated yet. I'm switching to CLISP for now if I succeed with > building a threaded image, but I'll try to investigate it when I have > some time. It find the non-debuggability of this issue immensely > frustrating. Okay, I finally managed to get a multithreaded CLISP compiled and running, and it does the exact same thing, every time. So there's got to be a deeper cause, it's not just a random fluke in one implementation. Cheers, Maciej From kalyanov.dmitry at gmail.com Tue Feb 23 19:55:32 2010 From: kalyanov.dmitry at gmail.com (Kalyanov Dmitry) Date: Tue, 23 Feb 2010 22:55:32 +0300 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <50b7e5181002220843p4a3ccbbif33c3e2b22efd752@mail.gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <50b7e5181002211037u411d2f42ld428c2b03315c5e6@mail.gmail.com> <50b7e5181002220843p4a3ccbbif33c3e2b22efd752@mail.gmail.com> Message-ID: <201002232255.35596.Kalyanov.Dmitry@gmail.com> On Monday 22 February 2010 19:43:52, you wrote: > On Sun, Feb 21, 2010 at 19:37, Maciej Katafiasz wrote: > >> I've noticed that resizing windows to small sizes makes everything > >> slower and laggy. But simply running gtk-demo:demo and > >> moving/resizing/minimizing/maximizing windows does not hang or crash on > >> any of my systems (x86_64 gentoo sbcl, ccl; x86 ubuntu sbcl, ccl; x86 > >> windows sbcl, ccl). > > > > Odd. It's Ubuntu x86 with SBCL here. The same doesn't happen on CLISP. > > On CCL it dies with another strange error, which I haven't > > investigated yet. I'm switching to CLISP for now if I succeed with > > building a threaded image, but I'll try to investigate it when I have > > some time. It find the non-debuggability of this issue immensely > > frustrating. > > Okay, I finally managed to get a multithreaded CLISP compiled and > running, and it does the exact same thing, every time. So there's got > to be a deeper cause, it's not just a random fluke in one > implementation. > > Cheers, > Maciej At the moment, you might try running with gobject::*debug-gc* set to T gobject::*debug-subclass* : (asdf:oos 'asdf:load-op :cl-gtk2-gtk) (setf gobject::*debug-gc* t gobject::*debug-subclass* t) (gtk-demo:demo) and see what messages are printed. ---- ???????? ??????? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From mathrick at gmail.com Tue Feb 23 20:25:03 2010 From: mathrick at gmail.com (Maciej Katafiasz) Date: Tue, 23 Feb 2010 21:25:03 +0100 Subject: [cl-gtk2-devel] Odd hangs when resizing In-Reply-To: <201002232255.35596.Kalyanov.Dmitry@gmail.com> References: <50b7e5181002201824i4d93b71bq89aa367043354cbb@mail.gmail.com> <50b7e5181002211037u411d2f42ld428c2b03315c5e6@mail.gmail.com> <50b7e5181002220843p4a3ccbbif33c3e2b22efd752@mail.gmail.com> <201002232255.35596.Kalyanov.Dmitry@gmail.com> Message-ID: <50b7e5181002231225v5dba9e77r990186e4d21f500e@mail.gmail.com> On Tue, Feb 23, 2010 at 20:53, Kalyanov Dmitry wrote: >> Okay, I finally managed to get a multithreaded CLISP compiled and >> running, and it does the exact same thing, every time. So there's got >> to be a deeper cause, it's not just a random fluke in one >> implementation. > > At the moment, you might try running with gobject::*debug-gc* set to T > gobject::*debug-subclass* : > > (asdf:oos 'asdf:load-op :cl-gtk2-gtk) > (setf gobject::*debug-gc* t gobject::*debug-subclass* t) > (gtk-demo:demo) > > and see what messages are printed. Actually, I just found the cause, sort-of. It's because I had accessibility enabled, which creates an extra thread, which then gets stuck somewhere in pthread_cond_wait(). I haven't quite found out why that happens yet, but at least I know where to look. If you want to investigate it further, it'd be awesome. Right now I can't afford spending any more time on it and am happy with just getting it working. Fortunately I don't need a11y for daily work, so I can simply disable it and pretend it doesn't exist for now. Cheers, Maciej