Memory-sync mode still opens some files for writing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c
- Lĩnh vực
- cli, operating-systems
Hướng nghiên cứu
Start with lib/download.c around the referenced retry branch and reproduce xbps-install with -MS both with and without root, comparing the saved strace output if available. Trace why memory-sync opens x86_64-repodata.part for writing and why the failure reports both an error and “Success”; done means memory-sync avoids unnecessary writes and reports the underlying failure accurately.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When using xbps-install with flags -MS, xbps will open the db (/var/db/xbps/) in write mode if a remote repo has changed since the last real sync.
This is apparent when running the command without root, where the openat() call fails. It also seems that when run as root, the same command does not actually use the opened file, as further runs of it without root will still present the error.
Using strace, the error (which I think comes from lib/download.c) seems to be this:
openat(AT_FDCWD, "x86_64-repodata.part", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644) = -1 EACCES (Permission denied)
It is in the retry branch of that if though, so maybe there's also an error before it.
There's also a secondary bug; this failure (both sync modes without root) causes a message that both claims failure and success
ERROR: [reposync] failed to fetch file `https://privatereporedacted/x86_64-repodata': Success
[DEBUG] [rpool] `https://privatereporedacted' failed to fetch repository data: Success
(the error line is part of normal output)
I have saved the full strace output of memorysync with and without root, and rootless normal sync. I can provide those if needed but not publicly over github.
- Ngôn ngữ chính
- C
- Star
- 1.2k
- Fork
- 152
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của void-linux/xbps
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
void-linux/xbps#475 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
void-linux/xbps#701 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
void-linux/xbps#700 ·
-
xbps-query -RX repository overridesCó thể đã có người làm @outofsyncrs đã nhận 30 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
void-linux/xbps#696 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
void-linux/xbps#695 · 7 bình luận ·
Tất cả issue của void-linux/xbps
Issue tương tự
-
Feature Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openwrt/firmware-utils#82 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
FujiNetWIFI/fujinet-firmware#1849 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:http-gateway good first issue priority:low type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
crazy-goat/php-fpm-ng#870 ·
Maintainer thường phản hồi trong vòng 1 ngày