Skip to content

Occasional SIGABRT segfault #416

@yhagio

Description

@yhagio

Describe the bug

I have seen several times following segfault error from Ruby on Rails app but not often like once a week, but quite not sure how it happens as I cannot reproduce it easily 😢. I use ruby-vips to generate gif image like

...
image = Vips::Image.black(width, height)
text_image = Vips::Image.text(text, dpi:, font:, fontfile:)
text_image = text_image.gravity(gravity, width, height)
text_image = text_image.ifthenelse(text_color_rgb, background_color_rgb, blend: true)
image = image.composite2(text_image, :over)
...
frames << image
...
gif_image = Vips::Image.arrayjoin(frames, across: 1)
gif_image.set_type(GObject::GINT_TYPE, 'page-height', frames.first.height)
gif_image.set_type(Vips::ARRAY_INT_TYPE, 'delay', Array.new(frames.length) { 1000 })
gif_image.write_to_buffer('.gif', effort: 1)

🐛 Only error log found (but no stacktrace from application code or gem 🤷🏼 )

Program terminated with signal SIGABRT, Aborted.
--
  | Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
  | #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
  |  
  | warning: 44	./nptl/pthread_kill.c: No such file or directory
  | [Current thread is 1 (Thread 0x78be58bfd6c0 (LWP 21896))]
  | #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
  | #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
  | #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
  | #3  0x000078beca63427e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
  | #4  0x000078beca6178ff in __GI_abort () at ./stdlib/abort.c:79
  | #5  0x000078be9d96cc04 in g_mutex_clear (mutex=<optimized out>) at ../../../glib/gthread-posix.c:1450
  | #6  g_mutex_clear (mutex=<optimized out>) at ../../../glib/gthread-posix.c:1445
  | #7  0x000078be9db6caf5 in vips_g_mutex_free () at /lib/x86_64-linux-gnu/libvips.so.42
  | #8  0x000078be9db9f70e in vips_semaphore_destroy () at /lib/x86_64-linux-gnu/libvips.so.42
  | #9  0x000078be9db76ed4 in ??? () at /lib/x86_64-linux-gnu/libvips.so.42
  | #10 0x000078be9db76a84 in ??? () at /lib/x86_64-linux-gnu/libvips.so.42
  | #11 0x000078be9d941c82 in g_thread_proxy (data=0x78be6219b320) at ../../../glib/gthread.c:835
  | #12 0x000078beca68baa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
  | #13 0x000078beca718c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Any idea what's wrong? I guess it's coming from libvips, not ruby-vips gem but not sure 🙇🏼

Additional context

Environment

  • Ubuntu 24
  • ruby version: 3.4.2
  • ruby-vips version: 2.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy