question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Processes not terminated

See original GitHub issue

BUG REPORT

High Level Description I use SMARTS for training imitation learning agents with NGSIM dataset. When training is finished, SMARTS will leave some unterminated processes.

SMARTS version 0.4.15

Steps to reproduce the bug I use the multiprocessing package to open multiple SMARTS instances for parallel sampling.

And I created each simulator using:

self.smarts = SMARTS(
    agent_interfaces={},
    traffic_sim=None,
    visdom=None,
    envision=None,
    zoo_addrs=None,
)

Resulting and expected behaviour There are multiple processes like smarts/zoo/worker.py --port xxxxx not terminated after the training stops.

Error logs and screenshots 截屏2021-06-02 11 16 23

System information

  • Operating system & Environment [Please note if using Docker]: Ubuntu 16.04
  • Python version [Please note if using Jupyter] 3.7.3
  • SUMO version 1.8.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Adaickalavancommented, Sep 16, 2021

Hi @Zbzhu99,

We have now created ParallelEnv class to simulate multiple SMARTS environments in parallel, with synchronous or asynchronous episodes, to collect observations at a faster rate.

See pull request #1087 for details.

You may consider using ParallelEnv class to run mulitple SMARTS for parallel rollouts, instead of writing your own code. We hope this new feature would be helpful and simplify your usage of SMARTS.

0reactions
Adaickalavancommented, Jul 2, 2021

Closed by pull request #924 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why the process is not terminated? - python - Stack Overflow
A Python process will end when there are no more running non-daemon threads. If you pass the daemon=True argument to threading.
Read more >
WSL2: server process not terminated on exit #699 - GitHub
In WSL2, the VS Code Server process is not terminated when the VS Code instance is closed, and it is not reused when...
Read more >
Terminating a Process - Win32 apps | Microsoft Learn
If a process is terminated by TerminateProcess, all threads of the process are terminated immediately with no chance to run additional code.
Read more >
Unable to terminate process, The operation could not be ...
At times, you may find that you are not able to kill a particular process using the Windows Task Manager, and when you...
Read more >
The Process PID xxxx could not be terminated. Access denied
Sometimes when attempting to Kill a Process in Windows you may receive the following message: “ERROR: The Process with PID xxxx could not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found