Bug 459174 - okular crashes after signature checking
Summary: okular crashes after signature checking
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 22.12.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-15 17:20 UTC by Syiad
Modified: 2023-03-10 15:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Output from valgrind --log-file=valgrind.out okular myfile.pdf (114.41 KB, text/plain)
2022-09-16 16:15 UTC, Syiad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syiad 2022-09-15 17:20:19 UTC
SUMMARY
***
okular crashes every time I check a digital signature of a pdf file on the side panel
***


STEPS TO REPRODUCE
1. Open digitally signed pdf file.
2. Click on 'show signature area'.
3. Click on the arrow to the left of the signature info to reveal more details.
4. Close okular.

OBSERVED RESULT
okular crashes on exit.

EXPECTED RESULT
okular closes normally.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Backtrace:
Application: Okular (okular), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f3a3d7818f4 in std::vector<std::shared_ptr<Akd::Middleware::Pkcs11::Pkcs11Session>, std::allocator<std::shared_ptr<Akd::Middleware::Pkcs11::Pkcs11Session> > >::_M_erase(__gnu_cxx::__normal_iterator<std::shared_ptr<Akd::Middleware::Pkcs11::Pkcs11Session>*, std::vector<std::shared_ptr<Akd::Middleware::Pkcs11::Pkcs11Session>, std::allocator<std::shared_ptr<Akd::Middleware::Pkcs11::Pkcs11Session> > > >) () from /usr/lib/akd/eidmiddleware/pkcs11/libEidPkcs11.so
#5  0x00007f3a3d75e643 in C_CloseAllSessions () from /usr/lib/akd/eidmiddleware/pkcs11/libEidPkcs11.so
#6  0x00007f3a8406aa70 in PK11_FreeSlot () from /lib/x86_64-linux-gnu/libnss3.so
#7  0x00007f3a8406d67c in SECMOD_DestroyModule () from /lib/x86_64-linux-gnu/libnss3.so
#8  0x00007f3a84034ea4 in ?? () from /lib/x86_64-linux-gnu/libnss3.so
#9  0x00007f3a84035ab8 in NSS_Shutdown () from /lib/x86_64-linux-gnu/libnss3.so
#10 0x00007f3a843c34bd in ?? () from /lib/x86_64-linux-gnu/libpoppler.so.118
#11 0x00007f3a95440495 in __run_exit_handlers (status=0, listp=0x7f3a95614838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#12 0x00007f3a95440610 in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#13 0x00007f3a95424d97 in __libc_start_call_main (main=main@entry=0x55eb3897b4c0, argc=argc@entry=1, argv=argv@entry=0x7ffcc3ab2238) at ../sysdeps/nptl/libc_start_call_main.h:74
#14 0x00007f3a95424e40 in __libc_start_main_impl (main=0x55eb3897b4c0, argc=1, argv=0x7ffcc3ab2238, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcc3ab2228) at ../csu/libc-start.c:392
#15 0x000055eb3897d5b5 in ?? ()
[Inferior 1 (process 10829) detached]
Comment 1 Albert Astals Cid 2022-09-15 19:49:50 UTC
Can you run this through valgrind? (install it first if you need to)

valgrind okular myfile.pdf

Do what you usually do and paste the output here.
Comment 2 Syiad 2022-09-16 16:15:02 UTC
Created attachment 152118 [details]
Output from valgrind --log-file=valgrind.out okular myfile.pdf

Funny, it doesn't crash when starting from the command line as 'valgrind --log-file=valgrind.out okular myfile.pdf'. But it does crash when starting  as 'okular myfile.pdf'.
Comment 3 Albert Astals Cid 2022-09-18 19:17:07 UTC
I guess we should stop using atexit to clear NSS in poppler, kind of hard to do though :/

Meanwhile if you don't need the eidmiddleware thing, uninstalling it should fix the crash on exit.
Comment 4 Albert Astals Cid 2022-09-18 19:19:19 UTC
Depends on https://gitlab.freedesktop.org/poppler/poppler/-/issues/1293
Comment 5 Syiad 2022-09-19 08:37:47 UTC
(In reply to Albert Astals Cid from comment #3)
 
> Meanwhile if you don't need the eidmiddleware thing, uninstalling it should fix the crash on exit.

Unfortunately, I need that. It's the official software for using the Croatian electronic ID card.
Comment 6 Gisela 2023-03-08 22:44:03 UTC
Can't open a file with signature or sign a pdf. It simply crashes. Thank you
Comment 7 Syiad 2023-03-09 09:43:53 UTC
I suppose this has been marked as FIXED by mistake. I didn't see any info on how this has been resolved.
--> Changed back to REPORTED.
Comment 8 Oliver Sander 2023-03-09 09:47:52 UTC
Without having tried this myself: There has been a great number of bug reports similar to this one, and they have all been solved by updating to newer versions.  Please try to get the latest flatpack version of Okular or build it from source and report back if the bug is still there.
Comment 9 Syiad 2023-03-10 15:10:14 UTC
No more crash with okular 22.08.3