Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fault injection with 1-byte reads #92

Closed
wants to merge 3 commits into from
Closed

Conversation

ligurio
Copy link
Owner

@ligurio ligurio commented Aug 9, 2021

Closes #86

@ligurio ligurio changed the title Add fault injection with 1-byte reads [WIP] Add fault injection with 1-byte reads Aug 11, 2021
@ligurio ligurio marked this pull request as draft August 11, 2021 13:17
@ligurio ligurio force-pushed the ligurio/gh-86 branch 2 times, most recently from 0774402 to 6d538d0 Compare August 11, 2021 16:59
@ligurio ligurio marked this pull request as ready for review November 27, 2021 19:17
@ligurio ligurio changed the title [WIP] Add fault injection with 1-byte reads Add fault injection with 1-byte reads Nov 27, 2021
@ligurio ligurio force-pushed the ligurio/gh-86 branch 3 times, most recently from 866d17f to 785bfb5 Compare January 24, 2022 15:54
@ligurio
Copy link
Owner Author

ligurio commented Jan 24, 2022

@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?

@vinipsmaker
Copy link

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.

@ligurio
Copy link
Owner Author

ligurio commented Jan 25, 2022

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

Good, I will wait for your feedback.

@ligurio
Copy link
Owner Author

ligurio commented Feb 8, 2022

@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

@vinipsmaker
Copy link

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
Copy link

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.

@ligurio
Copy link
Owner Author

ligurio commented Feb 11, 2022

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

Thanks. I'll take a look.

@ligurio ligurio marked this pull request as draft June 14, 2022 12:38
@ligurio ligurio closed this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test 1-byte reads
2 participants