Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#58124 - [atril] Atril chrashes on PDF.
Attached to Project:
Community Packages
Opened by Eivind (mokkurkalve) - Thursday, 05 April 2018, 11:24 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 14 July 2019, 14:30 GMT
Opened by Eivind (mokkurkalve) - Thursday, 05 April 2018, 11:24 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 14 July 2019, 14:30 GMT
|
DetailsDescription:
Atril now crashes whenever I try to open a PDF file. I don't know when this started, but not so long ago. It crashes thus: atril example.pdf Inconsistency detected by ld.so: ../sysdeps/x86_64/dl-machine.h: 540: elf_machine_rela_relative: Assertion `ELFW(R_TYPE) (reloc->r_info) == R_X86_64_RELATIVE' failed! Additional info: * package version(s) atril 1.20.0-1 * config and/or log files etc. Steps to reproduce: Try open a PDF file with atril from command line. |
This task depends upon
FATAL: Could not allocate gigacage memory with maxAlignment = 34359738368, totalSize = 120259084288.
All PDF's behave like this with atril now. They open OK in mupdf and others.
Trying to start atril with or without file argument:
FATAL: Could not allocate gigacage memory with maxAlignment = 34359738368, totalSize = 103079215104.
(Make sure you have not set a virtual memory limit.)
Memory segment error (kernel stored in file)
This shows up in logs:
kernel: atril[1127]: segfault at bbadbeef ip 00007f0a810cdede sp 00007ffefa4ca5f0 error 6 in libjavascriptcoregtk-4.0.so.18.7.9[7f0a80233000+10a6000]
However I investigated the thing about virtual memory and found I had these sysctl's set (among others):
vm.overcommit_ratio = 99
vm.overcommit_memory = 2
I commented these two out (reverted to default) and atril started working again. So as such the issue is solved.
I have 16 GB RAM installed. I am not sure atril should behave like this. It didn't until quite recently and nothing else does. (I've had these sysctl's set forever with no negative impact until this.)
However I guess that's maybe out of scope of this bug report and that it as such can be closed.
But if somebody wise can shed some light on this I'll be grateful....
BTW:
/usr/lib/libjavascriptcoregtk-4.0.so.18.7.9 is owned by webkit2gtk 2.20.1-1
To me it seems that atril tries to pre-allocate too much RAM and segfaults when it is not permitted to do that.
I would call that a bug. Especially as no other program currently on my system behaves like this.
But that's maybe a different bug than what I opened. I'll leave it up to you to decide.
I used strace on it and found out that there was a mmap of 128GB of RAM. My machine only has 6GB.
> strace atril
...
mmap(NULL, 137438953472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
write(2, "FATAL: Could not allocate gigaca"..., 101FATAL: Could not allocate gigacage memory with maxAlignment = 34359738368, totalSize = 103079215104.
) = 101
write(2, "(Make sure you have not set a vi"..., 53(Make sure you have not set a virtual memory limit.)
) = 53
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xbbadbeef} ---
+++ killed by SIGSEGV (core dumped) +++
zenity has the same problem. It seems to be libjavascriptcore related.
https://webkitgtk.org/2018/06/11/webkitgtk2.20.3-released.html
- Disable Gigacage if mmap fails to allocate in Linux.