Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Encountered During TMFuzz Execution #11

Open
yagol2020 opened this issue Oct 28, 2024 · 1 comment
Open

Error Encountered During TMFuzz Execution #11

yagol2020 opened this issue Oct 28, 2024 · 1 comment

Comments

@yagol2020
Copy link

Hello, thank you for contributing to this project! I encountered an error while running TMFuzz. The error message is as follows:

[-] run_test error:
Traceback (most recent call last):
  File "./fuzzer.py", line 306, in evaluation
    distance_list = cluster.calculate_distance(model, accumulated_trace_graphs)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 332, in calculate_distance
    optimal_n_clusters = calculate_optimal_clusters(pca_features)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 306, in calculate_optimal_clusters
    bic_score = compute_bic(kmeans, pca_result)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in compute_bic
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in <listcomp>
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
IndexError: index 1 is out of bounds for axis 0 with size 1

Steps:

  1. Start Docker and launch the CARLA image version 0.9.13 (using run_carla.sh).
  2. Run ./test.sh behavior 0.4 3 3600.

Can you help me resolve this issue? Thank you!

@yagol2020
Copy link
Author

more execution log is as follows:

(tmfuzz) yhw@yhw-Z790-S-DDR4:~/codes/TMfuzz/script$ docker ps
CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS          PORTS     NAMES
ba115747ac95   carlasim/carla:0.9.13   "./CarlaUE4.sh -Rend…"   10 minutes ago   Up 10 minutes             carla-yhw

(tmfuzz) yhw@yhw-Z790-S-DDR4:~/codes/TMfuzz/script$ ./test.sh behavior 0.4 3 3600
behavior
Deleted files in /tmp/fuzzerdata/yhw
../data/output/camera/ is empty. Skipping...
../data/output/errors/ is empty. Skipping...
../data/output/trace/ is empty. Skipping...
There is nothing to save now
pygame 2.3.0 (SDL 2.24.2, Python 3.7.16)
Hello from the pygame community. https://www.pygame.org/contribute.html
API: ./carla/PythonAPI/carla-0.9.13-py3.6-linux-x86_64.egg
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/carla/__init__.py
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
[info] determ seed set to: 1730076519.3396287
Using seed dir ./data/seed
Connecting to localhost:4000
 ====== Analyzing Initial Population ====== 
 ====== GA Generation 1 ====== 
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 23 1.8927481840364635
LANE INVASION: LaneInvasionEvent(frame=919, timestamp=37.732747)

[*] (BehaviorAgent) dont Reached the destination dist_to_goal= 5.823702812194824
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 237 3.589696964249015
LANE INVASION: LaneInvasionEvent(frame=3777, timestamp=145.189694)
LANE INVASION: LaneInvasionEvent(frame=3795, timestamp=145.909694)

[*] (BehaviorAgent) Reached the destination dist_to_goal= 0.29422903060913086
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 26 2.3665983541868627

[*] (BehaviorAgent) Reached the destination dist_to_goal= 1.2408286333084106
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 22 2.3122975332662463
LANE INVASION: LaneInvasionEvent(frame=277, timestamp=12.512297)
LANE INVASION: LaneInvasionEvent(frame=281, timestamp=12.672297)
LANE INVASION: LaneInvasionEvent(frame=290, timestamp=13.032297)
LANE INVASION: LaneInvasionEvent(frame=299, timestamp=13.392297)
COLLISION: vehicle.citroen.c3

[*] Collision detected: 25.72
/home/yhw/codes/TMfuzz/simulate.py:370: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  trace_graph_important = np.array(trace_graph_important)
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
/home/yhw/codes/TMfuzz/scenario.py:265: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  new_trace_graph = np.array([np.array([point[:2] for point in trace]) for trace in trace_graph])
save trace done
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
/home/yhw/codes/TMfuzz/cluster.py:305: ConvergenceWarning: Number of distinct clusters (2) found smaller than n_clusters (3). Possibly due to duplicate points in X.
  kmeans.fit(pca_result)
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: divide by zero encountered in log
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: invalid value encountered in multiply
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
/home/yhw/codes/TMfuzz/cluster.py:334: ConvergenceWarning: Number of distinct clusters (2) found smaller than n_clusters (3). Possibly due to duplicate points in X.
  kmeans = KMeans(n_clusters=optimal_n_clusters).fit(pca_features)
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 22 2.2943313848227262

[*] (BehaviorAgent) dont Reached the destination dist_to_goal= 4.105535507202148
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
/home/yhw/codes/TMfuzz/cluster.py:305: ConvergenceWarning: Number of distinct clusters (2) found smaller than n_clusters (3). Possibly due to duplicate points in X.
  kmeans.fit(pca_result)
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: divide by zero encountered in log
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: invalid value encountered in multiply
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
/home/yhw/codes/TMfuzz/cluster.py:305: ConvergenceWarning: Number of distinct clusters (2) found smaller than n_clusters (4). Possibly due to duplicate points in X.
  kmeans.fit(pca_result)
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: divide by zero encountered in log
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
/home/yhw/codes/TMfuzz/cluster.py:325: RuntimeWarning: invalid value encountered in multiply
  ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
