Skip to content

Ensure correct type parameter of serialized RemoteChannel#179

Merged
DilumAluthge merged 1 commit intomasterfrom
an/remotechannelserialize
Feb 18, 2026
Merged

Ensure correct type parameter of serialized RemoteChannel#179
DilumAluthge merged 1 commit intomasterfrom
an/remotechannelserialize

Conversation

@andreasnoack
Copy link
Copy Markdown
Member

@andreasnoack andreasnoack commented Feb 14, 2026

When serializing RemoteChannels, a new zeroed RemoteChannel is constructed. However, the input type parameter might be part of an outer type parameter which can then lead to a TypeError during deserialization. The fix is just to reuse the type parameter of the input when constructing the zeroed RemoteChannel.

Fixes #178

When serializing RemoteChannels, a new zeroed RemoteChannel is
constructed. However, the input type parameter might be part of an outer
type parameter which can then lead to a TypeError during deserialization.
The fix is just to reuse the type parameter of the input when
constructing the zeroed RemoteChannel.
@andreasnoack andreasnoack force-pushed the an/remotechannelserialize branch from 303e2fe to 594f289 Compare February 14, 2026 15:28
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.34%. Comparing base (871e3d7) to head (594f289).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #179   +/-   ##
=======================================
  Coverage   79.34%   79.34%           
=======================================
  Files          10       10           
  Lines        1951     1951           
=======================================
  Hits         1548     1548           
  Misses        403      403           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DilumAluthge
Copy link
Copy Markdown
Member

DilumAluthge commented Feb 15, 2026

I'll take a closer look tomorrow. The source code change looks okay.

The tests change seems to technically remove coverage for serialize(io, ::RemoteRef), to perhaps we can refactor the tests change to cover the new case without removing coverage. EDIT: Not an issue, see discussion below.

@andreasnoack
Copy link
Copy Markdown
Member Author

Serialize works recursively so it will still call serialize on the RemoteChannel once it has processed the Dict.

@DilumAluthge
Copy link
Copy Markdown
Member

Ah, okay, in that case the changes to the tests sound fine. I'll take one last look later today, and then I'll approve and merge.

Copy link
Copy Markdown
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DilumAluthge
Copy link
Copy Markdown
Member

@JamesWrigley Are you good with me merging this?

Copy link
Copy Markdown
Member

@JamesWrigley JamesWrigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DilumAluthge DilumAluthge merged commit 6649a94 into master Feb 18, 2026
8 checks passed
@DilumAluthge DilumAluthge deleted the an/remotechannelserialize branch February 18, 2026 22:45
@DilumAluthge
Copy link
Copy Markdown
Member

This will land on Julia master in JuliaLang/julia#61073

DilumAluthge pushed a commit to JuliaParallel/DistributedNext.jl that referenced this pull request Feb 22, 2026
This is a forward-port of
JuliaLang/Distributed.jl#179
(JuliaLang/Distributed.jl@6649a94).

When serializing RemoteChannels, a new zeroed RemoteChannel is
constructed. However, the input type parameter might be part of an outer
type parameter which can then lead to a TypeError during deserialization.
The fix is just to reuse the type parameter of the input when
constructing the zeroed RemoteChannel.

(cherry picked from commit 6649a94075ff6a52ee9558db3ec4491496bf1bea)
DilumAluthge pushed a commit to JuliaParallel/DistributedNext.jl that referenced this pull request Feb 22, 2026
This is a forward-port of
JuliaLang/Distributed.jl#179
(JuliaLang/Distributed.jl@6649a94).

When serializing RemoteChannels, a new zeroed RemoteChannel is
constructed. However, the input type parameter might be part of an outer
type parameter which can then lead to a TypeError during deserialization.
The fix is just to reuse the type parameter of the input when
constructing the zeroed RemoteChannel.

(cherry picked from commit 6649a94075ff6a52ee9558db3ec4491496bf1bea)
DilumAluthge pushed a commit to JuliaParallel/DistributedNext.jl that referenced this pull request Feb 22, 2026
This is a forward-port of
JuliaLang/Distributed.jl#179
(JuliaLang/Distributed.jl@6649a94).

When serializing RemoteChannels, a new zeroed RemoteChannel is
constructed. However, the input type parameter might be part of an outer
type parameter which can then lead to a TypeError during deserialization.
The fix is just to reuse the type parameter of the input when
constructing the zeroed RemoteChannel.

(cherry picked from commit 6649a94075ff6a52ee9558db3ec4491496bf1bea)
(cherry picked from commit 2e52996)
DilumAluthge pushed a commit to JuliaParallel/DistributedNext.jl that referenced this pull request Feb 24, 2026
This is a forward-port of
JuliaLang/Distributed.jl#179
(JuliaLang/Distributed.jl@6649a94).

When serializing RemoteChannels, a new zeroed RemoteChannel is
constructed. However, the input type parameter might be part of an outer
type parameter which can then lead to a TypeError during deserialization.
The fix is just to reuse the type parameter of the input when
constructing the zeroed RemoteChannel.

(cherry picked from commit 6649a94075ff6a52ee9558db3ec4491496bf1bea)
(cherry picked from commit 2e52996)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deserialization failure for some TaskFailedExceptions

3 participants