Skip to content

WebServer shutdown can raise TypeError while restoring Uvicorn signal handlers #764

@manideeppranavm

Description

@manideeppranavm

Description

Description

RocketRide server shutdown/restart can raise a Uvicorn signal-handler restoration error:

Observed Stack
ai/eaas.py
  main()
  asyncio.run(run())

ai/eaas.py
  await server.serve()

ai/web/server.py
  await self.server.serve()

uvicorn/server.py
  with self.capture_signals()

uvicorn/server.py
  signal.signal(sig, handler)

python3.12/signal.py
  TypeError

TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object```

The server can restart successfully afterward, but during the restart/shutdown path is noisy with the signal exceptions.



### Steps to Reproduce

This appears during RocketRide normal server shutdown/restart, not during normal pipeline node execution.



### Expected vs Actual Behavior

Expected Behavior
Server shutdown/restart should complete cleanly without raising a signal restoration exception.

Actual Behavior
During shutdown/restart, Uvicorn attempts to restore a saved signal handler value that Python rejects because it is not SIG_IGN, SIG_DFL, or callable.

### Severity

P3 - Low (minor inconvenience)

### Platform

- [ ] Windows
- [ ] macOS
- [ ] Linux

### Version / Environment

_No response_

### Screenshots / Logs

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions