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

JTK <[email protected]> Mon, 23 Apr 2012 18:08:51 -1000
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
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?

For the moment, I've tried putting an sbcl WITH-DEADLINE around it, but it seems like a potentially dangerous
kludge.

Thanks,

J.T.Klein