Skip to content

Conversation

@soyacz
Copy link
Contributor

@soyacz soyacz commented Apr 16, 2025

Current logic for decoding backtrace was locking db log processing for duration of getting path to scylla debug file. Also it was downloading debug file once - possibly resulting in wrong backtrace decode in upgrade tests.

Moved logic for getting debug file info to decoding queue, so it's not locking db log processing loop. Also downloading debug file to monitor node (where decoding is done) to /tmp/debug_<build_id> and skipping download if it's already there.

closes: https://github.com/scylladb/qa-tasks/issues/57

Testing

PR pre-checks (self review)

  • I added the relevant backport labels
  • I didn't leave commented-out/debugging code

Reminders

  • Add New configuration option and document them (in sdcm/sct_config.py)
  • Add unit tests to cover my changes (under unit-test/ folder)
  • Update the Readme/doc folder relevant to this change (if needed)

Current logic for decoding backtrace was locking db log processing for
duration of getting path to scylla debug file. Also it was downloading
debug file once - possibly resulting in wrong backtrace decode in upgrade
tests.

Moved logic for getting debug file info to decoding queue, so it's not
locking db log processing loop. Also downloading debug file to monitor
node (where decoding is done) to `/tmp/debug_<build_id>` and skipping
download if it's already there.

closes: scylladb/qa-tasks#57
Copy link
Contributor

@fruch fruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@soyacz
Copy link
Contributor Author

soyacz commented Apr 28, 2025

@dimakr ping

Copy link
Contributor

@dimakr dimakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

fruch added a commit to fruch/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string
soyacz pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
scylladbbot pushed a commit to scylladbbot/scylla-cluster-tests that referenced this pull request May 12, 2025
scylladb#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
vponomaryov pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
vponomaryov pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
vponomaryov pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
vponomaryov pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
vponomaryov pushed a commit that referenced this pull request May 12, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
fruch added a commit that referenced this pull request May 13, 2025
#10646 introduced some unsafe code

the when debug info doesn't it fail like the following:
```
20:58:29      raise Exception("Couldn't find scylla debug information")
20:58:29  Exception: Couldn't find scylla debug information
20:58:29
20:58:29  During handling of the above exception, another exception occurred:
20:58:29
20:58:29  Traceback (most recent call last):
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
20:58:29      self.run()
20:58:29    File "/usr/local/lib/python3.10/threading.py", line 953, in run
20:58:29      self._target(*self._args, **self._kwargs)
20:58:29    File "/home/ubuntu/scylla-cluster-tests/sdcm/cluster.py", line 1600, in decode_backtrace
20:58:29      if "is closed" in details:
20:58:29  TypeError: argument of type 'Exception' is not iterable
```

the mistake was to treat Exception as string, with turn it into a string

(cherry picked from commit c2b8ce4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants