From unknown Fri Jun 13 11:03:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62590: Strange put-char encoding-error "conversion to port encoding failed" Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 01 Apr 2023 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 62590@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168034938925285 (code B ref -1); Sat, 01 Apr 2023 11:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2023 11:43:09 +0000 Received: from localhost ([127.0.0.1]:35633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piZdV-0006Zl-3G for submit@debbugs.gnu.org; Sat, 01 Apr 2023 07:43:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:59588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piZdT-0006Zd-AH for submit@debbugs.gnu.org; Sat, 01 Apr 2023 07:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piZdS-0004Kv-Cf for bug-guile@gnu.org; Sat, 01 Apr 2023 07:43:06 -0400 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piZdQ-0007aK-LA for bug-guile@gnu.org; Sat, 01 Apr 2023 07:43:05 -0400 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 081EA16E4F for ; Sat, 1 Apr 2023 12:43:02 +0100 (BST) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 0a5a1b47 for ; Sat, 1 Apr 2023 11:42:59 +0000 (UTC) User-agent: mu4e 1.8.13; emacs 28.2 From: Christopher Baines Date: Sat, 01 Apr 2023 12:37:16 +0100 Message-ID: <87cz4nn7zw.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hey, I've been seeing some strange occasional errors for a while now. Here are some log messages from the guix-build-coordinator: worker-thread: exception: (encoding-error put-char conversion to port encoding failed 84 # s) encoding-error (put-char conversion to port encoding failed 84 # s) encoding-error (put-char conversion to port encoding failed 84 # w) encoding-error (put-char conversion to port encoding failed 84 # 2 encoding-error (put-char conversion to port encoding fencoding-error (put-char conversion to port encoding failed 84 # w) encoding-error (put-char conversion to port encoding failed 84 # w) 2022-10-02 17:23:38 (ERROR): error running build-success hook: encoding-error (put-char conversion to port encoding failed 84 # B) Throw to key `encoding-error' with args `("put-char" "conversion to port encoding failed" 84 # #\p)'. 2022-10-02 21:21:37 (ERROR): error running build-success hook: misc-error (#f ~A (error: command failed (1): (/gnu/store/6 Throw to key `encoding-error' with args `("put-char" "conversion to port encoding failed" 84 # #\space)'. Throw to key `encoding-error' with args `("put-char" "conversion to port encoding failed" 84 # #\2)'. I'm not sure what the 84 means? If I'm picking out the characters that have failed to be encoded, I'm not sure why some of these would fail (like space or w)? Unfortunately I'm not sure how to reproduce this. Suspendable ports might be a factor here as that is probably in use. From unknown Fri Jun 13 11:03:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62590: Strange put-char encoding-error "conversion to port encoding failed" References: <87cz4nn7zw.fsf@cbaines.net> In-Reply-To: <87cz4nn7zw.fsf@cbaines.net> Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 21 Jan 2024 04:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 62590@debbugs.gnu.org Cc: Christopher Baines Received: via spool by 62590-submit@debbugs.gnu.org id=B62590.170580968910745 (code B ref 62590); Sun, 21 Jan 2024 04:02:01 +0000 Received: (at 62590) by debbugs.gnu.org; 21 Jan 2024 04:01:29 +0000 Received: from localhost ([127.0.0.1]:36268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRP1V-0002nF-9R for submit@debbugs.gnu.org; Sat, 20 Jan 2024 23:01:29 -0500 Received: from sail-ipv4.us-core.com ([208.82.101.137]:42638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRP1T-0002n5-57 for 62590@debbugs.gnu.org; Sat, 20 Jan 2024 23:01:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=mUoVyaALcYUuphb HY28u6EaD8attYVwfYe9cR/0nYbY=; h=date:subject:cc:to:from; d=lease-up.com; b=l7/97WfyYrt0NYkXbLKs2glc6F4qUMBx7sF0QQvN8mqh1jlL/hSq uVzC2FaRSOBBWJNVkeRTtx8aX1XTEZ4Rzro0H/rPF7X87NUFWBbJxVJcwPUW7vg2HCu1dJ xHxRgnZfz5fO2RW/kA0ebn+MK/t1KnHTW4t12oKTGrPfprsDU= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 41d181e9 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 21 Jan 2024 04:01:23 +0000 (UTC) From: Felix Lechner Date: Sat, 20 Jan 2024 20:01:22 -0800 Message-ID: <87zfwzxrl9.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, > (encoding-error put-char conversion to port encoding failed 84 > # s) Could the error be due to the 7-bit encoding in HTTP headers? [1] The "84" is EILSEQ from errno.h. [2] Wingo added the functionality here. [3] I also submitted a patch to resolve in the errno. [4] A similar issue appeared in Guix's Cuirass. [5] Kind regards Felix [1] https://lists.gnu.org/archive/html/guile-user/2020-09/msg00015.html [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/errno.h#n67 [3] https://git.savannah.gnu.org/cgit/guile.git/commit/?id=43b6feeb1adafe54170304e7cc3c29a15c1d3808 [4] https://debbugs.gnu.org/68624 [5] https://debbugs.gnu.org/59510 From unknown Fri Jun 13 11:03:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62590: Strange put-char encoding-error "conversion to port encoding failed" Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 11 Feb 2025 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 62590@debbugs.gnu.org Received: via spool by 62590-submit@debbugs.gnu.org id=B62590.17392985923709 (code B ref 62590); Tue, 11 Feb 2025 18:30:02 +0000 Received: (at 62590) by debbugs.gnu.org; 11 Feb 2025 18:29:52 +0000 Received: from localhost ([127.0.0.1]:58564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thv15-0000xl-ID for submit@debbugs.gnu.org; Tue, 11 Feb 2025 13:29:51 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:56731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thv12-0000xZ-9D for 62590@debbugs.gnu.org; Tue, 11 Feb 2025 13:29:49 -0500 Received: from localhost (unknown [IPv6:2a02:6b67:e390:8b00::1ce5]) by mira.cbaines.net (Postfix) with ESMTPSA id BF9C627BBE2 for <62590@debbugs.gnu.org>; Tue, 11 Feb 2025 18:29:46 +0000 (GMT) Received: from fang (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id de8fb267 for <62590@debbugs.gnu.org>; Tue, 11 Feb 2025 18:29:45 +0000 (UTC) From: Christopher Baines In-Reply-To: <87cz4nn7zw.fsf@cbaines.net> (Christopher Baines's message of "Sat, 01 Apr 2023 12:37:16 +0100") References: <87cz4nn7zw.fsf@cbaines.net> Date: Tue, 11 Feb 2025 18:29:43 +0000 Message-ID: <8734gkl4h4.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christopher Baines writes: > I've been seeing some strange occasional errors for a while now. ... > I'm not sure what the 84 means? If I'm picking out the characters that > have failed to be encoded, I'm not sure why some of these would fail > (like space or w)? > > Unfortunately I'm not sure how to reproduce this. Suspendable ports > might be a factor here as that is probably in use. Still seeing these errors, including today. I've managed to stumble on a reliable and somewhat minimal way of reproducing them: /gnu/store/lnlw64i4k06yphjbyr3ciy07mz9snlwg-guile-next-3.0.10-0.5d3f561/b= in/guile put-char-exn.scm > /dev/null The output is somewhat variable, but on my system within a few seconds it will output something like: current-output-port: # (encoding: UTF-8) In ice-9/boot-9.scm: 1762:12 17 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In unknown file: 16 (apply-smob/0 #) In ice-9/threads.scm: 165:20 15 (_) In unknown file: 14 (call-with-unblocked-asyncs #) In ice-9/boot-9.scm: 1756:15 13 (with-exception-handler # =E2=80=A6) 1762:12 12 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 2217:5 11 (%start-stack thread _) 2219:9 10 (_) 1762:12 9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In /home/chris/Projects/Guile/guile/put-char-exn.scm: 43:12 8 (_) In unknown file: 7 (simple-format # "exception: ~A\n" #<&compound= -excep=E2=80=A6>) In ice-9/boot-9.scm: 1058:8 6 (default-record-printer #<&compound-exception components: (#<&= exter=E2=80=A6> =E2=80=A6) In unknown file: 5 (write (#<&external-error> #<&origin origin: "fport_write"> #<= &m=E2=80=A6> =E2=80=A6) =E2=80=A6) In ice-9/boot-9.scm: 1050:4 4 (default-record-printer #<&origin origin: "fport_write"> #) In unknown file: 3 (display &origin #) In ice-9/boot-9.scm: 1683:22 2 (raise-exception _ #:continuable? _) In /home/chris/Projects/Guile/guile/put-char-exn.scm: 29:25 1 (_ #<&compound-exception components: (#<&error> #<&origin orig= in: "p=E2=80=A6>) In unknown file: 0 (make-stack #t) ERROR: In procedure display: ERROR: 1. &error 2. &origin: "put-char" 3. &message: "conversion to port encoding failed" 4. &irritants: 84 5. &exception-with-kind-and-args: kind: encoding-error args: ("put-char" "conversion to port encoding failed" 84 # #\&) put-char-exn.scm: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=put-char-exn.scm Content-Description: put-char-exn.scm (use-modules (ice-9 suspendable-ports) (ice-9 binary-ports) (rnrs bytevectors) (ice-9 exceptions) (ice-9 threads) (system repl debug)) (install-suspendable-ports!) (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) (define s (socket PF_UNIX (logior SOCK_STREAM SOCK_CLOEXEC SOCK_NONBLOCK) 0)) (simple-format (current-error-port) "current-output-port: ~A (encoding: ~A)\n\n" (current-output-port) (port-encoding (current-output-port))) (for-each (lambda (i) (call-with-new-thread (lambda () (with-exception-handler (lambda (exn) (let ((stack (make-stack #t))) (print-frames (stack->vector stack) (current-error-port) #:count (stack-length stack)) (print-exception (current-error-port) (stack-ref stack 3) '%exception (list exn))) (force-output (current-error-port)) (primitive-exit 1)) (lambda () (while #t (with-exception-handler (lambda (exn) (simple-format (current-output-port) "exception: ~A\n" exn)) (lambda () (with-throw-handler #t (lambda () (put-bytevector s (string->utf8 "foo"))) (lambda (key . args) (let* ((stack (make-stack #t 3)) (backtrace (call-with-output-string (lambda (port) (display-backtrace stack port) (newline port))))) (display backtrace (current-output-port)))))) #:unwind? #t))))))) (iota 2)) (sleep 60) --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmerlxdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdzxQ/+MtlQYA16aqOLEszy2TbP6JYsw/PoTA3h 4vxiQOjUTHW4E3Gi5gS8dTXJ2za41vthBI/Z9iDFWoYhk4o2Vl82pj9kEcTfpEEd QZQ9cXgHAM0RfaO+jWnJMhyLnZs1ZsOL3lEcRKr0GKd0mDAn2jiyBfUGKwg3DyVN ZJbFgX2HtPAuRPYiaTOI1gxHS/fiXQqF1gLXh57hp8g3RjBJzlNANKtdkBFO/v73 NFNvbToS9ZLhrlxtc1tdye0jI0aX8MDU4XApuR85RY1a6khkKL1RHGFikHn7YBnS g1z24Uav/0F/1j0Z+osSWzbWEPoKvN0fPrhF34g/zaoFw7KgRnh3I51psChLuLjy 9JFPbAxe1PG8D/tZjz7fDlPD+914BI1Ge0qVgQcpwos7v3gPvUMJKidgJZFLjfYz 1QTzEnqasixJnTCMi8YN1sLDVfpvHo5JxigMv4euogtJ73MzmeSaru4/06akotjD xThGHJRkwzaV+LkqbG1OyQD618ty4OGbYyvXky0va7dr5scE/oVrGn9DnucZl9Gm igMFemFMKyugmY+zXtfVyfNWjZdXaqHIBXMD9TYribatfi4qehk+OPIXA3C/0niA bA00yNZbzQgmL/4n8B3t+jRHgMeasa8bFXPxMSupRTkB4VJ3bBxQhwdYr4WS0D+5 kJ6f+C2qTpg= =GMSO -----END PGP SIGNATURE----- --==-=-=-- From unknown Fri Jun 13 11:03:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62590: Strange put-char encoding-error "conversion to port encoding failed" Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 11 Feb 2025 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 62590@debbugs.gnu.org Received: via spool by 62590-submit@debbugs.gnu.org id=B62590.173930081410666 (code B ref 62590); Tue, 11 Feb 2025 19:07:02 +0000 Received: (at 62590) by debbugs.gnu.org; 11 Feb 2025 19:06:54 +0000 Received: from localhost ([127.0.0.1]:58614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thvav-0002lw-R0 for submit@debbugs.gnu.org; Tue, 11 Feb 2025 14:06:54 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:55477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thvas-0002lf-4S for 62590@debbugs.gnu.org; Tue, 11 Feb 2025 14:06:51 -0500 Received: from localhost (unknown [IPv6:2a02:6b67:e390:8b00::1ce5]) by mira.cbaines.net (Postfix) with ESMTPSA id BE54227BBE2 for <62590@debbugs.gnu.org>; Tue, 11 Feb 2025 19:06:46 +0000 (GMT) Received: from fang (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 584f66c8 for <62590@debbugs.gnu.org>; Tue, 11 Feb 2025 19:06:46 +0000 (UTC) From: Christopher Baines In-Reply-To: <8734gkl4h4.fsf@cbaines.net> (Christopher Baines's message of "Tue, 11 Feb 2025 18:29:43 +0000") References: <87cz4nn7zw.fsf@cbaines.net> <8734gkl4h4.fsf@cbaines.net> Date: Tue, 11 Feb 2025 19:06:46 +0000 Message-ID: <87y0ycjo6x.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Christopher Baines writes: > Christopher Baines writes: > >> I've been seeing some strange occasional errors for a while now. > > ... > >> I'm not sure what the 84 means? If I'm picking out the characters that >> have failed to be encoded, I'm not sure why some of these would fail >> (like space or w)? >> >> Unfortunately I'm not sure how to reproduce this. Suspendable ports >> might be a factor here as that is probably in use. > > Still seeing these errors, including today. I've managed to stumble on a > reliable and somewhat minimal way of reproducing them: Here's a slightly simplified version with some comments: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=put-char-exn.scm (use-modules (ice-9 binary-ports) (rnrs bytevectors) (ice-9 exceptions) (ice-9 threads) (system repl debug)) (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) (simple-format (current-error-port) "current-output-port: ~A (encoding: ~A)\n\n" (current-output-port) (port-encoding (current-output-port))) (for-each (lambda (i) (call-with-new-thread (lambda () (with-exception-handler (lambda (exn) (let ((stack (make-stack #t))) (print-frames (stack->vector stack) (current-error-port) #:count (stack-length stack)) (print-exception (current-error-port) (stack-ref stack 3) '%exception (list exn))) (force-output (current-error-port)) (primitive-exit 1)) (lambda () (while #t (with-exception-handler (lambda (exn) ;; The put-char error seems to happen around here (simple-format (current-output-port) "exception: ~A\n" exn) #f) (lambda () (with-throw-handler #t (lambda () ;; Cause some error, I think any error will do (+ 'a 1)) (lambda (key . args) (let* ((stack (make-stack #t 3)) (backtrace (call-with-output-string (lambda (port) (display-backtrace stack port) (newline port))))) (display ;; Printing the backtrace seems significant, ;; other strings don't seem to reproduce the ;; behaviour backtrace (current-output-port)) #f)))) #:unwind? #t))))))) (iota 2)) (sleep 60) --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmern8ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xdi4BAAtY7hLktaWyA0vDzb4SnFTBdHZ4VaweHh wg9q1KpNciI98Nx+uGJVlxIc7nLf1Vwfx15V7PkJvXS5QuoYpgT7m+6+utctFh8r Fknd6iLhnawD2Yea/PqFTQs14tbZAlXKTYNmkv3Pmy/2lSHEHJinmg779tpbBdr5 xbUt+YRg0FBE9NhJ5s3rdyLwrrXTr1+GWEbTa8LrkmwJQglnt5+PQWevy5TLDc4t WlXLN9tUYFOwJFAqcurA4JrbD0S/goYQkdslHdGbIbSx6p+6k4ID2P5dm0jWs4ZJ KgqmrJ2uTjhHYhfxPlfcA6QTyuW828xl112is2aCXNAYahndeMDQFsN9P+RElVH5 naOVkBUT96Ift5q2YTBcBL8Q+MtGp8a6Zea8HgHUxbnWMFLChvsh1hJXPtnww6UZ IZv+U5JScnTMknXKrFZ9OQ4R4iPJ1pZFYKe+1y4kD/ucw/0R2TydwQp2VEpd8BE1 eJhLz2gJ0ErLMcgeySvXrapH39e51x4i7JZ+ymtsTiLpzrF1BJvgBWBka26jpXWj aTMEjBNTbzlI5EPPaB1vbgbkCA2Kh7PJjCeoRi2+fucU9+cBCUGlTFxat1Eyy4Bp h7VCcMVmIGDjcCWSAP2jNfW1fZ/La5prD42/ldKZRj5s+3vvQPe3Cfqe0GL57L0r 8gkGqEbs5Tg= =M4jt -----END PGP SIGNATURE----- --==-=-=-- From unknown Fri Jun 13 11:03:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62590: Strange put-char encoding-error "conversion to port encoding failed" Resent-From: bokr@bokr.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 11 Feb 2025 21:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62590 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Christopher Baines Cc: 62590@debbugs.gnu.org Reply-To: bokr@bokr.com Received: via spool by 62590-submit@debbugs.gnu.org id=B62590.173931096315879 (code B ref 62590); Tue, 11 Feb 2025 21:57:01 +0000 Received: (at 62590) by debbugs.gnu.org; 11 Feb 2025 21:56:03 +0000 Received: from localhost ([127.0.0.1]:59183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thyEc-000483-PZ for submit@debbugs.gnu.org; Tue, 11 Feb 2025 16:56:03 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:42660) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1thyEZ-00047U-Bo for 62590@debbugs.gnu.org; Tue, 11 Feb 2025 16:56:00 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id E013E62383; Tue, 11 Feb 2025 21:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1739310952; bh=iGeajqKjiwBd0YgbEMw6eUhQ3W7DfYIrNDnIMZHs8k0=; h=From:Date:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Zgk9up3LOQp8qzBWqAcN3V9GNweYuAgZcAh3o9BXTHJth1PNROvfomwvhX7vH60pe rsfPvcZfxvIDlQ8ry8j9r4eIKuH3s1iumxes7h5RsSgNHxQ/C8vgEFYO2V9r5aqbN1 M7TMEsUcpA05KGLt8ApOVGA9S/XI2z9WGK+plSLK+7Te8PFrGfgo3pk4yE3fVbQXLM hh1Y26hEKm5rMTugAebeTJ5pCX1PmjE4lH7KSXKQPT8GBHzx7F5umqNTwaUJiZnPbU fYbnhz6YdDZu++7lwLQWlQYnNNdWC0shNg0UvJYGrfzJ97iO4cI6pGaivQlypugcRY jv9EXl/GrDMiQ== X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8nFWnTW7Jt-j; Tue, 11 Feb 2025 21:55:52 +0000 (UTC) Received: from localhost (unknown [50.208.209.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 2C6EA622D4; Tue, 11 Feb 2025 21:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1739310952; bh=iGeajqKjiwBd0YgbEMw6eUhQ3W7DfYIrNDnIMZHs8k0=; h=From:Date:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Zgk9up3LOQp8qzBWqAcN3V9GNweYuAgZcAh3o9BXTHJth1PNROvfomwvhX7vH60pe rsfPvcZfxvIDlQ8ry8j9r4eIKuH3s1iumxes7h5RsSgNHxQ/C8vgEFYO2V9r5aqbN1 M7TMEsUcpA05KGLt8ApOVGA9S/XI2z9WGK+plSLK+7Te8PFrGfgo3pk4yE3fVbQXLM hh1Y26hEKm5rMTugAebeTJ5pCX1PmjE4lH7KSXKQPT8GBHzx7F5umqNTwaUJiZnPbU fYbnhz6YdDZu++7lwLQWlQYnNNdWC0shNg0UvJYGrfzJ97iO4cI6pGaivQlypugcRY jv9EXl/GrDMiQ== From: bokr@bokr.com Date: Tue, 11 Feb 2025 13:55:37 -0800 Message-ID: References: <87cz4nn7zw.fsf@cbaines.net> <8734gkl4h4.fsf@cbaines.net> <87y0ycjo6x.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87y0ycjo6x.fsf@cbaines.net> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I'm wondering what writing the backtrace to a /tmp/file and doing a cat -nA on it would show. (to get the traceback bits presented by independent alternate formatting machinery from what produced what you've seen so far). On +2025-02-11 19:06:46 +0000, Christopher Baines wrote: > Christopher Baines writes: > > > Christopher Baines writes: > > > >> I've been seeing some strange occasional errors for a while now. > > > > ... > > > >> I'm not sure what the 84 means? If I'm picking out the characters that > >> have failed to be encoded, I'm not sure why some of these would fail > >> (like space or w)? > >> > >> Unfortunately I'm not sure how to reproduce this. Suspendable ports > >> might be a factor here as that is probably in use. > > > > Still seeing these errors, including today. I've managed to stumble on a > > reliable and somewhat minimal way of reproducing them: > > Here's a slightly simplified version with some comments: > > (use-modules (ice-9 binary-ports) > (rnrs bytevectors) > (ice-9 exceptions) > (ice-9 threads) > (system repl debug)) > > (setvbuf (current-output-port) 'line) > (setvbuf (current-error-port) 'line) > > (simple-format (current-error-port) > "current-output-port: ~A (encoding: ~A)\n\n" > (current-output-port) > (port-encoding (current-output-port))) > > (for-each > (lambda (i) > (call-with-new-thread > (lambda () > (with-exception-handler > (lambda (exn) > (let ((stack (make-stack #t))) > (print-frames (stack->vector stack) > (current-error-port) > #:count (stack-length stack)) > (print-exception > (current-error-port) > (stack-ref stack 3) > '%exception > (list exn))) > (force-output (current-error-port)) > > (primitive-exit 1)) > (lambda () > (while #t > (with-exception-handler > (lambda (exn) > ;; The put-char error seems to happen around here > (simple-format (current-output-port) > "exception: ~A\n" > exn) > #f) > (lambda () > (with-throw-handler #t > (lambda () > ;; Cause some error, I think any error will do > (+ 'a 1)) > (lambda (key . args) > (let* ((stack (make-stack #t 3)) > (backtrace > (call-with-output-string > (lambda (port) > (display-backtrace stack port) > (newline port))))) > (display > ;; Printing the backtrace seems significant, > ;; other strings don't seem to reproduce the > ;; behaviour > backtrace > (current-output-port)) > #f)))) > #:unwind? #t))))))) > (iota 2)) > > (sleep 60)