Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

opcache_invalidate is not safe under high concurrencies

Đang mở
#134 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
laravel, php
Lĩnh vực
backend, performance

Hướng nghiên cứu

Kiểm tra src/ComponentFactory.php tại dòng 35 và xem xét issue FrankenPHP cùng reproducer được liên kết để hiểu cách opcache_invalidate được gọi trong các request. Stress-test reproducer, bao gồm cả với PostgreSQL hoặc MySQL, và xác minh rằng hành vi tạo ra không còn gây ra các lần reset opcache không an toàn hoặc lỗi hỏng bộ nhớ khi có mức độ đồng thời cao.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Volt Version

1.7.1

Laravel Version

12.10.2

PHP Version

8.4.7

Database Driver & Version

No response

Description

This issue is specifically about this line in Volt. It would be nice if it can be avoided in productive environments: https://github.com/livewire/volt/blob/0ab9d34c53f87444017270a2178250a19f3083ec/src/ComponentFactory.php#L35

This was first raised in the FrankenPHP Repo, where @robsontenorio noticed that when stress testing, the application would end up in a memory corruption after a while.

This happens due to opcache_invalidate() being called each request leading to a buildup in memory that eventually leads to an opcache_reset().

opcache_reset() is currently not really safe under concurrency (both in FPM and FrankenPHP, so I'd recommend avoiding an opcache_reset if possible in production environments.

Also when testing with the reproducer, I noticed that the path passed to opcache_invalidate was that of a Blade file (which makes it look unitended)

Steps To Reproduce

You can use the reproducer provided by @robsontenorio https://github.com/robsontenorio/paper.mary-ui.com/tree/franken-bug

It will take a while for the corruption to appear, using postgres/mysql instead of sqlite will make it happen faster.

Ngôn ngữ chính
PHP
Star
423
Fork
36
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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livewire/volt

Tất cả issue của livewire/volt

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.