On Sun, 26 May 2024 18:02:54 -0400, Ken Brown via Cygwin
> On 5/26/2024 12:11 AM, Lemures Lemniscati via Cygwin wrote:
> > But, now, asy hangs after outputting a pdf.
> >
> > How to reproduce:
> >
> > 1. Prepare test.asy:
> >
> > // test.asy
> > dot((0,0));
> > // test.asy
> >
> > 2. `asy -vv test.asy` will successfully write test.eps.
> >
> > 3. But, `asy -vv -f pdf test.asy` will hang after gs produces test.pdf...
> Sorry, I can't reproduce this on my system.  Can you attach gdb to the 
> hanging process to see where the hang occurs?

Here is a log from gdb. Will it help?
 info threads
 info stack

$ HOME=/tmp gdb --args asy -vv -f pdf test
GNU gdb (GDB) (Cygwin 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from asy...
Reading symbols from /usr/lib/debug//usr/bin/asy.exe.dbg...
(gdb) run
Starting program: /usr/bin/asy -vv -f pdf test
[New Thread 10728.0xa9c]
[New Thread 10728.0x3ed0]
[New Thread 10728.0xbd0]
[New Thread 10728.0x4c0c]
[New Thread 10728.0x2434]
[New Thread 10728.0x29d0]
[New Thread 10728.0x4ec8]
[New Thread 10728.0x2cfc]
[New Thread 10728.0x47bc]
[New Thread 10728.0x22d0]
[New Thread 10728.0x4268]
[New Thread 10728.0x2f94]
Using configuration directory /tmp/.asy
Using history /tmp/.asy/history
Welcome to Asymptote version 2.88
cd /tmp
Processing test
Loading plain from /usr/share/asymptote/plain.asy
Including plain_constants from /usr/share/asymptote/plain_constants.asy
Loading version from /usr/share/asymptote/version.asy
Including plain_strings from /usr/share/asymptote/plain_strings.asy
Including plain_pens from /usr/share/asymptote/plain_pens.asy
Including plain_paths from /usr/share/asymptote/plain_paths.asy
Including plain_filldraw from /usr/share/asymptote/plain_filldraw.asy
Including plain_margins from /usr/share/asymptote/plain_margins.asy
Including plain_picture from /usr/share/asymptote/plain_picture.asy
Loading plain_scaling from /usr/share/asymptote/plain_scaling.asy
Loading simplex from /usr/share/asymptote/simplex.asy
Loading plain_bounds from /usr/share/asymptote/plain_bounds.asy
Including plain_scaling from /usr/share/asymptote/plain_scaling.asy
Including plain_prethree from /usr/share/asymptote/plain_prethree.asy
Including plain_Label from /usr/share/asymptote/plain_Label.asy
Including plain_arcs from /usr/share/asymptote/plain_arcs.asy
Including plain_boxes from /usr/share/asymptote/plain_boxes.asy
Including plain_shipout from /usr/share/asymptote/plain_shipout.asy
Including plain_markers from /usr/share/asymptote/plain_markers.asy
Including plain_arrows from /usr/share/asymptote/plain_arrows.asy
Including plain_debugger from /usr/share/asymptote/plain_debugger.asy
Loading test from test.asy
-dEPSCrop -dSubsetFonts=true -dEmbedAllFonts=true -dMaxSubsetPct=100 
-dEncodeColorImages=true -dEncodeGrayImages=true -dCompatibilityLevel=1.5 
-dTransferFunctionInfo=/Apply -dAutoRotatePages=/None -g612x792 
-dDEVICEWIDTHPOINTS=3 -dDEVICEHEIGHTPOINTS=3 -sOutputFile=test.pdf -c .setsafe 
-f test_.eps
[Thread 10728.0x2434 exited with code 0]
[New Thread 10728.0x43cc]

Thread 5 "sig" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 10728.0x4c0c]
0x00007ffd8487d313 in KERNELBASE!DebugBreak () from 
(gdb) info threads
  Id   Target Id                      Frame
  1    Thread 10728.0x57c8 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  2    Thread 10728.0xa9c             0x00007ffd871b35a4 in 
ntdll!ZwWaitForWorkViaWorkerFactory () from 
  3    Thread 10728.0x3ed0            0x00007ffd871b35a4 in 
ntdll!ZwWaitForWorkViaWorkerFactory () from 
  4    Thread 10728.0xbd0             0x00007ffd871b35a4 in 
ntdll!ZwWaitForWorkViaWorkerFactory () from 
* 5    Thread 10728.0x4c0c "sig"      0x00007ffd8487d313 in 
KERNELBASE!DebugBreak () from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
  7    Thread 10728.0x29d0 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  8    Thread 10728.0x4ec8 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  9    Thread 10728.0x2cfc "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  10   Thread 10728.0x47bc "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  11   Thread 10728.0x22d0 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  12   Thread 10728.0x4268 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  13   Thread 10728.0x2f94 "asy"      0x00007ffd871b04a4 in 
ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
  14   Thread 10728.0x43cc "waitproc" 0x00007ffd871af9d4 in 
ntdll!ZwWaitForSingleObject () from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
(gdb) info stack
#0  0x00007ffd8487d313 in KERNELBASE!DebugBreak () from 
#1  0x00007ffd527f6367 in break_here () at 
#2  0x00007ffd52810349 in try_to_debug () at 
#3  exception::handle (e=0x28bc6f0, frame=<optimized out>, in=0x28bc200, 
dispatch=<optimized out>)
    at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/exceptions.cc:810
#4  0x00007ffd871b49ff in ntdll!.chkstk () from 
#5  0x00007ffd8712e466 in ntdll!RtlFindCharInUnicodeString () from 
#6  0x00007ffd871b39ee in ntdll!KiUserExceptionDispatcher () from 
#7  0x00007ffd5291bdd4 in init_cygheap::find_tls (this=0x800000000, sig=20, 
issig_wait=@0x28bca3f: false)
    at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/mm/cygheap.cc:743
#8  0x00007ffd528116c6 in sigpacket::process (this=this@entry=0x7ffd52a08500 
    at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/exceptions.cc:1496
#9  0x00007ffd5286a9dc in wait_sig () at 
#10 0x00007ffd527f4d5f in cygthread::callfunc (this=this@entry=0x7ffd529e5560 
<threads>, issimplestub=issimplestub@entry=false)
    at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygthread.cc:48
#11 0x00007ffd527f5270 in cygthread::stub (arg=arg@entry=0x7ffd529e5560 
<threads>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygthread.cc:91
#12 0x00007ffd527f5e08 in _cygtls::call2 (this=0x28bce00, func=0x7ffd527f51ea 
<cygthread::stub(void*)>, arg=0x7ffd529e5560 <threads>,
    buf=buf@entry=0x28bcd20) at 
#13 0x00007ffd527f5e86 in _cygtls::call (func=<optimized out>, arg=<optimized 
out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28
#14 0x00007ffd8639257d in KERNEL32!BaseThreadInitThunk () from 
#15 0x00007ffd8716aa48 in ntdll!RtlUserThreadStart () from 
#16 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) list
234         pthread_join(gl::mainthread,NULL);
235     #endif
236       }
237     #endif
238     #endif
239       exit(returnCode());
240     }
242     void exitHandler(int)
243     {
(gdb) quit
A debugging session is active.

        Inferior 1 [process 10728] will be killed.

Quit anyway? (y or n) y

Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to