#1679 New mock exit codes not recognized
Closed: Fixed 4 years ago by tkopecek. Opened 4 years ago by churchyard.

Apparently, mock can now exit with some new exit codes (such as 110).

That leads to Koji saying "BuildError: error building package (arch x86_64), mock exited with status 110; see root.log for more information" when in fact the error is in the build.log.

See

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/6VJWLNB5BRHC3QXXSN7EZB6YUBSLAXOK/
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/B73W5LG7QFWEAV3XL4Y23ZT56XSDJSGE/

cc @msuchy - is the 110 exit code a proper behavior to adapt to, or a bug in mock?


Dennis Gilmore comment seems relevant to me :

koji uses very simple logic in parsing mock return codes
https://pagure.io/koji/blob/master/f/builder/kojid#_544 it looks like
mock has started using different return codes and koji will need to
learn them all

Yes. However, is the new exit code expected or a bug in mock?

I believe, that our code is outdated - it is there from 2008 and counts only with exitcode '1'. I think, that it should be os.WEXITSTATUS(rv) > 0 instead of current os.WEXITSTATUS(rv) == 1 which leads to 'build.log'.

About parsing all codes - it could have some value to display basic info about 21 error codes of mock - on the other hand almost in all cases you would like to see mock's traceback, so maybe just saying it is in build.log is enough. Opinions?

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

4 years ago

Metadata Update from @tkopecek:
- Custom field Size adjusted to small (was: None)
- Issue set to the milestone: 1.19

4 years ago

Metadata Update from @tkopecek:
- Issue tagged with: bug, easyfix

4 years ago

What code would lead to root.log then?

The exit codes are documented here: https://github.com/rpm-software-management/mock/wiki#exit-codes Issues during rpmbuild (i.e. tracked in build.log) are usually exit code 10.

@msuchy So, you think, that #1682 behaviour is better "heuristic"?

Metadata Update from @dgregor:
- Issue assigned to tkopecek

4 years ago

Looks like this is still broken. Here's a build which clearly fails in build.log (due to a missing binary):

https://koji.fedoraproject.org/koji/taskinfo?taskID=39774944

Koji thinks the failure is in root.log.

Metadata Update from @kevin:
- Issue set to the milestone: None (was: 1.19)
- Issue status updated to: Open (was: Closed)

4 years ago

Problem is, that mock returns return code 1 as a fallback. So, such error can be either in root or build log. Maybe I can add third option (10 -> build.log, 1-> build.log or root.log, else root.log).

Problem is, that mock returns return code 1 as a fallback. So, such error can be either in root or build log. Maybe I can add third option (10 -> build.log, 1-> build.log or root.log, else root.log).

I agree, return 1 is build.log

I've created #1899 for 1.21 (as this one is already part of 1.19)

Metadata Update from @tkopecek:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

This still seems to be happening (see https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/23GPKHVNN5VEXQ273MHEUYEQCJ4CHOB6/) -- @adamwill suspects one of the commits is not deployed yet.

Is this issue still the right place to track it, or is this more for Koji-the-software, and I should open a new issue somewhere? Thanks!

Also curious if we can improve mock to more reliably report build.log errors.

@salimma https://pagure.io/fedora-infrastructure/issues , would be where to file issues relating to our Koji deployments. The second commit is in Koji 1.21.0 which is built and an update has gone out, but I can't tell if we're running that version, because the web UI doesn't say and I don't have enough privileges to log into the server itself and see.

If we're running 1.21.0 and still seeing the wrong message, it seems like an upstream bug. If we're just not running 1.21.0 yet, there's nothing else to do here and we need an infra ticket.

@adamwill filed a ticket asking infra to check, so it's either a quick action of "yep, we're on 1.21.0" or we can use that ticket for requesting the upgrade

https://pagure.io/fedora-infrastructure/issue/8936

nirik confirmed we have 1.20.1, and we'll get the fix with the DC move in June.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1682 Merged 4 years ago