-
Notifications
You must be signed in to change notification settings - Fork 3
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
Segmentation fault #5
Comments
Oh interesting; it seems to work fine here so could you share or link to the PDF file that is being used as a source, so that I can try to reproduce it? And is there is anything more in the error message other than just segmentation fault? (Guess it's time to make the code less hacky, and remove all |
It's also surprising that it happens non-deterministically… is it possible that the issue is something like consuming too much memory and running out of memory? (Then it would depend on what other programs are running at the time, etc.) |
Okay, here is the PDF that I am working on- Please check if this generates the same problem for you. If not, please share your version of the PDF with me. But anyway, segfault should not generally happen in Rust unless memory is really an issue (but it happens with this program on 8GB). I will try debugging when I get sufficient time. Error produced on a |
Thanks for uploading; I'll take a look. (May be a while: in the meantime I was editing the code quite a bit and it's gotten into a half-broken state now; will take a look when it's cleaned up… And things are also very busy at work so any time I spend on this is "guilty time".) |
I'll download the file and try it when I have access, but I also made some changes to the code and the problem may have gone away now (though I can't see why); please try that too. I was able to run the current version on the entire unabridged PDF from the Internet Archive without errors (earlier it wouldn't have worked and required the |
Sorry. Just changed the view permissions to "anyone with the link". Will now try with the updated code. |
I've downloaded the file but meanwhile I've started getting segmentation
fault up too even with the file I was using earlier... Will take a look
sometime (I think there's a way to run rust programs with ASan which may
point to the problem). How did you narrow it down to that line of code
earlier?
…On Sun, Aug 15, 2021, 8:53 PM उ॒ज्ज्व॒लः ***@***.***> wrote:
I'll download the file and try it when I have access,
Sorry. Just changed the view permissions to "anyone with the link". Will
now try with the updated code.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF3MKUO6VAYIZBOECXUEQLT5CDTBANCNFSM5CC6AUJQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Interesting indeed. I am not getting any segfault for now. But we have to remove the bug anyway (which probably seems to be with the
|
This was frustrating to debug as it was non-deterministic (even with for SAN in address leak memory thread; do
export RUSTFLAGS=-Zsanitizer=$SAN RUSTDOCFLAGS=-Zsanitizer=$SAN
RUST_BACKTRACE=full cargo +nightly run -Zbuild-std --target x86_64-apple-darwin --bin dump-tjs -- ../../gp-mbh/unabridged.pdf font-usage --phase phase1
done (with a small 1-page PDF file as input). It seems the the output
So I just removed the profiler (the only one I had found to work in the first place :-( ) and it seems to not crash anymore; give it a try. (Haven't looked any further to find why this happens; will report it to https://github.com/tikv/pprof-rs and leave it at that.) |
I am getting segfault at this line while dumping the Tjs. The page number on which this happens (sometimes on 1000+, sometimes on 10000+) is not deterministic, but out of ten times I have tried it, it has happened every single time.
pdf-glyph-mapping/src/dump-tjs.rs
Line 121 in 438e712
The text was updated successfully, but these errors were encountered: