ligurio / unreliablefs

A FUSE-based fault injection filesystem.
https://ligurio.github.io/unreliablefs/unreliablefs.1.html
MIT License
177 stars 9 forks source link

Lookup of .xdg-volume-info, autorun.inf, .Trash-1000 and .Trash leads to errors in debug log #125

Open dura0ok opened 10 months ago

dura0ok commented 10 months ago

OS: Linux Mint 21.2 x86_64 Kernel: 5.15.0-88-generic version: master commit #1479669 config like in example

[errinj_noop]
op_regexp    = .*
path_regexp  = .*
probability  = 30

Log

./unreliablefs /tmp/fs -d -basedir=/tmp
random seed = 1700150145
read configuration /tmp/unreliablefs.conf
enabled error injection errinj_noop
[errinj_noop] op_regexp = .*
[errinj_noop] path_regexp = .*
[errinj_noop] probability = 30
starting FUSE filesystem unreliablefs
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.34
flags=0x33fffffb
max_readahead=0x00020000
   INIT: 7.19
   flags=0x00000413
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 2, success, outsize: 40
unique: 4, opcode: ACCESS (34), nodeid: 1, insize: 48, pid: 2945
access / 04
errinj 'errinj_noop' skipped: probability (30) is not matched
   unique: 4, success, outsize: 16
unique: 6, opcode: LOOKUP (1), nodeid: 1, insize: 47, pid: 2945
LOOKUP /.Trash
getattr /.Trash
errinj 'errinj_noop' skipped: probability (30) is not matched
   unique: 6, error: -2 (No such file or directory), outsize: 16
unique: 8, opcode: LOOKUP (1), nodeid: 1, insize: 52, pid: 2945
LOOKUP /.Trash-1000
getattr /.Trash-1000
errinj 'errinj_noop' skipped: probability (30) is not matched
   unique: 8, error: -2 (No such file or directory), outsize: 16
unique: 10, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 190812
getattr /
errinj_noop triggered on operation 'getattr', /tmp/
   unique: 10, success, outsize: 120

unique: 8, error: -2 (No such file or directory), outsize: 16 very strange error

ligurio commented 6 months ago

New mountpoint is discovered by Linux system for special files: .xdg-volume-info, autorun.inf, .Trash-1000:

unique: 2, opcode: INIT (26), nodeid: 0, insize: 104, pid: 0                                                                                        [394/3921]
INIT: 7.38                                                                     
flags=0x73fffffb                                                               
max_readahead=0x00020000                                                       
   INIT: 7.19                                                                  
   flags=0x00000413                                                            
   max_readahead=0x00020000                                                    
   max_write=0x00020000                                                        
   max_background=0                                                                                                                                           
   congestion_threshold=0                                                                                                                                     
   unique: 2, success, outsize: 40                                                                                                                            
unique: 4, opcode: ACCESS (34), nodeid: 1, insize: 48, pid: 2700               
access / 04                                                                    
   unique: 4, success, outsize: 16                                             
unique: 6, opcode: LOOKUP (1), nodeid: 1, insize: 47, pid: 2700                                                                                               
LOOKUP /.Trash                                                                                                                                                
getattr /.Trash                                                                
   unique: 6, error: -2 (No such file or directory), outsize: 16                                                                                              
unique: 8, opcode: LOOKUP (1), nodeid: 1, insize: 52, pid: 2700                
LOOKUP /.Trash-1000
getattr /.Trash-1000
   unique: 8, error: -2 (No such file or directory), outsize: 16
unique: 10, opcode: LOOKUP (1), nodeid: 1, insize: 57, pid: 866671
LOOKUP /.xdg-volume-info
getattr /.xdg-volume-info
   unique: 10, error: -2 (No such file or directory), outsize: 16
unique: 12, opcode: LOOKUP (1), nodeid: 1, insize: 52, pid: 866672
LOOKUP /autorun.inf
getattr /autorun.inf
   unique: 12, error: -2 (No such file or directory), outsize: 16

These files doesn't exist there, and unreliablefs reports errors when debug log is enabled.

References:

I don't know how to disable discovering of these files on Linux. Probably I can blacklist operations for files /.Trash, /autorun.inf and /.xdg-volume-info to avoid spam in debug log.