all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Richard Kim <emacs18@gmail.com>
Cc: 60872@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#60872: 29.0.60; emacsql broken after Jan 12 change
Date: Tue, 17 Jan 2023 11:02:29 +0100	[thread overview]
Message-ID: <87mt6hcwcq.fsf@gmail.com> (raw)
In-Reply-To: <874jspwyrr.fsf@gmail.com> (Richard Kim's message of "Mon, 16 Jan 2023 20:50:00 -0800")

>>>>> On Mon, 16 Jan 2023 20:50:00 -0800, Richard Kim <emacs18@gmail.com> said:

    Richard> On Jan 12 Eli checked in cfd2b3504ab on emacs-29 branch on Jan 12 which seemed to have broken emacssql used by org-roam package. Following is the stack trace I get using emacs-29 built after cfd2b3504ab was checked in.

    Richard> ,----
    Richard> | Debugger entered--Lisp error: (error "Selecting deleted buffer")
    Richard> |   #f(compiled-function (connection) "Return true if the end of the buffer has a properly-formatted prompt." #<bytecode 0x192bbe2fe99c5127>)(#<emacsql-sqlite-connection emacsql-sqlite-connection-15656bd9678a>)
    Richard> |   apply(#f(compiled-function (connection) "Return true if the end of the buffer has a properly-formatted prompt." #<bytecode 0x192bbe2fe99c5127>) #<emacsql-sqlite-connection emacsql-sqlite-connection-15656bd9678a> nil)

I can reproduce this, itʼs because the sqlite process is dying
almost straight away in emacsql-sqlite.el:

    (cl-defmethod initialize-instance :after
      ((connection emacsql-sqlite-connection) &rest _rest)
      (emacsql-sqlite-ensure-binary)
      (let* ((process-connection-type nil)  ; use a pipe
             (coding-system-for-write 'utf-8-auto)
             (coding-system-for-read 'utf-8-auto)
             (file (slot-value connection 'file))
             (buffer (generate-new-buffer " *emacsql-sqlite*"))
             (fullfile (if file (expand-file-name file) ":memory:"))
             (process (start-process  <== dies
                       "emacsql-sqlite" buffer emacsql-sqlite-executable fullfile)))
        (setf (slot-value connection 'process) process)
        (setf (process-sentinel process)
              (lambda (proc _) (kill-buffer (process-buffer proc))))
        (emacsql-wait connection)
        (emacsql connection [:pragma (= busy-timeout $s1)]
                 (/ (* emacsql-global-timeout 1000) 2))
        (emacsql-register connection)))

If I use

             (coding-system-for-read 'utf-8)

instead it all works fine.

Eli, what debug would you like? If I donʼt kill the " *emacsql-sqlite*"
buffer it contains

--begin--
((150))
success
#
()
success
#
error 1 "middleware parsing error"
--end--

Robert
-- 





  reply	other threads:[~2023-01-17 10:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17  4:50 bug#60872: 29.0.60; emacsql broken after Jan 12 change Richard Kim
2023-01-17 10:02 ` Robert Pluim [this message]
2023-01-17 12:45   ` Eli Zaretskii
2023-01-17 13:10     ` Robert Pluim
2023-01-17 13:38       ` Robert Pluim
2023-01-17 13:58       ` Eli Zaretskii
2023-01-17 14:42         ` Robert Pluim
2023-01-17 14:54           ` Eli Zaretskii
     [not found]             ` <878ri13xt1.fsf@bernoul.li>
2023-01-17 17:35               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt6hcwcq.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=60872@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs18@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.