Commit 5607fc2
committed
fix(sandbox): defer symlink resolution until container filesystem is ready
The one-shot resolve ran immediately after ProcessHandle::spawn, before
the child's mount namespace and /proc/<pid>/root/ were populated. This
caused symlink_metadata to fail with ENOENT on every binary, and the
poll loop never retried because it only reloads when the policy hash
changes on the server.
Replace the synchronous resolve with an async task that probes
/proc/<pid>/root/ with retries (10 attempts, 500ms apart, 5s total).
The child's mount namespace is typically ready within a few hundred ms.
Also inline error values into warning message strings so they appear in
default log output (not just as structured tracing fields that may be
elided), and add debug-level logs before each symlink_metadata call to
aid diagnosis.1 parent 907b9fe commit 5607fc2
2 files changed
+73
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
721 | 721 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
726 | 726 | | |
727 | | - | |
728 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
729 | 768 | | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
739 | 773 | | |
740 | | - | |
| 774 | + | |
741 | 775 | | |
742 | 776 | | |
743 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
673 | 677 | | |
674 | 678 | | |
675 | 679 | | |
| |||
678 | 682 | | |
679 | 683 | | |
680 | 684 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
689 | 690 | | |
690 | 691 | | |
691 | 692 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
698 | 697 | | |
699 | 698 | | |
700 | 699 | | |
| |||
710 | 709 | | |
711 | 710 | | |
712 | 711 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
719 | 716 | | |
720 | 717 | | |
721 | 718 | | |
| |||
740 | 737 | | |
741 | 738 | | |
742 | 739 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
| 740 | + | |
| 741 | + | |
747 | 742 | | |
748 | 743 | | |
749 | 744 | | |
| |||
0 commit comments