Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-14 Thread Florian Festi
Closed #2949 as completed via #2958.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949#event-12114555311
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-06 Thread Michael Schroeder
You probably already know this, but rpmbuild is killed by the write() system 
that writes the filelist to the generator being done after the child has exited.
I think the only way to prevent this is to ignore SIGPIPE before calling 
write(). Everything else like the select() thing we currently do is not race 
free.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949#issuecomment-1981020602
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-06 Thread Panu Matilainen
The flaky test-case is:

```cat << EOF > "${RPMTEST}"/tmp/bad.req
#!/bin/sh
echo 'bad = *'
EOF
chmod a+x "${RPMTEST}"/tmp/bad.req

runroot rpmbuild -bb --quiet \
--define "__script_requires /tmp/bad.req" \
/data/SPECS/shebang.spec
```

The common theme being a tiny generator that outputs little to nothing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949#issuecomment-1980966283
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-06 Thread Panu Matilainen
Oh, that sounds a whole lot like 
https://github.com/rpm-software-management/rpm/issues/2470

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949#issuecomment-1980957355
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-06 Thread Michael Schroeder
For reference: https://bugzilla.suse.com/show_bug.cgi?id=1220213

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949#issuecomment-1980932247
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpmbuild sometimes is killed by SIGPIPE with bad dependency generator sciptlets (Issue #2949)

2024-03-06 Thread Michael Schroeder
This is a bit of a corner case, but I just received a bug report that builds 
sometimes terminate for a specific package. It turned out the package contained 
this little gem:
```
%define __perllib_provides /bin/true
```
Anyway, I don't think rpm should be killed by this. Once upon a time 
getOutputFrom() had code that made it ignore SIGPIPE, but it seems it was 
removed in commit 375a6b5630b8e37e1d3f0c7ecbe10fe460c4d420

This is probably not urgent to fix, just filing so that you know about this 
race.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2949
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint