Skip to content

🐛 Fix error on large uploads and lacking progress print for gcsfs - #3832

Merged
Koncopd merged 2 commits into
mainfrom
fix_gcsfs_upload
Jul 30, 2026
Merged

🐛 Fix error on large uploads and lacking progress print for gcsfs#3832
Koncopd merged 2 commits into
mainfrom
fix_gcsfs_upload

Conversation

@Koncopd

@Koncopd Koncopd commented Jul 30, 2026

Copy link
Copy Markdown
Member

Related laminlabs/lamindb-setup#1375

Fixes an indefinite hang in cloud transfers on jupyter notebooks, where an upload or download would freeze while asyncio logged AssertionError: Data should not be empty from _SelectorSocketTransport._write_send around 100k times per second.

Both symptoms are one event: when the backend closes a connection mid-request, asyncio can be left with a socket writer registered for an empty write buffer, and _write_send asserts before it reaches the code that would unregister it, so the loop re-runs the failing callback forever and starves every other transfer sharing the fsspec IO loop.

The new lamindb_setup/core/_asyncio_write_spin.py installs an exception handler that unregisters the stuck writer and aborts the transport, so the interrupted request fails like a normal dropped connection and the backend retries it. It only touches selector loops and this one assertion, so everything else is unaffected.

Reported without a diagnosis in fsspec/gcsfs#604 and fsspec/s3fs#909; a surviving variant of python/cpython#115514 that still reproduces on 3.13.12.

@Koncopd
Koncopd merged commit ded2279 into main Jul 30, 2026
22 checks passed
@Koncopd
Koncopd deleted the fix_gcsfs_upload branch July 30, 2026 22:18
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.99%. Comparing base (43a1701) to head (6a3f5f5).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3832      +/-   ##
==========================================
- Coverage   91.52%   86.99%   -4.53%     
==========================================
  Files          88       88              
  Lines       15723    15734      +11     
==========================================
- Hits        14390    13688     -702     
- Misses       1333     2046     +713     
Files with missing lines Coverage Δ
lamindb/models/artifact.py 91.88% <100.00%> (-1.76%) ⬇️

... and 14 files with indirect coverage changes

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

@github-actions

Copy link
Copy Markdown

Deployment URL: https://7ffffe65.lamindb.pages.dev

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.

1 participant