Random (rare) error when creating big RPM package #155

Open
opened 2026-01-29 16:30:45 +00:00 by claunia · 2 comments
Owner

Originally created by @whelpy on GitHub (Mar 19, 2025).

Building on windows server 2019.

Error happens in XZOutputSteam.Write or XZOutputSteam.Dispose, somewhere inside NativeMethods.lzma_code function call. Expected RPM size is 70MB.

Sample output is:
error MSB4018: The "RpmTask" task failed unexpectedly.
error MSB4018: System.ArgumentException: Specified preset is not supported
error MSB4018: at Packaging.Targets.IO.XZOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)

So far I successfully reproduced it in 0.1.226 and 0.1.232 versions, happens approx in 10% of all builds. I tried more newer lzma.dll (5.6.4) - no difference.

In 0.1.220 the bug didn't happen not even once so far (tried building same RPM 30 times - all fine).

So as a workaround I'm using dotnet-deb and dotnet-rpm 0.1.232, but packaging.targets.dll in nuget packages cache replaced to version 0.1.220 - it works.

Update. In 0.1.220 it happens too, just much more rare.

Originally created by @whelpy on GitHub (Mar 19, 2025). Building on windows server 2019. Error happens in XZOutputSteam.Write or XZOutputSteam.Dispose, somewhere inside NativeMethods.lzma_code function call. Expected RPM size is 70MB. Sample output is: error MSB4018: The "RpmTask" task failed unexpectedly. error MSB4018: System.ArgumentException: Specified preset is not supported error MSB4018: at Packaging.Targets.IO.XZOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count) So far I successfully reproduced it in 0.1.226 and 0.1.232 versions, happens approx in 10% of all builds. I tried more newer lzma.dll (5.6.4) - no difference. In 0.1.220 the bug didn't happen not even once so far (tried building same RPM 30 times - all fine). So as a workaround I'm using dotnet-deb and dotnet-rpm 0.1.232, but packaging.targets.dll in nuget packages cache replaced to version 0.1.220 - it works. Update. In 0.1.220 it happens too, just much more rare.
Author
Owner

@eugenelarin commented on GitHub (Apr 30, 2025):

Same experience here.

@eugenelarin commented on GitHub (Apr 30, 2025): Same experience here.
Author
Owner

@oscarh commented on GitHub (Sep 2, 2025):

I believe this is a duplicate of https://github.com/quamotion/dotnet-packaging/issues/99. I've been trying to look at this and will hopefully have updates at some point...

@oscarh commented on GitHub (Sep 2, 2025): I believe this is a duplicate of https://github.com/quamotion/dotnet-packaging/issues/99. I've been trying to look at this and will hopefully have updates at some point...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#155