On 2024-09-04 19:39 +02, Florian Obser <flor...@openbsd.org> wrote:
> event_dispatch() in main(), frontend() and engine() returns 0.
>
> the man page says:
>
>      In order to process events, an application needs to call
>      event_dispatch().  This function only returns on error, and should
>      replace the event core of the application program.
>
> which apparently is a lie. No idea how this can happen.
>
>
> I guess we are hitting this in event_base_loop():
>
>                 if (base->event_count_active) {
>                         event_process_active(base);
>                         if (!base->event_count_active && (flags & 
> EVLOOP_ONCE))
>                                 done = 1;
>                 } else if (flags & EVLOOP_NONBLOCK)
>                         done = 1;
>

at the top of the loop are two breaks that also exit the loop and lead
to a return (0):

                /* Terminate the loop if we have been asked to */
                if (base->event_gotterm) {
                        base->event_gotterm = 0;
                        break;
                }

                if (base->event_break) {
                        base->event_break = 0;
                        break;
                }

Still no idea how any of this can happen...

> On 2024-09-04 14:44 +02, Stefan Fritsch <s...@openbsd.org> wrote:
>> Hi,
>>
>> during network driver testing I sometimes do a stress test with
>>
>> while true; do ifconfig vio0 -inet; done &
>> while true; do ifconfig vio0 inet autoconf; done &
>> while true; do ifconfig vio0 -inet6; done &
>> while true; do ifconfig vio0 inet6 autoconf; done &
>> while true; do ifconfig vio0 down; done &
>> while true; do ifconfig vio0 up; done &
>>
>> After I stop these jobs, "ifconfig vio0 autoconf" does not work any more 
>> because dhcpleased has died:
>>
>> Sep  4 14:20:39 oatest dhcpleased[19462]: bpf_send_packet: writev: Network 
>> is down
>> Sep  4 14:20:39 oatest dhcpleased[19462]: bpf_send_packet: writev: Network 
>> is down
>> Sep  4 14:20:39 oatest dhcpleased[19462]: bpf_send_packet: writev: Network 
>> is down
>> Sep  4 14:20:39 oatest dhcpleased[19462]: bpf_send_packet: writev: Network 
>> is down
>> Sep  4 14:20:40 oatest dhcpleased[19462]: bpf_send_packet: writev: Network 
>> is down
>> Sep  4 14:20:40 oatest dhcpleased[80648]: fatal in main: msgbuf_write: 
>> Broken pipe
>>
>> This is obviously not a severe bug, but slaacd survives the stress test. 
>> Maybe dhcpleased could improve its error handling, too?
>>
>> Cheers,
>> Stefan
>>
>
> -- 
> In my defence, I have been left unsupervised.
>

-- 
In my defence, I have been left unsupervised.

Reply via email to