* bug#52414: 29.0.50; delete the process created by make-pipe-process will cause
@ 2021-12-10 13:06 xhcoding
2021-12-11 12:57 ` Eli Zaretskii
2021-12-11 13:35 ` bug#52414: backtrace when emacs get to stuck xhcoding
0 siblings, 2 replies; 6+ messages in thread
From: xhcoding @ 2021-12-10 13:06 UTC (permalink / raw)
To: 52414
[-- Attachment #1: Type: text/plain, Size: 3440 bytes --]
#+being_src elisp
(setq proc (make-pipe-process
:name "test"))
(delete-process proc)
#+end_src
eval the above code cause emacs get to stuck
In GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32)
Repository revision: 67191f7eee3f2a4e83897c3d820f8c13c629dedb
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19043
System Description: Microsoft Windows 10 Home China (v10.0.2009.19043.1348)
Configured using:
'configure --prefix=/d/a/emacs-build/emacs-build/pkg/master-x86_64
CFLAGS=-O2 --with-native-compilation --with-zlib --with-gnutls
--with-xml2 --with-lcms2 --with-json --with-harfbuzz --without-cairo
--with-rsvg --with-png --with-gif --without-tiff --with-jpeg --with-xpm
--disable-build-details --without-dbus --without-compress-install'
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TOOLKIT_SCROLL_BARS WEBP
XPM ZLIB
Important settings:
value of $LANG: CHS
locale-coding-system: cp936
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date seq gv subr-x byte-opt bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils china-util iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process native-compile emacs)
Memory information:
((conses 16 70433 14851)
(symbols 48 6780 1)
(strings 32 21040 2458)
(string-bytes 1 724167)
(vectors 16 15204)
(vector-slots 8 352997 16182)
(floats 8 26 280)
(intervals 56 252 0)
(buffers 992 10))
xhcoding@163.com
[-- Attachment #2: Type: text/html, Size: 5034 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52414: 29.0.50; delete the process created by make-pipe-process will cause
2021-12-10 13:06 bug#52414: 29.0.50; delete the process created by make-pipe-process will cause xhcoding
@ 2021-12-11 12:57 ` Eli Zaretskii
2021-12-11 13:35 ` bug#52414: backtrace when emacs get to stuck xhcoding
1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-11 12:57 UTC (permalink / raw)
To: xhcoding@163.com; +Cc: 52414
> Date: Fri, 10 Dec 2021 21:06:05 +0800
> From: "xhcoding@163.com" <xhcoding@163.com>
>
> (setq proc (make-pipe-process
> :name "test"))
>
> (delete-process proc)
>
> #+end_src
>
> eval the above code cause emacs get to stuck
I cannot reproduce this with today's master branch (but I tried in a
build without native-compilation support, if that matters somehow).
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52414: backtrace when emacs get to stuck
2021-12-10 13:06 bug#52414: 29.0.50; delete the process created by make-pipe-process will cause xhcoding
2021-12-11 12:57 ` Eli Zaretskii
@ 2021-12-11 13:35 ` xhcoding
2021-12-11 15:26 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: xhcoding @ 2021-12-11 13:35 UTC (permalink / raw)
To: 52414
[-- Attachment #1: Type: text/plain, Size: 5945 bytes --]
main thread bt:
#0 0x00007ffc20370764 in ntdll!ZwWaitForAlertByThreadId ()
from C:\Windows\SYSTEM32\ntdll.dll
(gdb) bt
#0 0x00007ffc20370764 in ntdll!ZwWaitForAlertByThreadId ()
from C:\Windows\SYSTEM32\ntdll.dll
#1 0x00007ffc2033379d in ntdll!RtlWaitOnAddress ()
from C:\Windows\SYSTEM32\ntdll.dll
#2 0x00007ffc20333652 in ntdll!RtlWaitOnAddress ()
from C:\Windows\SYSTEM32\ntdll.dll
#3 0x00007ffc2033346d in ntdll!RtlWaitOnAddress ()
from C:\Windows\SYSTEM32\ntdll.dll
#4 0x00007ffc202ffcb4 in ntdll!RtlEnterCriticalSection ()
from C:\Windows\SYSTEM32\ntdll.dll
#5 0x00007ffc202ffae2 in ntdll!RtlEnterCriticalSection ()
from C:\Windows\SYSTEM32\ntdll.dll
#6 0x00007ffc1f7ac6ad in msvcrt!_setmode ()
from C:\Windows\System32\msvcrt.dll
#7 0x00007ffc1f7aaccd in msvcrt!_close () from C:\Windows\System32\msvcrt.dll
#8 0x00007ff7e7bfac26 in sys_close (fd=5) at w32.c:8613
#9 0x00007ff7e7a868ea in posix_close (fd=5, flag=1) at sysdep.c:2439
#10 0x00007ff7e7a86928 in emacs_close (fd=5) at sysdep.c:2457
#11 0x00007ff7e7b741b5 in close_process_fd (fd_addr=0x1cc84de9e24)
at process.c:2040
#12 0x00007ff7e7b785fa in deactivate_process (proc=XIL(0x1cc84de9d55))
at process.c:4704
#13 0x00007ff7e7b7187a in remove_process (proc=XIL(0x1cc84de9d55))
at process.c:954
#14 0x00007ff7e7b7e8cb in status_notify (deleting_process=0x1cc84de9d50,
wait_proc=0x0) at process.c:7558
#15 0x00007ff7e7b71ca1 in Fdelete_process (process=XIL(0x1cc84de9d55))
at process.c:1107
#16 0x00007ff7e7b1ceab in eval_sub (form=XIL(0x1cc87f80c93)) at eval.c:2540
#17 0x00007ff7e7b18656 in Fprogn (body=XIL(0)) at eval.c:466
#18 0x00007ff7e7b1cb0e in eval_sub (form=XIL(0x1cc87f80cc3)) at eval.c:2493
#19 0x00007ff7e7b1c4e4 in Feval (form=XIL(0x1cc87f80cc3), lexical=XIL(0x30))
at eval.c:2369
#20 0x00007ff7e7b1e80a in funcall_subr (subr=0x7ff7e7fa4940 <Seval>,
numargs=2, args=0x300bdfdcd8) at eval.c:3142
#21 0x00007ff7e7b1e40a in Ffuncall (nargs=3, args=0x300bdfdcd0) at eval.c:3065
#22 0x00007ff7e7b6b3e3 in exec_byte_code (bytestr=XIL(0x1cc84052084),
vector=XIL(0x1cc84050f2d), maxdepth=make_fixnum(15),
args_template=make_fixnum(257), nargs=1, args=0x300bdfe1f0)
at bytecode.c:632
#23 0x00007ff7e7b1eabd in fetch_and_exec_byte_code (fun=XIL(0x1cc84050efd),
syms_left=make_fixnum(257), nargs=1, args=0x300bdfe1e8) at eval.c:3189
#24 0x00007ff7e7b1ee34 in funcall_lambda (fun=XIL(0x1cc84050efd), nargs=1,
arg_vector=0x300bdfe1e8) at eval.c:3270
#25 0x00007ff7e7b1e45e in Ffuncall (nargs=2, args=0x300bdfe1e0) at eval.c:3069
#26 0x00007ff7e7b6b3e3 in exec_byte_code (bytestr=XIL(0x1cc840521e4),
vector=XIL(0x1cc84050e9d), maxdepth=make_fixnum(4),
args_template=make_fixnum(257), nargs=1, args=0x300bdfe868)
at bytecode.c:632
#27 0x00007ff7e7b1eabd in fetch_and_exec_byte_code (fun=XIL(0x1cc84050e65),
syms_left=make_fixnum(257), nargs=1, args=0x300bdfe860) at eval.c:3189
#28 0x00007ff7e7b1ee34 in funcall_lambda (fun=XIL(0x1cc84050e65), nargs=1,
arg_vector=0x300bdfe860) at eval.c:3270
#29 0x00007ff7e7b1e45e in Ffuncall (nargs=2, args=0x300bdfe858) at eval.c:3069
#30 0x00007ff7e7b147ac in Ffuncall_interactively (nargs=2, args=0x300bdfe858)
at callint.c:260
#31 0x00007ff7e7b1e714 in funcall_subr (
subr=0x7ff7e7fa4140 <Sfuncall_interactively>, numargs=2,
args=0x300bdfe858) at eval.c:3120
#32 0x00007ff7e7b1e40a in Ffuncall (nargs=3, args=0x300bdfe850) at eval.c:3065
#33 0x00007ff7e7b16c0e in Fcall_interactively (
function=XIL(0xffff81d49bfd6e50), record_flag=XIL(0),
keys=XIL(0x1cc843a6815)) at callint.c:798
#34 0x00007ff7e7b1e83d in funcall_subr (
subr=0x7ff7e7fa4180 <Scall_interactively>, numargs=3, args=0x300bdfeca0)
at eval.c:3145
#35 0x00007ff7e7b1e40a in Ffuncall (nargs=4, args=0x300bdfec98) at eval.c:3065
#36 0x00007ff7e7b6b3e3 in exec_byte_code (bytestr=XIL(0x1cc83dae6a4),
vector=XIL(0x1cc83dae30d), maxdepth=make_fixnum(13),
args_template=make_fixnum(1025), nargs=1, args=0x300bdff210)
at bytecode.c:632
#37 0x00007ff7e7b1eabd in fetch_and_exec_byte_code (fun=XIL(0x1cc83dae2dd),
syms_left=make_fixnum(1025), nargs=1, args=0x300bdff208) at eval.c:3189
#38 0x00007ff7e7b1ee34 in funcall_lambda (fun=XIL(0x1cc83dae2dd), nargs=1,
arg_vector=0x300bdff208) at eval.c:3270
#39 0x00007ff7e7b1e45e in Ffuncall (nargs=2, args=0x300bdff200) at eval.c:3069
#40 0x00007ff7e7b1dd50 in call1 (fn=XIL(0x4680), arg1=XIL(0xffff81d49bfd6e50))
at eval.c:2925
#41 0x00007ff7e7a62f84 in command_loop_1 () at keyboard.c:1506
#42 0x00007ff7e7b1a730 in internal_condition_case (
bfun=0x7ff7e7a62636 <command_loop_1>, handlers=XIL(0x90),
hfun=0x7ff7e7a61af6 <cmd_error>) at eval.c:1492
#43 0x00007ff7e7a62294 in command_loop_2 (handlers=XIL(0x90))
at keyboard.c:1134
#44 0x00007ff7e7b19e57 in internal_catch (tag=XIL(0xf930),
test thread bt:
#1 0x00007ffc1da1aeb3 in ReadFile () from C:\Windows\System32\KernelBase.dll
#2 0x00007ffc1f7ae84a in msvcrt!_read () from C:\Windows\System32\msvcrt.dll
#3 0x00007ffc1f7ae52b in msvcrt!_read () from C:\Windows\System32\msvcrt.dll
#4 0x00007ff7e7bfb050 in _sys_read_ahead (fd=5) at w32.c:8750
#5 0x00007ff7e7c068b5 in reader_thread (arg=0x7ff7e80abb60 <child_procs>)
at w32proc.c:1228
#6 0x00007ffc1e9b7034 in KERNEL32!BaseThreadInitThunk ()
from C:\Windows\System32\kernel32.dll
#7 0x00007ffc20322651 in ntdll!RtlUserThreadStart ()
from C:\Windows\SYSTEM32\ntdll.dll
#8 0x0000000000000000 in ?? ()
func=0x7ff7e7a6226b <command_loop_2>, arg=XIL(0x90)) at eval.c:1223
#45 0x00007ff7e7a621f3 in command_loop () at keyboard.c:1112
#46 0x00007ff7e7a6167c in recursive_edit_1 () at keyboard.c:721
#47 0x00007ff7e7a61834 in Frecursive_edit () at keyboard.c:804
#48 0x00007ff7e7a5deb5 in main (argc=2, argv=0x1cc823569f0) at emacs.c:2409
[-- Attachment #2: Type: text/html, Size: 7839 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52414: backtrace when emacs get to stuck
2021-12-11 13:35 ` bug#52414: backtrace when emacs get to stuck xhcoding
@ 2021-12-11 15:26 ` Eli Zaretskii
2021-12-11 18:18 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-11 15:26 UTC (permalink / raw)
To: xhcoding@163.com; +Cc: 52414
> Date: Sat, 11 Dec 2021 21:35:19 +0800
> From: "xhcoding@163.com" <xhcoding@163.com>
>
> main thread bt:
>
> #0 0x00007ffc20370764 in ntdll!ZwWaitForAlertByThreadId ()
> from C:\Windows\SYSTEM32\ntdll.dll
> (gdb) bt
> #0 0x00007ffc20370764 in ntdll!ZwWaitForAlertByThreadId ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #1 0x00007ffc2033379d in ntdll!RtlWaitOnAddress ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #2 0x00007ffc20333652 in ntdll!RtlWaitOnAddress ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #3 0x00007ffc2033346d in ntdll!RtlWaitOnAddress ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #4 0x00007ffc202ffcb4 in ntdll!RtlEnterCriticalSection ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #5 0x00007ffc202ffae2 in ntdll!RtlEnterCriticalSection ()
> from C:\Windows\SYSTEM32\ntdll.dll
> #6 0x00007ffc1f7ac6ad in msvcrt!_setmode ()
> from C:\Windows\System32\msvcrt.dll
> #7 0x00007ffc1f7aaccd in msvcrt!_close () from C:\Windows\System32\msvcrt.dll
> #8 0x00007ff7e7bfac26 in sys_close (fd=5) at w32.c:8613
> #9 0x00007ff7e7a868ea in posix_close (fd=5, flag=1) at sysdep.c:2439
> #10 0x00007ff7e7a86928 in emacs_close (fd=5) at sysdep.c:2457
> #11 0x00007ff7e7b741b5 in close_process_fd (fd_addr=0x1cc84de9e24)
> at process.c:2040
Thanks. We are trying to close a handle on which the reader thread
already started reading, so the OS doesn't let us delete it.
This whole pipe-process stuff is flaky on MS-Windows. Patches to fix
it are welcome.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52414: backtrace when emacs get to stuck
2021-12-11 15:26 ` Eli Zaretskii
@ 2021-12-11 18:18 ` Eli Zaretskii
[not found] ` <202112120931422260143@163.com>
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-11 18:18 UTC (permalink / raw)
To: xhcoding; +Cc: 52414
> Date: Sat, 11 Dec 2021 17:26:42 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 52414@debbugs.gnu.org
>
> Thanks. We are trying to close a handle on which the reader thread
> already started reading, so the OS doesn't let us delete it.
>
> This whole pipe-process stuff is flaky on MS-Windows. Patches to fix
> it are welcome.
I installed on the master branch a fix which hopefully won't break
anything. Please see if it fixes your problem.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52414: backtrace when emacs get to stuck
[not found] ` <202112120931422260143@163.com>
@ 2021-12-12 6:52 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-12 6:52 UTC (permalink / raw)
To: xhcoding@163.com; +Cc: 52414-done
> Date: Sun, 12 Dec 2021 09:31:42 +0800
> From: "xhcoding@163.com" <xhcoding@163.com>
>
> The patch (rev: a81669c69fda1a2d0d4238b8440145fb2aeb959f) fix my problem. Thank you very much.
Thanks, I'm therefore closing this bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-12 6:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 13:06 bug#52414: 29.0.50; delete the process created by make-pipe-process will cause xhcoding
2021-12-11 12:57 ` Eli Zaretskii
2021-12-11 13:35 ` bug#52414: backtrace when emacs get to stuck xhcoding
2021-12-11 15:26 ` Eli Zaretskii
2021-12-11 18:18 ` Eli Zaretskii
[not found] ` <202112120931422260143@163.com>
2021-12-12 6:52 ` Eli Zaretskii
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.