[ 
https://issues.apache.org/jira/browse/SPARK-38659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean R. Owen updated SPARK-38659:
---------------------------------
    Priority: Minor  (was: Major)

> PySpark ResourceWarning: unclosed socket
> ----------------------------------------
>
>                 Key: SPARK-38659
>                 URL: https://issues.apache.org/jira/browse/SPARK-38659
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 3.2.1
>            Reporter: Gergely Kalmar
>            Priority: Minor
>
> Create a file called `spark.py` with the following contents:
> ```
> from pyspark.sql import SparkSession
> with SparkSession.builder.getOrCreate() as spark:
>     spark.read.csv('test.csv').collect()
> ```
> You can also create a `test.csv` file with whatever data in it. When 
> executing `python -Wall spark.py` I get the following warning:
> ```
> /usr/lib/python3.8/socket.py:740: ResourceWarning: unclosed <socket.socket 
> fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, 
> laddr=('127.0.0.1', 51344), raddr=('127.0.0.1', 39221)>
>   self._sock = None
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> ```



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to