Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGFPE while using vips_text #3660

Open
kstanikviacbs opened this issue Sep 15, 2023 · 3 comments
Open

SIGFPE while using vips_text #3660

kstanikviacbs opened this issue Sep 15, 2023 · 3 comments
Labels

Comments

@kstanikviacbs
Copy link

kstanikviacbs commented Sep 15, 2023

Hello there!

As always - starting with saying - thank you for your great work!

Recently I've caught a SIGFPE while utilising libvips (8.14.3) and vips_text with my JVM bindings. I'm afraid I struggle to find a 100% reproducer for now, but issue I found is very similar to the reported one for sharp some time ago: lovell/sharp#3536

So I've got lots of images being processed with some overlays and text addition and then SIGFPE sometimes happens.
I'd do my best to provide more info, but in the meantime assumed maybe sth might ring a bell to you in terms of a potential root cause.

18:22:34  #
18:22:34  # A fatal error has been detected by the Java Runtime Environment:
18:22:34  #
18:22:34  #  SIGFPE (0x8) at pc=0x00007f6d764f9697, pid=400, tid=608
18:22:34  #
18:22:34  # JRE version: OpenJDK Runtime Environment (17.0.8+7) (build 17.0.8+7-Debian-1deb12u1)
18:22:34  # Java VM: OpenJDK 64-Bit Server VM (17.0.8+7-Debian-1deb12u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
18:22:34  # Problematic frame:
18:22:34  # C  [libglib-2.0.so.0+0x41697]  g_hash_table_lookup+0x47
18:22:34  #
18:22:34  # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /app-server/core.400)
18:22:34  #
18:22:34  # An error report file with more information is saved as:
18:22:34  # /app-server/hs_err_pid400.log
18:22:34  #
18:22:34  # If you would like to submit a bug report, please visit:
18:22:34  #   https://bugs.debian.org/openjdk-17
18:22:34  #
18:22:34  Magick: abort due to signal 6 (SIGABRT) "Abort".

What is weird here is Magick being aborted, not sure what might libvips use it for particularly here.

Any guidance or help would be greatly appreciated!

@jcupitt
Copy link
Member

jcupitt commented Sep 15, 2023

Hi @kstanikviacbs,

That's strange, imagemagick isn't involved in text rendering. I think we'll need some sample code :(

Could you try making a reproducer in pyvips? It would remove the possibility that the cause is in error in your java binding.

@kstanikviacbs
Copy link
Author

Thanks for quick reply @jcupitt !

Yeah, working on a reproducer, but gave it a try with all that I have for now...

@kstanikviacbs
Copy link
Author

No reproducer yet, but attaching a bit more data from dumped core:

#1  0x00007f5588923d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007f55888d4f32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f55888bf472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007f558776905b in  () at /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
#5  0x00007f558844e4ac in VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) ()
    at /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
#6  0x00007f558844ee5b in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) () at /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
#7  0x00007f558844ee8e in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) () at /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
#8  0x00007f55882f1973 in JVM_handle_linux_signal () at /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
#9  0x00007f55888d4fd0 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#10 0x00007f55595d8697 in g_hash_table_lookup () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f556801e11d in  () at /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
#12 0x00007f55595b755d in g_atomic_rc_box_release_full () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007f556801dea7 in  () at /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
#14 0x00007f556801df37 in  () at /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
#15 0x00007f5559615cfd in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f5588922044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#17 0x00007f55889a1860 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

Seems like libpangoft2 is really involved in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants