Closed Bug 1984560 Opened 5 months ago Closed 5 months ago

Perma [tier 2] FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/4118' | PermissionError: [Errno 13] Permission denied: '/run/user/1000' | single tracking bug

Categories

(Firefox Build System :: Third Party Packaging, defect, P5)

defect

Tracking

(firefox-esr128 unaffected, firefox-esr140 fixed, firefox142 unaffected, firefox143 unaffected, firefox144 fixed)

RESOLVED FIXED
144 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- fixed
firefox142 --- unaffected
firefox143 --- unaffected
firefox144 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: gerard-majax)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: chorotan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=523533618&repo=autoland&task=VPF9s4N8RcOVhKxww8yhvg.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VPF9s4N8RcOVhKxww8yhvg/runs/0/artifacts/public/logs/live_backing.log


[task 2025-08-22T04:07:31.564+00:00] Creating snap package...
[task 2025-08-22T04:07:43.375+00:00] Packed firefox_144.0a1_native.snap
[task 2025-08-22T04:07:43.376+00:00] snapcraft internal error: PermissionError(13, 'Permission denied')
[task 2025-08-22T04:07:43.379+00:00] Full execution log: '/builds/worker/.local/state/snapcraft/log/snapcraft-20250822-034140.665159.log'
[task 2025-08-22T04:07:43.382+00:00] Traceback (most recent call last):
[task 2025-08-22T04:07:43.382+00:00]   File "/snap/snapcraft/current/usr/lib/python3.12/pathlib.py", line 1313, in mkdir
[task 2025-08-22T04:07:43.382+00:00]     os.mkdir(self, mode)
[task 2025-08-22T04:07:43.382+00:00] FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/4118'
[task 2025-08-22T04:07:43.382+00:00] 
[task 2025-08-22T04:07:43.382+00:00] During handling of the above exception, another exception occurred:
[task 2025-08-22T04:07:43.382+00:00] 
[task 2025-08-22T04:07:43.382+00:00] Traceback (most recent call last):
[task 2025-08-22T04:07:43.382+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/application.py", line 623, in run
[task 2025-08-22T04:07:43.382+00:00]     return_code = self._run_inner()
[task 2025-08-22T04:07:43.382+00:00]                   ^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.382+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snapcraft/application.py", line 184, in _run_inner
[task 2025-08-22T04:07:43.382+00:00]     return_code = super()._run_inner()
[task 2025-08-22T04:07:43.382+00:00]                   ^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.382+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/application.py", line 602, in _run_inner
[task 2025-08-22T04:07:43.382+00:00]     return_code = dispatcher.run() or os.EX_OK
[task 2025-08-22T04:07:43.382+00:00]                   ^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.382+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
[task 2025-08-22T04:07:43.382+00:00]     return self._loaded_command.run(self._parsed_command_args)
[task 2025-08-22T04:07:43.383+00:00]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/commands/base.py", line 200, in run
[task 2025-08-22T04:07:43.383+00:00]     result = self._run(parsed_args, **kwargs) or result
[task 2025-08-22T04:07:43.383+00:00]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snapcraft/commands/lifecycle.py", line 74, in _run
[task 2025-08-22T04:07:43.383+00:00]     super()._run(parsed_args)
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 576, in _run
[task 2025-08-22T04:07:43.383+00:00]     return self._run_real(parsed_args=parsed_args, step_name=step_name)
[task 2025-08-22T04:07:43.383+00:00]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 442, in _run_real
[task 2025-08-22T04:07:43.383+00:00]     self._services.package.write_state(artifact=artifact, resources=resources)
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/package.py", line 64, in write_state
[task 2025-08-22T04:07:43.383+00:00]     state_service = self._services.get("state")
[task 2025-08-22T04:07:43.383+00:00]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/service_factory.py", line 308, in get
[task 2025-08-22T04:07:43.383+00:00]     instance = cls(app=self.app, services=self, **kwargs)
[task 2025-08-22T04:07:43.383+00:00]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/state.py", line 73, in __init__
[task 2025-08-22T04:07:43.383+00:00]     self.__state_dir = self._get_state_dir()
[task 2025-08-22T04:07:43.383+00:00]                        ^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/state.py", line 298, in _get_state_dir
[task 2025-08-22T04:07:43.383+00:00]     state_dir = platformdirs.user_runtime_path(
[task 2025-08-22T04:07:43.383+00:00]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/platformdirs/__init__.py", line 566, in user_runtime_path
[task 2025-08-22T04:07:43.383+00:00]     ).user_runtime_path
[task 2025-08-22T04:07:43.383+00:00]       ^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/platformdirs/api.py", line 254, in user_runtime_path
[task 2025-08-22T04:07:43.383+00:00]     return Path(self.user_runtime_dir)
[task 2025-08-22T04:07:43.383+00:00]                 ^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/platformdirs/unix.py", line 185, in user_runtime_dir
[task 2025-08-22T04:07:43.383+00:00]     return self._append_app_name_and_version(path)
[task 2025-08-22T04:07:43.383+00:00]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/platformdirs/api.py", line 88, in _append_app_name_and_version
[task 2025-08-22T04:07:43.383+00:00]     self._optionally_create_directory(path)
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/platformdirs/api.py", line 93, in _optionally_create_directory
[task 2025-08-22T04:07:43.383+00:00]     Path(path).mkdir(parents=True, exist_ok=True)
[task 2025-08-22T04:07:43.383+00:00]   File "/snap/snapcraft/current/usr/lib/python3.12/pathlib.py", line 1317, in mkdir
[task 2025-08-22T04:07:43.384+00:00]     self.parent.mkdir(parents=True, exist_ok=True)
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/usr/lib/python3.12/pathlib.py", line 1313, in mkdir
[task 2025-08-22T04:07:43.384+00:00]     os.mkdir(self, mode)
[task 2025-08-22T04:07:43.384+00:00] PermissionError: [Errno 13] Permission denied: '/run/user/1000'
[task 2025-08-22T04:07:43.384+00:00] 
[task 2025-08-22T04:07:43.384+00:00] During handling of the above exception, another exception occurred:
[task 2025-08-22T04:07:43.384+00:00] 
[task 2025-08-22T04:07:43.384+00:00] Traceback (most recent call last):
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/bin/snapcraft", line 7, in <module>
[task 2025-08-22T04:07:43.384+00:00]     sys.exit(main())
[task 2025-08-22T04:07:43.384+00:00]              ^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snapcraft/application.py", line 473, in main
[task 2025-08-22T04:07:43.384+00:00]     return app.run()
[task 2025-08-22T04:07:43.384+00:00]            ^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/application.py", line 684, in run
[task 2025-08-22T04:07:43.384+00:00]     if self.services.get("config").get("debug"):
[task 2025-08-22T04:07:43.384+00:00]        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/config.py", line 189, in get
[task 2025-08-22T04:07:43.384+00:00]     value = handler.get_raw(item)
[task 2025-08-22T04:07:43.384+00:00]             ^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/craft_application/services/config.py", line 116, in get_raw
[task 2025-08-22T04:07:43.384+00:00]     return self._snap.get(snap_item)
[task 2025-08-22T04:07:43.384+00:00]            ^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snaphelpers/_conf.py", line 125, in get
[task 2025-08-22T04:07:43.384+00:00]     options = self.get_options(top_key)
[task 2025-08-22T04:07:43.384+00:00]               ^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snaphelpers/_conf.py", line 114, in get_options
[task 2025-08-22T04:07:43.384+00:00]     options.fetch()
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snaphelpers/_conf.py", line 86, in fetch
[task 2025-08-22T04:07:43.384+00:00]     self._config = self._snapctl.config_get(*self._keys)
[task 2025-08-22T04:07:43.384+00:00]                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snaphelpers/_ctl.py", line 147, in config_get
[task 2025-08-22T04:07:43.384+00:00]     conf = json.loads(self.run("get", "-d", *keys))
[task 2025-08-22T04:07:43.384+00:00]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-08-22T04:07:43.384+00:00]   File "/snap/snapcraft/current/lib/python3.12/site-packages/snaphelpers/_ctl.py", line 271, in run
[task 2025-08-22T04:07:43.384+00:00]     raise SnapCtlError(process)
[task 2025-08-22T04:07:43.384+00:00] snaphelpers._ctl.SnapCtlError: Call to snapctl failed with error 1: error: cannot communicate with server: Post "http://localhost/v2/snapctl": dial unix /run/snapd-snap.socket: connect: no such file or directory
[task 2025-08-22T04:07:43.384+00:00] 
[taskcluster 2025-08-22 04:07:55.839Z] === Task Finished ===
[taskcluster 2025-08-22 04:07:56.759Z] Unsuccessful task run with exit code: 1 completed in 1868.352 seconds
Summary: Perma [tier 2] FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/4118' | PermissionError: [Errno 13] Permission denied: '/run/user/1000' → Perma [tier 2] FileNotFoundError: [Errno 2] No such file or directory: '/run/user/1000/4118' | PermissionError: [Errno 13] Permission denied: '/run/user/1000' | single tracking bug

