Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Components
Assignee
Jacob Cobbett-SmithJacob Cobbett-SmithReporter
Jacob Cobbett-SmithJacob Cobbett-SmithPriority
MajorFix versions
Pull Request URL
Details
Details
Components
Assignee
Jacob Cobbett-Smith
Jacob Cobbett-SmithReporter
Jacob Cobbett-Smith
Jacob Cobbett-SmithPriority
Fix versions
Pull Request URL
Created June 13, 2018 at 12:59 PM
Updated June 27, 2018 at 1:48 PM
Resolved June 27, 2018 at 1:39 PM
Whilst loading the input of a join, if roxiemem's OOM callback mechanism calls to spill gathered rows whilst the input is finishing, it appears it can either corrupt or double free rows that are owned by the loading container and transferred to a stream used by the join. Leading to a 'Invalid pointer' error.
Extensive examination of the code hasn't revealed exactly how this can occur, but a race condition bug has been spotted which could mean that whilst spilling the rows could be transferred to the streaming output, potentially this could happen mid spill, though in the cases seen it happens during the sort phase and by the time the save is called the rows have been swapped out.
Despite this unintentional overlap and swapping of the owned rows from the loading container to a spilling stream, I can't see how this leads to a double free and the 'Invalid pointer'.
It can however, if the timing is unfortunate, lead to the spill happening, but the stream fetched appearing empty, meaning the join input could have all or some[a spills worth] of missing rows.