View Issue Details

IDProjectCategoryView StatusLast Update
0007977Talerqtartpublic2024-04-15 21:32
ReporterFlorian Dold Assigned ToFlorian Dold  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.10Fixed in Version0.10 
Summary0007977: unfair task scheduling in QuickJS runtime
DescriptionIn the quickjs Taler runtime, tasks are sometimes not scheduled fairly. In js_os_poll, whenever there is an expired timer, the timer callback is executed, and event polling is resumed.

That means that if there is *always* a timer scheduled (for example because we're stuck in some endless async loop that schedules some callback with timout=0), some events (such as host messages) will *never* be handled.

Instead, the event handling should be made fairer. If the last polled event was a timer, other types of events should probably be considered first.

Or alternatively, all events that are ready should have their reactions executed. This must be done carefully to not mess with the GC.

TagsNo tags attached.

Activities

Florian Dold

2024-04-09 18:47

manager   ~0022176

commit dabfcf38bad195323bd98b022f3d9cc654b0ccfb (HEAD -> master, origin/master, origin/HEAD)
Author: Florian Dold <florian@dold.me>
Date: Tue Apr 9 18:46:32 2024 +0200

    avoid starvation of host message handlers

commit 6f07bb842eb622fdc786217b5e745b477c2b0b10
Author: Florian Dold <florian@dold.me>
Date: Tue Apr 9 16:53:56 2024 +0200

    event loop: attempt to handle different types of events with more fairness

Issue History

Date Modified Username Field Change
2023-11-07 13:29 Florian Dold New Issue
2023-11-07 13:29 Florian Dold Status new => assigned
2023-11-07 13:29 Florian Dold Assigned To => Florian Dold
2023-11-07 13:31 Florian Dold Description Updated
2023-11-14 01:01 Christian Grothoff Target Version 0.10 => post-1.0
2024-01-24 14:09 Florian Dold Summary unfair task scheduling => unfair task scheduling in QuickJS runtime
2024-04-09 18:47 Florian Dold Status assigned => resolved
2024-04-09 18:47 Florian Dold Resolution open => fixed
2024-04-09 18:47 Florian Dold Note Added: 0022176
2024-04-09 18:47 Florian Dold Target Version post-1.0 => 0.11
2024-04-09 20:20 Christian Grothoff Product Version => git (master)
2024-04-09 20:20 Christian Grothoff Fixed in Version => 0.10
2024-04-09 20:20 Christian Grothoff Target Version 0.11 => 0.10
2024-04-15 21:32 Christian Grothoff Status resolved => closed