Done backfills up to here

Flags: needinfo?(mh+mozilla)
Keywords: regression
Regressed by: 1912605
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED

I'll try to look into that, but I'm like glandium, I dont think it's related to zstandard itself but rather the new snapcraft version. Maybe we need /run/user/1000 in the docker now? I'll try and see if I can make something.

The issue is still here ...

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

(In reply to Cristina Horotan [:chorotan] from comment #7)

Green after the backout: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&fromchange=3fa42cbd5ffe40dc7e89651e746100a1385701b3&searchStr=Linux%2CSnap%2Copt%2CSnap%2Cbuilds%2Clocal%2Cgecko%2Ccheckout%2Csnap-upstream-build-amd64-local%2Fopt%2Camd64&tochange=73c71ee025c3f20a5f0b92bf7d01949380ef02a5&selectedTaskRun=fV88iQiURKmg4wQWX5gHlQ.0

again, that's just luck because it reverted to the previous docker image where snapcraft is still 8.10.2, but any changes triggering a rebuild of docker image would fail again

Assignee: nobody → lissyx+mozillians

Confirmed by snapcraft maintainers this is an expected change and the proper fix is indeed having a directory where the state can be written. We can fix like that or they suggest we setup CRAFT_STATE_DIR=...

Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4760689feadf https://hg.mozilla.org/integration/autoland/rev/472bdea389f4 Revert "Bug 1984560 - Ensure /run/user/1000 exists and is owned for snapcraft execution r=glandium" for causing snap bustages

Backed out for causing snap bustages

Backout link

Push with failures

Failure log

(In reply to Cristina Horotan [:chorotan] from comment #16)

Backed out for causing snap bustages

Backout link

Push with failures

Failure log

It makes no sense, try was green a few days ago ...

(In reply to :gerard-majax from comment #17)

It makes no sense, try was green a few days ago ...

I've seen it happen today with my trys for bug 1984380. Maybe I should expand bug 1984380 to make the snap docker images use a snapshot too.

Flags: needinfo?(mh+mozilla)

(In reply to Mike Hommey [:glandium] from comment #18)

(In reply to :gerard-majax from comment #17)

It makes no sense, try was green a few days ago ...

I've seen it happen today with my trys for bug 1984380. Maybe I should expand bug 1984380 to make the snap docker images use a snapshot too.

You only change Ubuntu 24 image, here it is failing also on 22 ... ?

I worry else something changed somewhere and I'm going to loose my day debugging that ...

Blocks: 1985494

Someone else will have to take care of a proper fix, i've already spent too much time on that. Followup is bug 1985494

Status: REOPENED → RESOLVED
Closed: 5 months ago5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

Set release status flags based on info from the regressing bug 1912605

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: