[Bug 1197780] New: rpm varies from parallelism
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 Bug ID: 1197780 Summary: rpm varies from parallelism Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: mls@suse.com Reporter: bwiedemann@suse.com QA Contact: qa-bugs@suse.de CC: dmueller@suse.com Found By: --- Blocker: --- Today I observed a new class of issues that affects at least adinatha-fonts arabic-fonts gdouros-akkadian-fonts icingaweb2 solaar xsane I did not re-test all packages. There are unaffected packages. Affected package sizes range from 1MB to 5MB. I made a minimal reproducer in https://build.opensuse.org/package/show/home:bmwiedemann:reproducible:test/a... Building it with for N in 1 2 ; do osc build --noservice --clean --vm-type=kvm -j$N \ --keep-pkgs=pkgs.$N openSUSE_Tumbleweed x86_64 ; done causes it to vary It probably has to do with filterdiff printrpmtags pkgs.[12]/adinatha-fonts-1.0-0.noarch.rpm LONGARCHIVESIZE=2146852 LONGFILESIZES=0 -LONGSIGSIZE=1897928 +LONGSIGSIZE=1897768 LONGSIZE=2146214 What recent change could cause this? Does it have to do with compression? There have been previous cases where single-threaded compression gave different results, but afaik zstd avoided these by always using the multi-threaded code, even on single-core. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c1 --- Comment #1 from Bernhard Wiedemann <bwiedemann@suse.com> --- http://w3.nue.suse.com/~bwiedemann/rb/boo1197780/ has sample binaries. diff of rpm --debug -qpvl < ufdio: 6 reads, 6809 total bytes in 0.000008 secs
ufdio: 6 reads, 6969 total bytes in 0.000008 secs
shows that there are 60 extra bytes - probably in the header. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c2 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.liska@suse.com Assignee|mls@suse.com |martin.liska@suse.com --- Comment #2 from Martin Li��ka <martin.liska@suse.com> --- All right, I can reproduce it. The first investigation shows that it happens even if I disable ZSTD thread pool and use threads == 1. But one needs parallel processing of files in rpm (using openMP). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c3 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwiedemann@suse.com Flags| |needinfo?(bwiedemann@suse.c | |om) --- Comment #3 from Martin Li��ka <martin.liska@suse.com> --- Do you think it's a recent regression? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c4 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.liska@suse.com |mls@suse.com --- Comment #4 from Martin Li��ka <martin.liska@suse.com> --- All right, so the issue is not related to the ZSTD compression algorithm. I can see the same behavior when I switch either to xzdio or gzio: $ rpm -qp --queryformat '%{PAYLOADCOMPRESSOR}\n' pkgs.1/adinatha-fonts-1.0-0.noarch.rpm gzip $ rpm --debug -qpvl ./pkgs.1/adinatha-fonts-1.0-0.noarch.rpm 2>&1 | grep 'total' ufdio: 6 reads, 6765 total bytes in 0.000005 secs $ rpm --debug -qpvl ./pkgs.2/adinatha-fonts-1.0-0.noarch.rpm 2>&1 | grep 'total' ufdio: 6 reads, 6925 total bytes in 0.000007 secs -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c5 Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(bwiedemann@suse.c | |om) | --- Comment #5 from Bernhard Wiedemann <bwiedemann@suse.com> ---
Do you think it's a recent regression?
Yes, I only observed this by 2022-03-31 and I'm pretty sure it was not present at end of February when I spent some time on analysis for the previous monthly rb report. The oldest such diff is from 2022-03-31 01:38 I reviewed the openSUSE changes and on the 30th, only this looked like a candidate https://github.com/bmwiedemann/openSUSE/commit/7c9447751d9dfb -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c6 --- Comment #6 from Bernhard Wiedemann <bwiedemann@suse.com> --- I enhanced the reproducer to find that I can still trigger this issue when I just keep the first 154 bytes of one file and 17 of the other, but not with less. This makes me suspect mime-type detection to be involved. and indeed filterdiff strings pkgs.*/*noarch.rpm shows noarch-suse-linux directory +TrueType Font data, 19 tables, 1st "Feat" utf-8 The version built on 1 core lacks the .otf metadata. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c7 --- Comment #7 from Martin Li��ka <martin.liska@suse.com> --- Nice reduction, yes it would be output of 'file' command: $ file *.otf Adinatha-Tamil-Brahmi.otf: TrueType Font data, 19 tables, 1st "Feat", 42 names, Macintosh, Typeface \251 (your company). 2010. All Rights ReservedRegularAdinatha Tamil Brahmi:Version 1.00 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c8 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com --- Comment #8 from Martin Li��ka <martin.liska@suse.com> --- I've got a debugging patch: diff --git a/build/rpmfc.c b/build/rpmfc.c index eb51a36..51f0998 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -1251,7 +1252,16 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) else if (slen >= fc->brlen+sizeof("/dev/") && rstreqn(s+fc->brlen, "/dev/", sizeof("/dev/")-1)) ftype = ""; else - ftype = magic_file(ms, s); + { + ftype = magic_file(ms, s); + fprintf (stderr, "ftype called for %s with result=%s\n", s, ftype); + + magic_t ms2 = magic_open(msflags); + int r = magic_load(ms2, NULL); + fprintf (stderr, "magic_load=%d\n", r); + const char *ftype2 = magic_file(ms2, s); + fprintf (stderr, "ftype2 called for %s with result=%s\n", s, ftype2); + } /* Silence errors from immaterial %ghosts */ if (ftype == NULL && errno == ENOENT) That shows for job=1: [ 8s] ftype called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] ftype called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=data [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" while for jobs>1: [ 8s] ftype called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] ftype called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" Note with jobs>2 we use openmp and thus: /* libmagic is not thread-safe, each thread needs to a private handle */ magic_t ms = magic_open(msflags); magic_t mime = magic_open(mimeflags); each thread has its own 'ms' and 'mime' variables. Seems reusing of 'ms' does not work for some reason.. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c9 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(dmueller@suse.com | |) --- Comment #9 from Martin Li��ka <martin.liska@suse.com> --- The issue might be caused by some reason change in libmagic. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c10 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mls@suse.com --- Comment #10 from Martin Li��ka <martin.liska@suse.com> --- The modified version of rpm package can be seen here: home:marxin:stability2/rpm -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c11 --- Comment #11 from Martin Li��ka <martin.liska@suse.com> --- The output looks like: [ 8s] ms=0x55c928947810 created [ 8s] ftype called with ms=0x55c928947810 for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 8s] ftype called with ms=0x55c928947810 for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=data [ 8s] magic_load=0 [ 8s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" [ 8s] closing ms=0x55c928947810 'result=data' is the problematic output, while jobs>2 does: [ 9s] ms=0x562b74b3ef90 created [ 9s] ms=0x7f8364000b70 created [ 9s] ms=0x7f835c000b70 created [ 9s] ms=0x7f8354000b70 created [ 9s] ftype called with ms=0x7f8354000b70 for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" [ 9s] magic_load=0 [ 9s] ftype called with ms=0x7f835c000b70 for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 9s] magic_load=0 [ 9s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha-Tamil-Brahmi.otf with result=TrueType Font data, 19 tables, 1st "Feat" [ 9s] ftype2 called for /home/abuild/rpmbuild/BUILDROOT/adinatha-fonts-1.0-0.x86_64/usr/share/doc/packages/adinatha-fonts/Adinatha Tamil Brahmi Manual.pdf with result=PDF document, version 1.5 [ 9s] closing ms=0x7f835c000b70 [ 9s] closing ms=0x562b74b3ef90 [ 9s] closing ms=0x7f8354000b70 [ 9s] closing ms=0x7f8364000b70 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c12 --- Comment #12 from Dr. Werner Fink <werner@suse.com> --- About which version of file package (and sub package libmagic1) do we talk? Wed Mar 23 09:02:37 UTC 2022 - Dirk M�ller <dmueller@suse.com> - add file-5.41-cache-regexps-locale-restore.patch to restore previous locale handling behavior Sat Mar 19 18:00:32 UTC 2022 - Dirk M�ller <dmueller@suse.com> - add file-5.41-cache-regexps.patch to cache regexp lookups Thu Feb 24 10:05:17 UTC 2022 - Dr. Werner Fink <werner@suse.de> - Reenable libseccomp sandboxing -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1197780 http://bugzilla.opensuse.org/show_bug.cgi?id=1197780#c13 Dirk Mueller <dmueller@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|mls@suse.com |dmueller@suse.com Flags|needinfo?(dmueller@suse.com | |) | --- Comment #13 from Dirk Mueller <dmueller@suse.com> --- I will fix this. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com