rustformers / llm

[Unmaintained, see README] An ecosystem of Rust libraries for working with large language models

Home Page:https://docs.rs/llm/latest/llm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SIGTRAP triggered on MacOS

jafioti opened this issue · comments

I'm trying to summarize some text, and I keep getting the following crash error message when I run inference:

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x0000000427955d04

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [27651]

Notably this only happens after the program has been running a while, doing other things. When the same inference is ran right at the beginning of main() it works fine. I initially thought. it was running out of memory, but I can't see any spike in memory usage occuring.

It's also not a panic, but a crash, meaning the macos "quit unexpectedly" message pops up and no panic backtrace is available.

Has this happened to anyone else?

Quick update, we are using pdfium_render in our project, and this crash only happens when trying to run inference after we run pdfium to extract images from pdfs.

More specifically, if you run this line before llm inference, it will crash:

let pdfium = Pdfium::new(Pdfium::bind_to_library(
        Pdfium::pdfium_platform_library_name_at_path("/path/to/pdfium/"),
    )?);