View Issue Details

IDProjectCategoryView StatusLast Update
0007977Talerqtartpublic2024-04-15 19:32
ReporterFlorian Dold Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Florian Dold

2024-04-09 16: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 ModifiedUsernameFieldChange
2023-11-07 12:29Florian DoldNew Issue
2023-11-07 12:29Florian DoldStatusnew => assigned
2023-11-07 12:29Florian DoldAssigned To => Florian Dold
2023-11-07 12:31Florian DoldDescription Updated
2023-11-14 00:01Christian GrothoffTarget Version0.10 => post-1.0
2024-01-24 13:09Florian DoldSummaryunfair task scheduling => unfair task scheduling in QuickJS runtime
2024-04-09 16:47Florian DoldStatusassigned => informing
2024-04-09 16:47Florian DoldResolutionopen => fixed
2024-04-09 16:47Florian DoldNote Added: 0022176
2024-04-09 16:47Florian DoldTarget Versionpost-1.0 => 0.11
2024-04-09 18:20Christian GrothoffProduct Version => git (master)
2024-04-09 18:20Christian GrothoffFixed in Version => 0.10
2024-04-09 18:20Christian GrothoffTarget Version0.11 => 0.10
2024-04-15 19:32Christian GrothoffStatusinforming => closed