-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Process has been terminated by signal {SIGSEGV::SEGV_MAPERR} #6000
Comments
What do you mean, exactly, when you say that gdb can't catch the crash? You can either attach to luajit at runtime, or simply run reader.lua via luajit under gdb, both approaches should work. You may also try to let the kernel handle creating a coredump. You'll probably have to tweak the limits first and run KOReader in the same shell session. |
Without the device just some random guesses (based on issues related to SEGV_MAPERR). You can try to restrict JIT for your device &| try to allocate a "big" chunk of memory for machine code |
I just tried both. It seems to help a little, but doesn't fix the issue. |
Indeed, I got GDB to catch a segfault. I'd be great to build KOReader with debug symbols, but the wiki doesn't seem up to date. I know nothing about this code base, could somebody enlighten me ? |
Where in the wiki does it not seem up to date? Instructions here: https://github.com/koreader/koreader/blob/master/doc/Building.md |
@nessotrin: IIRC, the kodev wrapper should be able to get you a debug build w/ symbols, I've relied on it on a few occasions. |
That page doesn't say anything about a debug build. |
Thanks, I'll update that page. The method described there annoyed me immensely a few years back so I gave builds with debug symbols their own folder. You can simply use a command like |
PS The emulator defaults to debug. |
I tried ulimit at different settings, no luck. Here's the kernel and busybox : I found how to make a debug release with kodev. |
I'd expect people to just read over that, but sure. I guess I never thought about it because it's the same for Git. |
I very much hope that you can fix this issue. It's been around for ages. |
We can't do anything without a stacktrace and a strace log, much like we had to in order to investigate the libcurl + inkview issues earlier (#5861). |
crash.log |
I meant a gdb stacktrace, my bad (although a verbose crash.log will potentially also be helpful to cross-reference). |
I used 'ssh -T -v -p 2222 reader@1.1.1.1' |
Can you provide instructions for creating a gdb stacktrace? |
It's detailed in the issue I linked to, IIRC. |
Appears to be crashing later than usual though, so, beats me. Quite likely still related to InkView and/or the "new" TC on FW 6 or whenever they happened to switch to Clang. |
Nope, I thought I'd mentioned gdb vs. an ulimit coredump in #5861, but apparently not. Must have been in one of the other, numerous PB+InkView crash reports ;). (Although, yeah, the wiki is probably a good start; but I'm more of a native on-device gdb guy myself, I've never actually used gdbserver). |
_gdb_bt7(epub).txt |
@Uwe-B Neat! And after you re-enable In general, try to undo steps you did, one by one: ie mech_refresh, mech_wait_update_complete and dev_no_c_blitter until you get the one that's crashing. |
Does this help? |
@Uwe-B try the following lines exactly:
(this is a combo where display stil works, but may still avoid crashes if wait_update is the culprit) |
Thats exactly what I did the last minutes. No crash that I could produce!!! |
Then you get to check with |
Welp, finally narrowed it down. Now try whole pristine koreader from scratch (no gdb, no custom launch, no debug mode), and just change of @NiLuJe it seems like the collision field is written to, or even something beyond it. But only on kernels of peculiar devices. |
Cool its working.
Thanks guys, you are great, was waiting years for this fix! |
@ezdiy: Huh. Apparently the 631 kernel definitely supports both variants (or not, depending on how it's built), but we should definitely be calling the legacy variant. Which, err, I imagine should just plain fail instead of crash weirdly if the kernels aren't built w/ |
Oh. On the other hand, older kernels use the old ioctl address w/ the "new" struct, so, mystery solved? |
I'm going to build a proper franken-header + cdecl like on other platforms to make this kind of stuff slightly less crazy to debug... Because I seem to remember that what we have is pretty much based on trial and error and old Kindle kernels, so, it's a bit of a miracle that it kinda works to begin with ;p. |
@NiLuJe I suppose it couldn't hurt just passing the two-field struct always (since the marker int is first in there), just to be on safe side? |
@Uwe-B If I'm not mistaken, this should work correctly with no crashes:
|
Yep, couldn't crash it! |
Sorry, been late to the party. So I installed koreader-pocketbook-v2020.08.1-74-geecdf5b_2020-09-16 from the nightly builds; edited Confirm that all seems to work for long without crashing. |
@EastEriq Frontlight is in, as well as the autostandby issues. The current workaround for the crash is essentialy disabling part of functionality. We need some detail about what really goes on on your device by observing what the official reader does. Open an epub in epub (v2) reader (long-tap and open-with, i think), and strace the fb2 reader for ioctls while tapping through pages, paste the output here:
|
I posted a strace build that should decode those ioctls in
#6669 (comment)
…On Fri, Sep 18, 2020, 14:28 ezdiy ***@***.***> wrote:
@EastEriq <https://github.com/EastEriq> Current workaround is essentialy
disabling part of functionality. We need some detail about what really goes
on on your device by observing what the official reader does. Open an epub
in epub (v2) reader (long-tap and open-with, i think), and strace the fb2
reader for ioctls while tapping through pages:
/mnt/secure # strace -T -i -e trace=ioctl -p `ps | grep eink-reader|grep firsttime|awk {'print $1'}`
Process 1000 attached - interrupt to quit
[a1645d7c] ioctl(4, 0x80044655, 0xaedbd594) = 0 <0.001507>
[a1645d7c] ioctl(4, 0x80204656, 0xaedbad08) = 0 <0.000082>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.000081>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.000709>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.000802>
[a1645d7c] ioctl(4, 0x80044655, 0xaedbd594) = 0 <0.001509>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.000790>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.401787>
[a1645d7c] ioctl(4, 0x4004462f, 0xa3015dc4) = 0 <0.000088>
[a1645d7c] ioctl(4, 0x80044655, 0xaedbd594) = 0 <0.001684>
.....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6000 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3KZWGUHXPRZCQVB5Q2PTSGNG5NANCNFSM4LSG2YFA>
.
|
Here you go. Attached soon after I opened the reader on the device, played a bit with it like turning back and forth a couple of pages, skimmed through settings, dictionary-looked a word, then exited. I'm a bit surprised by the periodic EINVAL appearing; they go at about 2/sec when the reader is left alone; but that's the way it is. For the next two days I'll be offline, in case a new party starts... |
I'll do my best to help out with testing if needed. |
* Fix WAIT_FOR_COMPLETE ioctl (fix #6000) * Prevent a promotion to a flashing on fg/bg toggle * Bump base for the matching PB updates (koreader/koreader-base#1188)
Issue
Constant and random crashes. "Process has been terminated by signal {SIGSEGV::SEGV_MAPERR}"
Book progress is lost every time. Koreader is completely unusable.
Steps to reproduce
Install any koreader version on the device.
Do anything inside koreader, including using the menu. You can read around 10 pages before it crashes. There is no correlation between what you do and when it happens.
Sometimes is crashes even before the GUI shows up when running with gdb.
crash.log
& stracecrash.log
strace.txt
I've attached GDB, but it doesn't seem to catch the fault. I made a custom build environment with updated headers and libraries for FW5.19 (including libinkview), but it didn't help.
Koreader never worked on my device (been trying for 2 years).
I can't give away the device, but I'm willing to help if given instructions. I have gdbserver and telnet access. (GDB over telnet hangs for some reason)
The text was updated successfully, but these errors were encountered: