[Bug 1962785] Re: dtrace predictable temp file causes race
This bug was fixed in the package systemtap - 4.4-2ubuntu0.1 --- systemtap (4.4-2ubuntu0.1) impish; urgency=medium * d/p/dtrace-predictable-tmp-file.patch: Cherry-pick fix from upstream to avoid a race condition due to use of a predictable temporary file name. (LP: #1962785). -- dann frazier Wed, 16 Mar 2022 13:47:08 -0600 ** Changed in: systemtap (Ubuntu Impish) Status: Fix Committed => Fix Released ** Changed in: systemtap (Ubuntu Focal) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
This bug was fixed in the package systemtap - 4.2-3ubuntu0.1 --- systemtap (4.2-3ubuntu0.1) focal; urgency=medium * d/p/dtrace-predictable-tmp-file.patch: Cherry-pick fix from upstream to avoid a race condition due to use of a predictable temporary file name. (LP: #1962785). -- dann frazier Wed, 16 Mar 2022 14:04:27 -0600 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
= impish verification = Setting up systemtap-sdt-dev (4.4-2ubuntu0.1) ... Processing triggers for man-db (2.9.4-2) ... ubuntu@dannf-lp1962785-impish:~/foo$ make -j2 dtrace -o ../foo/foo.out -G -s /dev/null dtrace -o foo.out -G -s /dev/null = focal verification = Setting up systemtap-sdt-dev (4.2-3ubuntu0.1) ... Processing triggers for man-db (2.9.1-1) ... ubuntu@dannf-lp1962785-focal:~/foo$ make -j2 dtrace -o ../foo/foo.out -G -s /dev/null dtrace -o foo.out -G -s /dev/null ** Tags removed: verification-needed verification-needed-focal verification-needed-impish ** Tags added: verification-done verification-done-focal verification-done-impish -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
Hello dann, or anyone else affected, Accepted systemtap into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemtap/4.4-2ubuntu0.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-impish. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: systemtap (Ubuntu Impish) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-impish ** Changed in: systemtap (Ubuntu Focal) Status: In Progress => Fix Committed ** Tags added: verification-needed-focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
** Description changed: [Impact] dtrace generates .c code in a predictable temporary file which makes it susceptible to crashes. I've seen this happen in practice when rebuilding libvirt/focal on a system with 48 cores. The race window is wide enough that the crash is nearly 100% reproducible. [Test Case] - user@host:~$ cat foo/Makefile + user@host:~$ cat foo/Makefile all: ../foo/foo.out foo.out %.out: - dtrace -o foo.out -G -s /dev/null + dtrace -o $@ -G -s /dev/null clean: rm -f foo.out user@host:~$ cd foo user@host:~/foo$ make - dtrace -o foo.out -G -s /dev/null + dtrace -o ../foo/foo.out -G -s /dev/null user@host:~/foo$ make clean rm -f foo.out user@host:~/foo$ make -j2 - dtrace -o foo.out -G -s /dev/null + dtrace -o ../foo/foo.out -G -s /dev/null dtrace -o foo.out -G -s /dev/null Traceback (most recent call last): - File "/usr/bin/dtrace", line 455, in + File "/usr/bin/dtrace", line 445, in sys.exit(main()) - File "/usr/bin/dtrace", line 440, in main + File "/usr/bin/dtrace", line 432, in main os.remove(fname) FileNotFoundError: [Errno 2] No such file or directory: 'foo.out.dtrace-temp.c' - make: *** [Makefile:4: ../foo/foo.out] Error 1 + make: *** [Makefile:4: foo.out] Error 1 [Fix] https://sourceware.org/git/?p=systemtap.git;a=commit;h=0de9020c970bceda73e32bbd169c12e7579f21ec [What could go wrong] It is possible that a race still exists, but the fix should be an overall improvement. Perhaps it is possible that a funky filename string could cause UTF-8 encoding to fail resulting in a crash - though it would seem that such input wouldn't be a valid path name and dtrace would crash anyway. ** Description changed: [Impact] dtrace generates .c code in a predictable temporary file which makes it susceptible to crashes. I've seen this happen in practice when rebuilding libvirt/focal on a system with 48 cores. The race window is wide enough that the crash is nearly 100% reproducible. [Test Case] user@host:~$ cat foo/Makefile all: ../foo/foo.out foo.out %.out: - dtrace -o $@ -G -s /dev/null + dtrace -o $@ -G -s /dev/null clean: - rm -f foo.out + rm -f foo.out user@host:~$ cd foo user@host:~/foo$ make dtrace -o ../foo/foo.out -G -s /dev/null user@host:~/foo$ make clean rm -f foo.out user@host:~/foo$ make -j2 dtrace -o ../foo/foo.out -G -s /dev/null dtrace -o foo.out -G -s /dev/null Traceback (most recent call last): - File "/usr/bin/dtrace", line 445, in - sys.exit(main()) - File "/usr/bin/dtrace", line 432, in main - os.remove(fname) + File "/usr/bin/dtrace", line 445, in + sys.exit(main()) + File "/usr/bin/dtrace", line 432, in main + os.remove(fname) FileNotFoundError: [Errno 2] No such file or directory: 'foo.out.dtrace-temp.c' make: *** [Makefile:4: foo.out] Error 1 [Fix] https://sourceware.org/git/?p=systemtap.git;a=commit;h=0de9020c970bceda73e32bbd169c12e7579f21ec [What could go wrong] It is possible that a race still exists, but the fix should be an overall improvement. Perhaps it is possible that a funky filename string could cause UTF-8 encoding to fail resulting in a crash - though it would seem that such input wouldn't be a valid path name and dtrace would crash anyway. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
** Also affects: systemtap (Ubuntu Focal) Importance: Undecided Status: New ** Also affects: systemtap (Ubuntu Jammy) Importance: Undecided Status: Fix Released ** Also affects: systemtap (Ubuntu Impish) Importance: Undecided Status: New ** Changed in: systemtap (Ubuntu Impish) Status: New => In Progress ** Changed in: systemtap (Ubuntu Focal) Status: New => In Progress ** Changed in: systemtap (Ubuntu Focal) Assignee: (unassigned) => dann frazier (dannf) ** Changed in: systemtap (Ubuntu Impish) Assignee: (unassigned) => dann frazier (dannf) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
** Changed in: systemtap (Debian) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
This bug was fixed in the package systemtap - 4.6-1ubuntu1 --- systemtap (4.6-1ubuntu1) jammy; urgency=medium * d/p/PR28923-dtrace-Use-hash-based-scheme-for-predictable.patch: Cherry-pick fix from upstream to avoid a race condition due to use of a predictable temporary file name. LP: #1962785. -- dann frazier Mon, 07 Mar 2022 13:50:07 -0700 ** Changed in: systemtap (Ubuntu) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
Ah, thanks Frank - and I see the follow-up fix 7cf95304f8e9 as well. Since 22.04 is nearing release, I think I'll upload the bare minimum 0de9020c970b, as it is sufficient to fix the problem we're seeing. Once 22.10 opens up for devel let's reconsider applying the others (or go back to syncing with Debian if they've addressed it by then). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
** Changed in: systemtap (Debian) Status: Unknown => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
** Bug watch added: Debian Bug tracker #1006703 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006703 ** Also affects: systemtap (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006703 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1962785] Re: dtrace predictable temp file causes race
Suggest adding commit cfabd38cfdd75e also, which makes it more robust toward identical concurrent jobs. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1962785 Title: dtrace predictable temp file causes race To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1962785/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs