Bug 512946 - okular doesn't start if mounted file / network is unreachable
Summary: okular doesn't start if mounted file / network is unreachable
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.12.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-04 16:17 UTC by best
Modified: 2025-12-04 16:17 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description best 2025-12-04 16:17:07 UTC
okular doesn't start if a mounted NFS directory is not available e.g. due to a network change.
 
mount:
example.org:/shares/media on /home/media type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.156,local_lock=none,addr=192.168.1.22)

strace shows it tries to access a file which was recently opened. I guess for the completion of the list of recent opened files.

STEPS TO REPRODUCE
1. remove network cable
2. open okular
3. wait forever

OBSERVED RESULT
hangs forever

EXPECTED RESULT
1. open the file / okular GUI immediately.
2. load the list of recent opened files with a timeout of 2 seconds.
3. load the list asynchronously in the background e.g. in a thread
4. log a warning message to stderr/elsewhere, if the files isn't accessible
5. ignore unreachable files (remove them from that list or grey them out)
6. maybe retry periodically (I don't care)
7. at least, always start fast!

ADDITIONAL INFORMATION
strace log:
```
…
access("/usr/share/icons/breeze/actions/symbolic/dialog-close.svg", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)                                                                                                                  
access("/usr/share/icons/breeze/devices/symbolic/dialog-close.svg", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)                                                                                                                  
access("/usr/share/icons/breeze/emblems/symbolic/dialog-close.svg", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)                                                                                                                  
access("/usr/share/icons/breeze/places/symbolic/dialog-close.svg", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)                                                                                                                   
access("/usr/share/icons/breeze/status/symbolic/dialog-close.svg", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)                                                                                                                   
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8                                                                            
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                  
writev(3, [{iov_base="\22\0\10\0\f\0\200\1\10\1\0\0\3\1\0\0\10\0\0\0\6\0\0\0Okular\0\0", iov_len=32}], 1) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLIN|POLLOUT}])                           
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)               
writev(3, [{iov_base="\22\0\6\0\f\0\200\1'\0\0\0\37\0\0\0\10\30\f\0\0\0\0\0", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24                                                                                      
futex(0x55a4c7ede25c, FUTEX_WAKE_PRIVATE, 1) = 1                                                                       
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 1                                                                       
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                    
writev(3, [{iov_base="\22\0\10\0\f\0\200\1\10\1\0\0\3\1\0\0\10\0\0\0\6\0\0\0Okular\0\0", iov_len=32}], 1) = 32  
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                    
writev(3, [{iov_base="\22\0\6\0\f\0\200\1'\0\0\0\37\0\0\0\10\30\f\0\0\0\0\0", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24                                                                                      
futex(0x55a4c7ede258, FUTEX_WAKE_PRIVATE, 1) = 1                                                                       
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 1                                                                       
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                 
writev(3, [{iov_base="\22\0\6\0\f\0\200\1;\1\0\0\3\1\0\0\10\0\0\0\0\0\0\0\22\0\10\0\f\0\200\1"..., iov_len=56}], 1) = 56                                                                                                                       
futex(0x55a4c7ede208, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)  
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 0                                                                       
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                        
writev(3, [{iov_base="\22\0\6\0\f\0\200\1'\0\0\0\37\0\0\0\10\30\f\0\0\0\0\0", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24                                                                                      
futex(0x55a4c7ede208, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)         
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 0                                                                       
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])                                       
writev(3, [{iov_base="\22\0\10\0\f\0\200\1\10\1\0\0\3\1\0\0\10\0\0\0\6\0\0\0Okular\0\0", iov_len=32}], 1) = 32         
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\22\0\6\0\f\0\200\1'\0\0\0\37\0\0\0\10\30\f\0\0\0\0\0", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24                       
futex(0x55a4c7ede25c, FUTEX_WAKE_PRIVATE, 1) = 1                                                                       
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 1                                                                                                                                                                                               
futex(0x55a4c7ede208, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Die Ressource ist zur Zeit nicht verfügbar)            
futex(0x55a4c7ede208, FUTEX_WAKE_PRIVATE, 1) = 0                                                                       
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8                                                                                                                                                                                                    
getpid()                                = 1492466                                                                                                                                                                                              
write(10, "\1\0\0\0\0\0\0\0", 8)        = 8                                                                            
futex(0x55a4c83d68d0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY) = 0          
futex(0x55a4c83d6880, FUTEX_WAKE_PRIVATE, 1) = 0    
access("/home/media/foo.pdf", F_OK
```

→ hangs accessing file