[-] run_test error:
Traceback (most recent call last):
  File "./fuzzer.py", line 306, in evaluation
    distance_list = cluster.calculate_distance(model, accumulated_trace_graphs)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 332, in calculate_distance
    optimal_n_clusters = calculate_optimal_clusters(pca_features)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 306, in calculate_optimal_clusters
    bic_score = compute_bic(kmeans, pca_result)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in compute_bic
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in <listcomp>
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
IndexError: index 3 is out of bounds for axis 0 with size 3
Deleted files in /tmp/fuzzerdata/yhw
Copied files from ../data/output/camera/ to ../data/save/20241028085522/camera/
Copied files from ../data/output/errors/ to ../data/save/20241028085522/errors/
Copied files from ../data/output/trace/ to ../data/save/20241028085522/trace/
Saving done
pygame 2.3.0 (SDL 2.24.2, Python 3.7.16)
Hello from the pygame community. https://www.pygame.org/contribute.html
API: ./carla/PythonAPI/carla-0.9.13-py3.6-linux-x86_64.egg
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/carla/__init__.py
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
/home/yhw/anaconda3/envs/tmfuzz/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
[info] determ seed set to: 1730076925.908444
Using seed dir ./data/seed
Connecting to localhost:4000
 ====== Analyzing Initial Population ====== 
 ====== GA Generation 1 ====== 
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 24 1.8592266964260489
LANE INVASION: LaneInvasionEvent(frame=388, timestamp=16.419226)
LANE INVASION: LaneInvasionEvent(frame=397, timestamp=16.779226)
LANE INVASION: LaneInvasionEvent(frame=401, timestamp=16.939226)
LANE INVASION: LaneInvasionEvent(frame=414, timestamp=17.459226)
LANE INVASION: LaneInvasionEvent(frame=877, timestamp=35.979226)
LANE INVASION: LaneInvasionEvent(frame=895, timestamp=36.699226)
LANE INVASION: LaneInvasionEvent(frame=1316, timestamp=53.539226)
LANE INVASION: LaneInvasionEvent(frame=1529, timestamp=62.059225)
LANE INVASION: LaneInvasionEvent(frame=1547, timestamp=62.779225)

[*] (BehaviorAgent) Reached the destination dist_to_goal= 0.70563143491745
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 193 3.4405334442853928
LANE INVASION: LaneInvasionEvent(frame=2233, timestamp=85.040532)
LANE INVASION: LaneInvasionEvent(frame=2251, timestamp=85.760532)

[*] (BehaviorAgent) Reached the destination dist_to_goal= 1.5913171768188477
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 23 2.4446243189740926
LANE INVASION: LaneInvasionEvent(frame=1887, timestamp=77.004623)
LANE INVASION: LaneInvasionEvent(frame=2091, timestamp=85.164622)

[*] (BehaviorAgent) Reached the destination dist_to_goal= 1.51866614818573
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
ValueError
ValueError
fuzzer - found an error
[-]error detected. start a new cycle with a new seed
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 23 2.5964997322298586

[*] (BehaviorAgent) Reached the destination dist_to_goal= 0.3141450881958008
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
ValueError
ValueError
IndexError
IndexError
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 23 2.185606237500906

[*] (BehaviorAgent) Reached the destination dist_to_goal= 1.4694806337356567
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
ValueError
ValueError
IndexError
IndexError
IndexError
IndexError
gen	avg                                           	max                                           	min                                           
1  	[3.44339514e+00 1.37707918e-01 1.49011612e-08]	[3.44339514e+00 1.37707918e-01 1.49011612e-08]	[3.44339514e+00 1.37707918e-01 1.49011612e-08]
 ====== GA Generation 2 ====== 
timeout after 15 min
[+] spawned cautious BehaviorAgent
START DRIVING: 26 2.3233615499921143
LANE INVASION: LaneInvasionEvent(frame=2409, timestamp=97.643359)
LANE INVASION: LaneInvasionEvent(frame=2426, timestamp=98.323359)

[*] (BehaviorAgent) Reached the destination dist_to_goal= 1.741147756576538
Saving the whole front camera video Saving the whole top camera video [-] Autoware container was not killed for an unknown reason
    Trying manually
Error response from daemon: No such container: autoware-yhw
save video done
save trace done
IndexError
IndexError
IndexError
IndexError
ValueError
ValueError
IndexError
IndexError
IndexError
IndexError
IndexError
IndexError
/home/yhw/codes/TMfuzz/cluster.py:305: ConvergenceWarning: Number of distinct clusters (4) found smaller than n_clusters (5). Possibly due to duplicate points in X.
  kmeans.fit(pca_result)
[-] run_test error:
Traceback (most recent call last):
  File "./fuzzer.py", line 306, in evaluation
    distance_list = cluster.calculate_distance(model, accumulated_trace_graphs)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 332, in calculate_distance
    optimal_n_clusters = calculate_optimal_clusters(pca_features)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 306, in calculate_optimal_clusters
    bic_score = compute_bic(kmeans, pca_result)
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in compute_bic
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
  File "/home/yhw/codes/TMfuzz/cluster.py", line 325, in <listcomp>
    ((m[i] - 1) * d / 2) for i in range(k)]) - const_term
IndexError: index 4 is out of bounds for axis 0 with size 4
Deleted files in /tmp/fuzzerdata/yhw
Copied files from ../data/output/camera/ to ../data/save/20241028090719/camera/
Copied files from ../data/output/errors/ to ../data/save/20241028090719/errors/
Copied files from ../data/output/trace/ to ../data/save/20241028090719/trace/
Saving done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant