unreliablefs icon indicating copy to clipboard operation
unreliablefs copied to clipboard

Add fault injection with 1-byte reads

Open ligurio opened this issue 4 years ago • 7 comments

Closes #86

ligurio avatar Aug 09 '21 19:08 ligurio

@vinipsmaker I made a patch that add a fault injection errinj_1byte_read that limits amount of data on every read() by a single byte. Could you check that fault injection works for you?

ligurio avatar Jan 24 '22 16:01 ligurio

Could you check that fault injection works for you?

I think I can give it a try by next month.

Thanks for the patch. It should help one of my projects a lot.

vinipsmaker avatar Jan 25 '22 08:01 vinipsmaker

I think I can give it a try by next month.

Good, I will wait for your feedback.

ligurio avatar Jan 25 '22 10:01 ligurio

@vinipsmaker How to check the new fault injection with 1-byte read:

$ git clone https://github.com/ligurio/unreliablefs/
$ git checkout ligurio/gh-86
$ cd unreliablesfs
$ cmake .
$ make -j
$ mkdir source target
$ ./unreliablefs -basedir=./source target/
$ cat << EOF > target/unreliablefs.conf
[errinj_1byte_read]
op_regexp = .*
path_regexp = .*
probability = 80
EOF
$ umount source

ligurio avatar Feb 08 '22 13:02 ligurio

I can give it a try this week. Will report back soon.

How to check the new fault injection with 1-byte read

Thanks for the heads-on tutorial. It'll make the test quicker.

vinipsmaker avatar Feb 08 '22 15:02 vinipsmaker

It's not working at all.

The read() syscall returns -1 and errno is set to EINTR.

That's the log from unreliablefs:

errinj_1byte_read triggered on operation 'getattr', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'open', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'read', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'read', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'flush', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'lock', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read
errinj_1byte_read triggered on operation 'release', /home/vinipsmaker/Projetos/tabjson/test.BAK/jpat_changes.in
start of 1-byte read

Before it hits my call to read() the host for my plugin (gawk) performs some additional simple calls. My plugin controls the calls to read() so that's the part that matters to me.

vinipsmaker avatar Feb 10 '22 04:02 vinipsmaker

It's not working at all. The read() syscall returns -1 and errno is set to EINTR.

Thanks. I'll take a look.

ligurio avatar Feb 11 '22 17:02 ligurio