aws / aws/sagemaker-distribution
Spark Session Started, Notebook Still Stuck: EMR Serverless Cell That Never Finishes
- Dominant language
- Shell
- Stars
- 154
- Forks
- 120
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 27
Description
### Category
Compatibility Issue
### 🐛 Describe the bug
I have an EMR Serverless PySpark setup where the initial %sm_analytics emr-serverless connect cell successfully creates a Livy session and marks it idle on the backend, but the notebook front end never receives/handles the completion properly, so the cell stays “running” and will not release to allow subsequent cells to execute. This happens in both local VS Code Jupyter and SageMaker Code Editor.
### 🐛 Describe the expected behavior
When you run the first %sm_analytics emr-serverless connect cell, the EMR Serverless / Livy side actually starts a Spark session, runs its internal test statement, and reports the session as idle and successful, but the notebook front end never cleanly receives or processes the “execution finished” signal, so it keeps that cell in a permanently running/busy state and blocks new cells from executing, even though the backend work is already complete and the Spark session is alive.
### Image Tags
3.6.1-cpu but its the same behavior with all images
Contributor guide
Research direction
Start by reproducing the %sm_analytics emr-serverless connect cell in local VS Code Jupyter and SageMaker Code Editor, then compare the backend session state with the notebook cell state. The issue names no source files or tests, so trace the completion signal from the Livy/EMR Serverless session to the notebook frontend. Done means the initial cell visibly finishes and subsequent cells can run while the Spark session remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter, python, spark, vscode
- Domain
- cloud, distributed-systems, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100