suddenly getting errors while building OCI images

Asked by Cristovao Cordeiro

All our OCI recipes are failing to build, across all architectures, with the same error:

> Failed to gather results: local variable 'fileobj' referenced before assignment

Examples:
 - https://launchpadlibrarian.net/775659161/buildlog_oci_ubuntu_focal_amd64_25.04_BUILDING.txt.gz
 - https://launchpadlibrarian.net/775750185/buildlog_oci_ubuntu_focal_s390x_24.04_BUILDING.txt.gz

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
Tushar Gupta Edit question
Last query:
Last reply:
Revision history for this message
Tushar Gupta (tushar5526) said (last edit ):
#1

Hi, thanks for bringing this up. We are taking a look.

Was there anything changed in the way these recipes are built etc?

Revision history for this message
Cristovao Cordeiro (cjdc) said :
#2

Hi. Not that I'm aware of. From the logs we can see the image is correctly build. It then appears to fail in https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/oci.py#n158.

Comparing the last successful builds with the failed ones, I see that the Docker version has changed from v24 to v26, so I wonder if the `docker save` behaves differently now, as that's the input for the "fileobj" error.

Revision history for this message
Tushar Gupta (tushar5526) said :
#3

Yes it could be that. https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/oci.py#n218 is where I think the error originates.

`fileboj` is first defined in the if block at n198. The last tar file that was processed here was "repositories". I don't think there was any error, else it would have been caught by the corresponding except block.

 The "if" block at n188 is never executed, is the "layer.tar" something that has been removed from newer docker images?

Also, why there was a change in docker version?

Revision history for this message
Cristovao Cordeiro (cjdc) said :
#4

That I'm not sure. Have the builders been updated?

Revision history for this message
Tushar Gupta (tushar5526) said :
#5

I don't think there has been update around OCI builds in a long time. Likewise nothing special was done in the last few days that could affect this.

We need to figure out what led to the change of docker version.

Were there any updates on your end in the build config etc (change in Ubuntu series or any other config)?

Revision history for this message
Tushar Gupta (tushar5526) said (last edit ):
#6

Hi, it seems there has been an update for docker in focal-updates

Revision history for this message
Cristovao Cordeiro (cjdc) said :
#7

> Were there any updates on your end in the build config etc (change in Ubuntu series or any other config)?

no changes on our end.

Revision history for this message
Cristovao Cordeiro (cjdc) said :
#8

no changes on our end.

On Wed, Feb 12, 2025 at 7:40 AM Tushar Gupta <
<email address hidden>> wrote:

> Your question #820899 on Launchpad itself changed:
> https://answers.launchpad.net/launchpad/+question/820899
>
> Tushar Gupta posted a new comment:
> I don't think there has been update around OCI builds in a long time.
> Likewise nothing special was done in the last few days that could affect
> this.
>
> We need to figure out what led to the change of docker version.
>
> Were there any updates on your end in the build config etc (change in
> Ubuntu series or any other config)?
>
> --
> You received this question notification because you asked the question.
>

--
Cristovao Cordeiro (aka Cris)

Revision history for this message
Tushar Gupta (tushar5526) said :
#9

Hi @cjdc, we identified the issue. There has been SRU update for docker.io-app package and the new version is failing the LP OCI builds. I have filed a regression report here: https://bugs.launchpad.net/ubuntu/+source/docker.io-app/+bug/2098106

Revision history for this message
Cristovao Cordeiro (cjdc) said :
#10

Thanks. AFAIU, the OCI-based output of "docker save" seems to be
intentional, so future version will preserve that behavior. It might be
good anyway to adjust the OCI recipes to accommodate this change, and
possible work with both file formats.

On Wed, Feb 12, 2025 at 4:35 PM Tushar Gupta <
<email address hidden>> wrote:

> Your question #820899 on Launchpad itself changed:
> https://answers.launchpad.net/launchpad/+question/820899
>
> Tushar Gupta posted a new comment:
> Hi @cjdc, we identified the issue. There has been SRU update for
> docker.io-app package and the new version is failing the LP OCI builds.
> I have filed a regression report here:
> https://bugs.launchpad.net/ubuntu/+source/docker.io-app/+bug/2098106
>
> --
> You received this question notification because you asked the question.
>

--
Cristovao Cordeiro (aka Cris)

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Tushar Gupta (tushar5526) said :
#12

A hotfix was added to use 20.x atm. LP needs to add support for 26.x docker versions now.

Relevant ticket: https://warthogs.atlassian.net/browse/LP-2303?atlOrigin=eyJpIjoiM2ExM2RhZGU1ZDYwNDcwNDgzNzVjYjUzMjNjMTFlMjAiLCJwIjoiaiJ9

Revision history for this message
Tushar Gupta (tushar5526) said :
#13

Added the current status of the ticket in the latest comment.

Can you help with this problem?

Provide an answer of your own, or ask Cristovao Cordeiro for more information if necessary.

To post a message you must log in.