Bug 466900 - Okular startup delay due to historically automounted filesystems that are currently inaccessble
Summary: Okular startup delay due to historically automounted filesystems that are cur...
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.12.2
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-05 17:18 UTC by Wiley Sanders
Modified: 2023-03-05 17:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wiley Sanders 2023-03-05 17:18:18 UTC
Looks like okular suffers a 30 sec or so startup delay when it looks for historically automounted filesystems that are currently inaccessble. In other words, I see this on startup in strace:

[code]
[pid 48984] openat(AT_FDCWD, "/home/wsanders/.local/share/okular/bookmarks.xml", O_RDONLY|O_CLOEXEC) = 10
[pid 48984] statx(10, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0600, stx_size=2410, ...}) = 0
[pid 48984] statx(10, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0600, stx_size=2410, ...}) = 0
[pid 48984] read(10, "<?xml version=\"1.0\" encoding=\"UT"..., 16384) = 2410
[pid 48984] read(10, "", 13974)         = 0
[pid 48984] read(10, "", 16384)         = 0
[pid 48984] read(10, "", 16384)         = 0
[pid 48984] close(10)                   = 0
[pid 48984] readlink("/net", 0x7ffc73fb8090, 1023) = -1 EINVAL (Invalid argument)
[pid 48984] readlink("/net/192.169.1.1",  <unfinished ...>                                                   <<<---- HERE
[pid 48987] <... poll resumed>)         = 1 ([{fd=3, revents=POLLIN}])
[pid 48987] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="U\2\250\1\377dX\5\3\4\4\0\0\0\0\0\0\0\0\4\4\4\4\4\0\0\3\37%\2\0\0", iov_len=4096}], 
[code]

"/net/192.169.1.1..." is a previously automounted filesystem, but my server 192.169.1.1 is down.

I have no bookmarks, but the bookmarks.xml  file does have references to files in /net/192.169.1.1; it appears that  that is where the recently open files list is stored. 


STEPS TO REPRODUCE
1. Mount a automounted (manually mounted will probably do this too) NFS filesystem and open some files in it.
2. Exit okular
3. Shutdown the NFS server, disable automounter, or (not tested) unmount the filesystem, then restart okular.



OBSERVED RESULT
You should encounter a approx 30 sec delay on startup. 

EXPECTED RESULT
Okular should ascertain that some on the files in bookmarks.xml are not accessible and ignore them so it will open without delay.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Wiley Sanders 2023-03-05 17:20:20 UTC
What happened to my description? Here it is in case it got lost:

Looks like okular suffers a 30 sec or so startup delay when it looks for historically automounted filesystems that are currently inaccessble. In other words, I see this on startup in strace:

[code]
[pid 48984] openat(AT_FDCWD, "/home/wsanders/.local/share/okular/bookmarks.xml", O_RDONLY|O_CLOEXEC) = 10
[pid 48984] statx(10, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0600, stx_size=2410, ...}) = 0
[pid 48984] statx(10, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0600, stx_size=2410, ...}) = 0
[pid 48984] read(10, "<?xml version=\"1.0\" encoding=\"UT"..., 16384) = 2410
[pid 48984] read(10, "", 13974)         = 0
[pid 48984] read(10, "", 16384)         = 0
[pid 48984] read(10, "", 16384)         = 0
[pid 48984] close(10)                   = 0
[pid 48984] readlink("/net", 0x7ffc73fb8090, 1023) = -1 EINVAL (Invalid argument)
[pid 48984] readlink("/net/192.169.1.1",  <unfinished ...>                                                   <<<---- HERE
[pid 48987] <... poll resumed>)         = 1 ([{fd=3, revents=POLLIN}])
[pid 48987] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="U\2\250\1\377dX\5\3\4\4\0\0\0\0\0\0\0\0\4\4\4\4\4\0\0\3\37%\2\0\0", iov_len=4096}], 
[code]

"/net/192.169.1.1..." is a previously automounted filesystem, but my server 192.169.1.1 is down.

I have no bookmarks, but the bookmarks.xml  file does have references to files in /net/192.169.1.1; it appears that  that is where the recently open files list is stored. 


STEPS TO REPRODUCE
1. Mount a automounted (manually mounted will probably do this too) NFS filesystem and open some files in it.
2. Exit okular
3. Shutdown the NFS server, disable automounter, or (not tested) unmount the filesystem, then restart okular.


OBSERVED RESULT
You should encounter a approx 30 sec delay on startup. 

EXPECTED RESULT
Okular should ascertain that some on the files in bookmarks.xml are not accessible and ignore them so it will open without delay.