Debugging a seg fault #1437
Replies: 4 comments
-
Let me add something that should have been obvious to me if I'd dug as deeply as a I could with the stack trace above. There is a reason it doesn't crash on ARM, but does on x86. That is what is what is effectively a bounds check by the
Meanwhile, I can probably find where to fix this in llama.cpp by checking that pointer before calling EDIT: I wasn't quite right on ARM running |
Beta Was this translation helpful? Give feedback.
-
Getting a full stack crawl would be very helpful in fixing this outside Cosmo. |
Beta Was this translation helpful? Give feedback.
-
After spending the better part of my day messing with this, I'd like to put this line at the beginning of
That should fix the problem I'm seeing in the least intrusive way. But for the life of me, I can't figure out what to copy where so I can use my built version of Cosmo. I figured out:
But what I need to copy to my .cosmo folder to make my build available? |
Beta Was this translation helpful? Give feedback.
-
I figured it out and am closing this discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes, I feel like a script kiddy. Like now. LOL.
Inspired by
llamafile
, but needing to be able to work with the latest and greatest small models as they became available, I forked llama.cpp and gave it a Cosmo treatment with cosmocc-4.0.2.zip,https://github.com/BradHutchings/Mmojo-Server
The convenience of having one binary output for x86 / ARM and Linux / macOS / Windows is amazing! So is packaging support files in the APE zip. Since llama.cpp adds CPU and GPU support at compile time, I take a bit of a performance hit, but it's quite livable with small models and small devices.
I have run into a seg fault when loading some models (IBM Granite, Meta Llama, OpenAI gpt-oss) on x86, but not ARM. My best not very good or informed effort with gdb is telling me that it happens in the Cosmo lib:
I think I've set environment variables close to right to get a good stack trace, but you can see it's not a great stack trace on the app.
So two questions...
Thanks!
-Brad
Beta Was this translation helpful? Give feedback.
All reactions