arseniycodes / arseniycodes/socrates

Systemic crash on DEATH TIMING

Open Beginner friendly
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
70
Forks
4
PR merge metrics
No merged PRs in 30d

Description

```
DEATH TIMING

0ms: philo 1 is thinking
0ms: philo 1 has taken a fork
0ms: philo 1 has taken a fork
0ms: philo 1 is eating
0ms: philo 3 is thinking
0ms: philo 3 has taken a fork
0ms: philo 2 is thinking
200ms: philo 1 is sleeping
200ms: philo 2 has taken a fork
200ms: philo 3 has taken a fork
200ms: philo 3 is eating
300ms: philo 1 is thinking
311ms: philo 1 died
Traceback (most recent call last):
File "/home/maplepy/git/cc/philosophers/philo/socrates/socrates.py", line 302, in
exit(socrates(args.path, args.philo))
File "/home/maplepy/git/cc/philosophers/philo/socrates/socrates.py", line 258, in socrates
test_program(f"{bin_path}/philo/philo")
File "/home/maplepy/git/cc/philosophers/philo/socrates/socrates.py", line 177, in test_program
if run_starvation_measures(binary) is False:
File "/home/maplepy/git/cc/philosophers/philo/socrates/socrates.py", line 151, in run_starvation_measures
results.append(measure_starvation_timing(binary))
File "/home/maplepy/git/cc/philosophers/philo/socrates/socrates.py", line 121, in measure_starvation_timing
start_time = int(first_line[:separator_index])
ValueError: invalid literal for int() with base 10: '0ms:'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in philo/socrates/socrates.py, especially measure_starvation_timing at the traceback location around line 121. Reproduce the DEATH TIMING output and inspect how its timestamp is parsed; done means the starvation test handles the shown timestamp format without raising ValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.