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

Disable dir_index ext2/3/4 option #469

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@bmwiedemann
Member

bmwiedemann commented Oct 5, 2018

This reduces indeterminism from filesystem readdir order,
e.g. this snippet suddenly delivers the same output every time:

mkdir -p in; for i in $(seq 10) ; do touch in/$i ; done
find in/ -type f > unreproducible

Since we usually do not have large directories, it should not slow
down the build processes.

Quick testing with

osc co openSUSE:Factory/python-service_identity && cd $_
time osc build --no-service --clean --vm-type=kvm \
    --offline --build-opt=--vm-disk-filesystem=ext4

showed that the difference is 0 +-0.2%

Alternative approach is to use a constant hash_seed via
tytso/e2fsprogs@e1f7100
but that is not yet in Leap 15.0

Helps to limit the effect of problems like
http://bugzilla.opensuse.org/show_bug.cgi?id=1110339

@mlschroe

This comment has been minimized.

Show comment
Hide comment
@mlschroe

mlschroe Oct 5, 2018

Member

Hmm, but is that a good thing? We want to find and fix cases where the build depends on the filesystem ordering, don't we?

Member

mlschroe commented Oct 5, 2018

Hmm, but is that a good thing? We want to find and fix cases where the build depends on the filesystem ordering, don't we?

@bmwiedemann

This comment has been minimized.

Show comment
Hide comment
@bmwiedemann

bmwiedemann Oct 5, 2018

Member

We can still find and fix those outside of OBS by having a local revert of this.
I thought, in OBS we want to have reduced rebuilds and re-publishs from indeterminism.

btw: does OBS use ext4 to build?
Otherwise, I might have to add this flag to ext3 as well.

Member

bmwiedemann commented Oct 5, 2018

We can still find and fix those outside of OBS by having a local revert of this.
I thought, in OBS we want to have reduced rebuilds and re-publishs from indeterminism.

btw: does OBS use ext4 to build?
Otherwise, I might have to add this flag to ext3 as well.

@bmwiedemann

This comment has been minimized.

Show comment
Hide comment
@bmwiedemann

bmwiedemann Oct 6, 2018

Member

found it: /usr/lib/build/queryconfig reads .osc/_buildconfig-standard-x86_64 to see

# Use ext4 as FS in builder workers (instead of default ext3)
BuildFlags: vmfstype:ext4
Member

bmwiedemann commented Oct 6, 2018

found it: /usr/lib/build/queryconfig reads .osc/_buildconfig-standard-x86_64 to see

# Use ext4 as FS in builder workers (instead of default ext3)
BuildFlags: vmfstype:ext4

@bmwiedemann bmwiedemann changed the title from Disable dir_index ext4 option to Disable dir_index ext2/3/4 option Oct 6, 2018

@bmwiedemann

This comment has been minimized.

Show comment
Hide comment
@bmwiedemann

bmwiedemann Oct 10, 2018

Member

Maybe I should make it an option, so I can enable/disable it easily for testing if it makes a difference...

Member

bmwiedemann commented Oct 10, 2018

Maybe I should make it an option, so I can enable/disable it easily for testing if it makes a difference...

Disable dir_index ext2/3/4 option
This reduces indeterminism from filesystem readdir order,
e.g. this snippet suddenly delivers the same output every time:
mkdir -p in; for i in $(seq 10) ; do touch in/$i ; done
find in/ -type f > unreproducible

Since we usually do not have large directories, it should not slow
down the build processes.

Quick testing with openSUSE:Factory/python-service_identity
time osc build --no-service --clean --vm-type=kvm --offline
showed that the difference is 0 +-0.2%

Alternative approach is to use a constant hash_seed via
tytso/e2fsprogs@e1f7100
but that is not yet in Leap 15.0

bmwiedemann added a commit to bmwiedemann/reproducibleopensuse that referenced this pull request Oct 15, 2018

Allow to vary indeterminism of whole filesys
affects xine-ui and some others
that were otherwise not building reproducibly

Requires build package with
openSUSE/obs-build#469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment