python-swat icon indicating copy to clipboard operation
python-swat copied to clipboard

Segmentation Fault When Connecting To CAS With Incorrect Credentials

Open DevPhelps opened this issue 3 years ago • 1 comments

When connecting to a CAS server with a username and password, it is possible to hit a segmentation fault if the credentials are incorrect! This totally exits out of the Python program/shell. Below is an example program that I can reproduce this with. Obviously, I have removed the machine, username, and password for privacy reasons:

from swat import *
s = CAS('<machine_ip_address_or_hostname>', 5570, '<username>', '<password>')

The result of running this is Segmentation Fault (core dumped) if the credentials are incorrect.

DevPhelps avatar May 12 '21 19:05 DevPhelps

Since this is a very common way to connect which we haven't had any reported crashes on before, we may have to do some digging to find the issue (maybe an incompatible shared library?). If you can use a debugger such as gdb and run python under that. You can run your test case and when it crashes do a where.

> gdb /path/to/python
(gdb) run
>>> from swat import *; ...
*** insert crash here ***
(gdb) where

Another option might be to run python under the strace command and see where it ends.

strace -o trace.log python

If these aren't something you can try, we may have to go through SAS tech support to find a way to investigate.

kesmit13 avatar May 12 '21 20:05 kesmit13