Discussion:
Bug#1025049: asymptote: Error in shipout3
(too old to reply)
Picca Frédéric-Emmanuel
2022-11-29 09:10:01 UTC
Permalink
Package: asymptote
Version: 2.83+ds-1+b1
Severity: normal
X-Debbugs-Cc: ***@debian.org

Dear Maintainer,

while working on the hkl package I found that asy doe snot compile anymore my files.

/usr/bin/asy -config "" -d -render=4 -f png -o 3S+1D.png 3S+1D.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b3_y.png B_b3_y.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_a.png B_a.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b.png B_b.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
...

on bullseye, I do not have this issue.

So I attached a file in order to reproduce this error.

Cheers

Frédéric

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-4-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages asymptote depends on:
ii ghostscript 10.0.0~dfsg-7
ii imagemagick 8:6.9.11.60+dfsg-1.3+b4
ii imagemagick-6.q16 [imagemagick] 8:6.9.11.60+dfsg-1.3+b4
ii libboost-filesystem1.74.0 1.74.0-17+b2
ii libc6 2.36-6
ii libcurl3-gnutls 7.86.0-2
ii libfftw3-double3 3.3.8-2
ii libgc1 1:8.2.2-3
ii libgcc-s1 12.2.0-9
ii libgl1 1.5.0-1
ii libglew2.2 2.2.0-4+b1
ii libglut3.12 3.4.0-1
ii libglx0 1.5.0-1
ii libgsl27 2.7.1+dfsg-3+b1
ii libreadline8 8.2-1.2
ii libsigsegv2 2.14-1
ii libstdc++6 12.2.0-9
ii libtinfo6 6.3+20220423-2
ii libtirpc3 1.3.3+ds-1
ii python3 3.10.6-3
ii tex-common 6.18
ii texlive-binaries 2022.20220321.62855-4+b1
ii texlive-latex-base 2022.20221123-1
ii texlive-plain-generic 2022.20221123-1
ii texlive-pstricks 2022.20221123-1
ii xdg-utils 1.1.3-4.1
ii zlib1g 1:1.2.13.dfsg-1

Versions of packages asymptote recommends:
ii asymptote-doc 2.83+ds-1

Versions of packages asymptote suggests:
pn asymptote-x11 <none>

-- no debconf information
Hilmar Preuße
2022-11-29 23:00:01 UTC
Permalink
Am 29.11.2022 um 10:02 teilte Picca Frédéric-Emmanuel mit:

Hi,

sorry I'm failing to reproduce the issue. For me that command line works:

***@sid-amd64:~/devel/TeXLive$ asy -config "" -d -render=4 -f png -o
zzz1.png zzz1.asy
***@sid-amd64:~/devel/TeXLive$ ls -l zzz1.*
-rw-r--r-- 1 hille hille 812 Nov 29 21:55 zzz1.asy
-rw-r--r-- 1 hille hille 16444 Nov 29 23:42 zzz1.eps
-rw-r--r-- 1 hille hille 16663 Nov 29 23:45 zzz1.png

