utmapp / utmapp/UTM

Mysterious 9p bug: "pread() read only 4096 of 32768"

Open
#4,984 7 comments 2 reactions 0 assignees View on GitHub
qemu
Dominant language
Swift
Stars
35.5k
Forks
1.8k
Avg merge
5d 5h
Merged PRs (30d)
7

Description

**Describe the issue**
I use UTM for local web development. I am using Debian 11 (AArch64) and the 9p driver for folder sharing. The sharing works, but after configuring PHP and a NGINX server, I found following issue:

When I call a simple file like `http://test.test:12345/test.txt`, I could open it until its content is larger than 4096 (bytes/characters), then nothing loads and I get following error in the NGINX log: `[alert] 843#843: *145 pread() read only 4096 of 32768 from "/srv/projects/test/www/public/dist/css/app.css" while sending response to client, client: 192.168.64.1, server: test.test, request: "GET /dist/css/app.css HTTP/1.1", host: "test.test:12345"`

For the file sharing, I have following in my /etc/fstab:
`share /media/share 9p trans=virtio,version=9p2000.L,rw,_netdev,nofail 0 0`

Some say that it might have something to do with 9p. There are some issues with it. Some say it has something to do with `security_model=mapped-xattr`. But I am stupid and I have no idea what all this means.

**Configuration**
* UTM Version: Version 4.1.5 (74)
* macOS Version: 12.6.1 (21G217)
* Mac Chip (Intel, M1, ...): M1

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the reported 9p mount entry in /etc/fstab and the NGINX log showing pread() returning only 4096 bytes for a larger file. Reproduce the failure with the stated UTM, macOS, Debian AArch64, and M1 configuration; done means identifying a reproducible cause and documenting or validating a fix for large files.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, nginx, php
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.