Re: clsql + mysql on sbcl - no Control-C; lisp freezing, but reviving when connection killed

Nathan Bird <[email protected]> Thu, 26 Apr 2012 11:02:33 -0400
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
On Tue 24 Apr 2012 12:08:51 AM EDT, JTK wrote:
>
> Software: clsql-5.1.3, sbcl 1.0.42  running in Slime on Linux
>
> I know that these are slightly old versions but they are part of a big system that can't be
> modified much without endangering other things.
>
> First, I noticed that when a clsql query is running, I can't do a Control-C in emacs/Slime.
> It seems that without-interrupts is used only twice in db-mysql/mysql-sql.lisp, in
> database-sequence-next and database-sequence-last, so I don't see why this would happen.
> Does the mysql library do its own without-interrupts?
>
>
> Next, and more important, I find the following
>
>   - I'm running a lisp routine that does a large number of fairly short set of queries.  It mostly works
>     for many queries.
>
>   - After a long run time, nothing happens in lisp - it just hangs.  For reason above, I can't Control-C
>      to see where the hang is.
>
>   - mysql "show processlist;"  shows a process with INFO=NULL (ie, a connection not doing anything).
>
>   - if I kill this NULL mysql connection inside mysql, my lisp process revives, and begins processing
>     subsequent database queries
>
>
> Does anyone understand what might be happening?
>


Yes, it is because the mysql library blocks  SIGPIPE conflicting with 
SBCL's handlers. Discussed more at 
http://lists.b9.com/pipermail/clsql/2012-April/002059.html.

This message is just so that people browsing the archives later in 
threaded mode find that other discussion which has more detail-- and 
we're even trying to fix it!