H.
Post by Picca Frédéric-Emmanuel
while working on the hkl package I found that asy doe snot compile anymore my files.
/usr/bin/asy -config "" -d -render=4 -f png -o 3S+1D.png 3S+1D.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b3_y.png B_b3_y.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_a.png B_a.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b.png B_b.asy
shipout3(prefix,f,preview ? nativeformat() : format,
^
--
sigfault
picca
2022-11-30 07:00:01 UTC
Permalink
Hello,

I imagine that the zzz1.asy file is my B_b3_y.asy, right ?

if so, something must be different between your environment and mine.

I use the latest unstable with gostscript 10

and you ?

Is it possible to have a more informative debug message than this one ?
Post by Picca Frédéric-Emmanuel
shipout3(prefix,f,preview ? nativeformat() : format,
^
thanks for your help.

Frederic
Hilmar Preuße
2022-11-30 22:30:01 UTC
Permalink
Am 30.11.2022 um 07:48 teilte picca mit:

Hello,
Post by picca
I imagine that the zzz1.asy file is my B_b3_y.asy, right ?
Yes, correct.
Post by picca
if so, something must be different between your environment and mine.
I use the latest unstable with ghostscript 10
and you ?
Some here. Pure Debian unstable, w/ gs 10 installed.

***@sid-amd64:~$ dpkg -l ghost*
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-=============-============-============================>
ii ghostscript 10.0.0~dfsg-7 amd64 interpreter for the
PostScri>
ii ghostscript-x:amd64 10.0.0~dfsg-7 amd64 interpreter for the
PostScri>
Post by picca
Is it possible to have a more informative debug message than this one ?
Does [1] help you somehow?

H.

[1]
https://tex.stackexchange.com/questions/592394/using-asymptote-for-3d-plots
--
sigfault
Picca Frédéric-Emmanuel
2023-01-20 12:00:01 UTC
Permalink
Package: asymptote
Version: 2.83+ds-1+b1
Followup-For: Bug #1025049
X-Debbugs-Cc: ***@debian.org

Dear Maintainer,

I can reproduce this bug with my sway environement. But If I use a computer withe Debian/sid and grome it works. I am wondering if this is not an issue between wayland and xorg...

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-4-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages asymptote depends on:
ii ghostscript 10.0.0~dfsg-9+b1
ii imagemagick 8:6.9.11.60+dfsg-1.4+b1
ii imagemagick-6.q16 [imagemagick] 8:6.9.11.60+dfsg-1.4+b1
ii libboost-filesystem1.74.0 1.74.0-18.1
ii libc6 2.36-8
ii libcurl3-gnutls 7.87.0-2
ii libfftw3-double3 3.3.10-1
ii libgc1 1:8.2.2-3
ii libgcc-s1 12.2.0-14
ii libgl1 1.6.0-1
ii libglew2.2 2.2.0-4+b1
ii libglut3.12 3.4.0-1
ii libglx0 1.6.0-1
ii libgsl27 2.7.1+dfsg-3+b1
ii libreadline8 8.2-1.3
ii libsigsegv2 2.14-1
ii libstdc++6 12.2.0-14
ii libtinfo6 6.4-1
ii libtirpc3 1.3.3+ds-1
ii python3 3.11.1-1
ii tex-common 6.18
ii texlive-binaries 2022.20220321.62855-5
ii texlive-latex-base 2022.20221123-1
ii texlive-plain-generic 2022.20221123-2
ii texlive-pstricks 2022.20221123-2
ii xdg-utils 1.1.3-4.1
ii zlib1g 1:1.2.13.dfsg-1

Versions of packages asymptote recommends:
ii asymptote-doc 2.83+ds-1

Versions of packages asymptote suggests:
pn asymptote-x11 <none>

-- no debconf information
Picca Frédéric-Emmanuel
2023-01-20 12:10:01 UTC
Permalink
Package: asymptote
Version: 2.83+ds-1+b1
Followup-For: Bug #1025049
X-Debbugs-Cc: ***@debian.org

Dear Maintainer,

Here the backtrace generated after the crash, it seems that there is an Arithmetic Exception.

the gl parameter at line 23 seems strange

#23 0x00005591db410072 in gl::glrender (prefix="", pic=0x2, format=<error: Cannot access memory at address 0x6b636f6c62555047>, width=5.3049894774131808e-315, height=0, angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=...,
t=0x7ffc641f9990, background=0x5591db748b90, nlightsin=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=false, oldpid=0) at ./glrender.cc:2207

here the full stack

Core was generated by `/usr/bin/asy -config -d -render=4 -f png -o 3S+1D.png 3S+1D.asy'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0 0x00007f31c46d42b2 in fs_reg_alloc::set_spill_costs (this=***@entry=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1077
Download failed: Argument invalide. Continuing without source file ./build/../src/intel/compiler/brw_fs_reg_allocate.cpp.
1077 ../src/intel/compiler/brw_fs_reg_allocate.cpp: Aucun fichier ou dossier de ce type.
[Current thread is 1 (Thread 0x7f31ca49de40 (LWP 39687))]
(gdb) bt
#0 0x00007f31c46d42b2 in fs_reg_alloc::set_spill_costs (this=***@entry=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1077
#1 0x00007f31c46d6f14 in fs_reg_alloc::choose_spill_reg (this=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1088
#2 fs_reg_alloc::assign_regs (this=***@entry=0x7ffc641f7f20, allow_spilling=***@entry=true, spill_all=***@entry=false) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1331
#3 0x00007f31c46d725b in fs_visitor::assign_regs (this=***@entry=0x5591dc668370, allow_spilling=***@entry=true, spill_all=***@entry=false) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1381
#4 0x00007f31c469c890 in fs_visitor::allocate_registers (this=0x5591dc668370, allow_spilling=true) at ../src/intel/compiler/brw_fs.cpp:6493
#5 0x00007f31c46a1d13 in fs_visitor::run_cs (this=0x5591dc668370, allow_spilling=<optimized out>) at ../src/intel/compiler/brw_fs.cpp:6942
#6 0x00007f31c46a2057 in brw_compile_cs (compiler=***@entry=0x5591db7fa830, mem_ctx=***@entry=0x5591dd0ffc30, params=***@entry=0x7ffc641f8270) at ../src/intel/compiler/brw_fs.cpp:7748
#7 0x00007f31c4820bb4 in crocus_compile_cs (ice=***@entry=0x5591db767a30, ish=***@entry=0x5591dbf17620, key=***@entry=0x7ffc641f83a0) at ../src/gallium/drivers/crocus/crocus_program.c:2573
#8 0x00007f31c4820f7b in crocus_create_compute_state (ctx=0x5591db767a30, state=<optimized out>) at ../src/gallium/drivers/crocus/crocus_program.c:2936
#9 0x00007f31c3982dea in st_create_nir_shader (st=***@entry=0x5591db83cc40, state=***@entry=0x7ffc641f85e0) at ../src/mesa/state_tracker/st_program.c:559
#10 0x00007f31c398319d in st_create_common_variant (st=***@entry=0x5591db83cc40, prog=***@entry=0x5591dbf3e890, key=***@entry=0x7ffc641f8980) at ../src/mesa/state_tracker/st_program.c:754
#11 0x00007f31c3983a94 in st_get_common_variant (st=***@entry=0x5591db83cc40, prog=***@entry=0x5591dbf3e890, key=***@entry=0x7ffc641f8980) at ../src/mesa/state_tracker/st_program.c:807
#12 0x00007f31c3984082 in st_precompile_shader_variant (prog=0x5591dbf3e890, st=0x5591db83cc40) at ../src/mesa/state_tracker/st_program.c:1273
#13 st_finalize_program (st=0x5591db83cc40, prog=0x5591dbf3e890) at ../src/mesa/state_tracker/st_program.c:1334
#14 0x00007f31c3b40399 in st_link_nir (ctx=0x7f31bc589010, shader_program=<optimized out>) at ../src/mesa/state_tracker/st_glsl_to_nir.cpp:940
#15 0x00007f31c3b3d4e5 in link_shader (prog=<optimized out>, ctx=0x7f31bc589010) at ../src/mesa/state_tracker/st_glsl_to_ir.cpp:97
#16 st_link_shader (ctx=0x7f31bc589010, prog=<optimized out>) at ../src/mesa/state_tracker/st_glsl_to_ir.cpp:112
#17 0x00007f31c3b2bb5c in _mesa_glsl_link_shader (ctx=***@entry=0x7f31bc589010, prog=***@entry=0x5591dbf3e1a0) at ../src/mesa/program/link_program.cpp:91
#18 0x00007f31c3b032bb in link_program (no_error=<optimized out>, shProg=<optimized out>, ctx=<optimized out>) at ../src/mesa/main/shaderapi.c:1332
#19 link_program_error (ctx=0x7f31bc589010, shProg=0x5591dbf3e1a0) at ../src/mesa/main/shaderapi.c:1443
#20 0x00005591db4139e1 in compileAndLinkShader (shaders=std::vector of length 1622480, capacity 1958168 = {...}, defineflags=<error reading variable: Cannot access memory at address 0xa>, ssbo=false, interlock=144, compute=65) at ./shaders.cc:40
#21 0x00005591db40a698 in gl::initComputeShaders () at ./glrender.cc:575
#22 0x00005591db40c33f in gl::initShaders () at ./glrender.cc:640
#23 0x00005591db410072 in gl::glrender (prefix="", pic=0x2, format=<error: Cannot access memory at address 0x6b636f6c62555047>, width=5.3049894774131808e-315, height=0, angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=...,
t=0x7ffc641f9990, background=0x5591db748b90, nlightsin=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=false, oldpid=0) at ./glrender.cc:2207
#24 0x00005591db160a6f in camp::picture::shipout3 (this=0x0, prefix=<error reading variable: Cannot access memory at address 0xa>, format=<error reading variable: Cannot access memory at address 0x3f800008>, width=5.3049894774131808e-315, height=0,
angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=..., t=0x5591db74ebb0, background=0x5591db748b90, nlights=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=true) at ./picture.cc:1480
#25 0x00005591db2b9fd0 in run::gen_runpicture43 (Stack=0x5591db748b90) at ./runpicture.in:487
#26 0x00005591db390b6e in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61fbdb0, vars=0x3f800000, parent=0x9) at ./stack.cc:465
#27 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61ec220, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#28 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61bbe68, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#29 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c620faf0, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#30 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c62142f8, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#31 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c7aadc08, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#32 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c772e5d0, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#33 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c78c2370, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#34 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c6250118, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#35 0x00005591db3bc883 in icore::postRun (s=..., this=<optimized out>) at ./process.cc:199
#36 ifile::postRun (this=0x7ffc64203140, e=..., s=...) at ./process.cc:331
#37 0x00005591db3bdf51 in icore::doRun (this=0x7ffc64203140, purge=2, tm=TRANS_NORMAL) at ./process.cc:226
#38 0x00005591db3bd142 in ifile::process (this=0x7ffc64203140, purge=2) at ./process.cc:347
#39 0x00005591db3bdd37 in processFile (filename="", purge=2) at ./process.cc:846
#40 0x00005591db474bb3 in asymain (A=0x5591dfa54480) at ./main.cc:202
#41 0x00005591db13d205 in main (argc=10, argv=0x7ffc642033e0) at ./main.cc:288
(gdb)

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-4-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages asymptote depends on:
ii ghostscript 10.0.0~dfsg-9+b1
ii imagemagick 8:6.9.11.60+dfsg-1.4+b1
ii imagemagick-6.q16 [imagemagick] 8:6.9.11.60+dfsg-1.4+b1
ii libboost-filesystem1.74.0 1.74.0-18.1
ii libc6 2.36-8
ii libcurl3-gnutls 7.87.0-2
ii libfftw3-double3 3.3.10-1
ii libgc1 1:8.2.2-3
ii libgcc-s1 12.2.0-14
ii libgl1 1.6.0-1
ii libglew2.2 2.2.0-4+b1
ii libglut3.12 3.4.0-1
ii libglx0 1.6.0-1
ii libgsl27 2.7.1+dfsg-3+b1
ii libreadline8 8.2-1.3
ii libsigsegv2 2.14-1
ii libstdc++6 12.2.0-14
ii libtinfo6 6.4-1
ii libtirpc3 1.3.3+ds-1
ii python3 3.11.1-1
ii tex-common 6.18
ii texlive-binaries 2022.20220321.62855-5
ii texlive-latex-base 2022.20221123-1
ii texlive-plain-generic 2022.20221123-2
ii texlive-pstricks 2022.20221123-2
ii xdg-utils 1.1.3-4.1
ii zlib1g 1:1.2.13.dfsg-1

Versions of packages asymptote recommends:
ii asymptote-doc 2.83+ds-1

Versions of packages asymptote suggests:
pn asymptote-x11 <none>

-- no debconf information
Hilmar Preuße
2023-01-20 22:10:02 UTC
Permalink
Am 20.01.2023 um 13:06 teilte Picca Frédéric-Emmanuel mit:

Dear Frédéric,

as I'm not able to reproduce the issue (due to different software
constellation on the Desktop): would you be so kind to forward that
issue to upstream by your own? The upstream tracker is on
https://github.com/vectorgraphics/asymptote/issues

I case of questions regarding the Debian package feel free to contact us.

Many thanks,
Hilmar
Post by Picca Frédéric-Emmanuel
Here the backtrace generated after the crash, it seems that there is an Arithmetic Exception.
the gl parameter at line 23 seems strange
#23 0x00005591db410072 in gl::glrender (prefix="", pic=0x2, format=<error: Cannot access memory at address 0x6b636f6c62555047>, width=5.3049894774131808e-315, height=0, angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=...,
t=0x7ffc641f9990, background=0x5591db748b90, nlightsin=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=false, oldpid=0) at ./glrender.cc:2207
--
sigfault

Loading...