| 22 Dec 2025 |
Ihar Hrachyshka | the traceback with enforcement
Thread 13 Crashed:
0 libsystem_kernel.dylib 0x1903409f4 os_fault_with_payload + 8
1 libsystem_kernel.dylib 0x190348964 __darwin_check_fd_set_overflow + 212
2 libglib-2.0.0.dylib 0x10790fc64 g_poll + 196
3 qemu-system-aarch64 0x104df8158 main_loop_wait + 336
4 qemu-system-aarch64 0x104750064 qemu_main_loop + 96
5 qemu-system-aarch64 0x104d2c06c qemu_default_main + 36
6 qemu-system-aarch64 0x104de5300 qemu_thread_start + 132
7 libsystem_pthread.dylib 0x190374c08 _pthread_start + 136
8 libsystem_pthread.dylib 0x19036fba8 thread_start + 8
| 16:13:33 |
Ihar Hrachyshka | also in the VM (that still runs but is not responsive) sometimes I can see klogs suggesrting hanging tasks like jbd2/vda or journald suggesting writing to disk is blocked. which is why I suspect storage. | 16:18:01 |
Randy Eckenrode | Oh, FD_SET overflow. I was thinking of the limit of number of open fds. | 16:23:34 |
Ihar Hrachyshka | ah you meant ulimit? I set it to unlimited. that's not the issue. it crashes at ~1024 (as per lsof). | 16:24:05 |
Randy Eckenrode | Does it work if you change select to pselect? | 16:28:53 |
Randy Eckenrode | The implementation implies that there’s no limit for pselect. | 16:30:05 |
Ihar Hrachyshka | qemu definitely needs to - also - poll on device files (for tap etc.) so if darwin doesn't implement it for poll(), one can't work around it without some other API. glib uses select but it has FD_SET issue. we are left with implementing it with something else, like kqueue. but...
if I poll /dev/null with kqueue I get
kevent register: Invalid argument
| 16:30:55 |
Randy Eckenrode | Or that there is a set pf Darwin extensions that removes the limit. | 16:31:59 |
Ihar Hrachyshka |
Does it work if you change select to pselect? recompiling glib with select -> pselect in g_poll?
| 16:32:54 |
Ihar Hrachyshka | *
Does it work if you change select to pselect? recompiling glib with select -> pselect in g_poll?
| 16:32:59 |
Ihar Hrachyshka | *
Does it work if you change select to pselect?
recompiling glib with select -> pselect in g_poll?
| 16:33:04 |
Randy Eckenrode | Yeah. | 16:33:38 |
Ihar Hrachyshka | I'll try later today, it's a good lead. (have to step off this for the next few). thanks a lot for engaging. :) | 16:35:11 |