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.

Ray generating core dump on Program abort

See original GitHub issue

When program/script abort while running ray processes. It’s generating core dump. Please follow the below procedure to re-create issue @rkooo567

Underlying OS: NAME=“Red Hat Enterprise Linux Server” VERSION=“7.5 (Maipo)”

sample program to re-create issue “ray_core_dump_issue.py”

import ray
import time, datetime
import sys, os

@ray.remote
def sample_check(batch):
    print(f"Batch:{batch}")
    a=10
    b = a + a
    time.sleep(10)
    print(b)
    return


def split_proc(proc_cnt, batch_size):
    start_time = time.time()
    ray.init(dashboard_host="0.0.0.0",num_cpus=proc_cnt)
    total_batches = batch_size
    ret_ids = []
    while total_batches!=0:
        total_batches = total_batches -1
        print(f"Batch Number:{total_batches}")
        red_id= sample_check.remote( total_batches)
        ret_ids.append(red_id)
    ret = ray.get(ret_ids)
    ray.shutdown()

if __name__ == "__main__":
    split_proc(8, 12)


1) Pull the docker image
docker pull subbareddy425/python36-ray:1.0.0

2) Start the Docker container
 docker run -d -it --name ray-core-issue subbareddy425/python36-ray:1.0.0 bash

3) Exec console to docker container
  docker exec -it ray-core-issue bash
  
4) Run the python program in the directory /apps/python_scripts/

cd /apps/python_scripts/
python3 ray_core_dump_issue.py

5) it will create core dump in the current directory program ran

bash-4.2# ls -ltrh
total 52M
-rw-r----- 1 root root  649 Nov 30 19:31 ray_core_dump_issue.py
-rw------- 1 root root 153M Nov 30 19:47 core.41

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
subbareddydagumaticommented, Dec 8, 2020

Adding —ulimit -c 0 to docker run worked. No more core dumps.

2reactions
rkooo567commented, Dec 7, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to abort a driver program elegant? - Ray Core
Almost every time abort a program using Ctrl + C or kill -9 PID, it will create some very large core dump files....
Read more >
Using Ray in Python to parallelize task, get "Aborted (core ...
I've a Python program like this if __name__ == "__main__": .. for t in th: .. And I'm trying to parallelize it using...
Read more >
How to collect core dump file of a crashing program that is ...
To look for core dumps using the GUI, run the command: · To get a list of crashes on the command line, issue...
Read more >
Core dump - Wikipedia
On many operating systems, a fatal exception in a program automatically triggers a core dump. By extension, the phrase "to dump core" has...
Read more >
Ray Ruvinskiy - Re: Stack trace from core file without executable
If gdb could extract stack traces just from core files, ... Core was generated by `./test'. Program terminated with signal 6, Aborted.
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