Skip to content

[VL] finalizeS3FileSystem is never called #11796

@JunhyungSong

Description

@JunhyungSong

Backend

VL (Velox)

Bug description

/// Teardown the AWS SDK C++.
/// Velox users need to manually invoke this before exiting an application.
/// This is because Velox uses a static object to hold the S3 FileSystem
/// instance. AWS C++ SDK library also uses static global objects in its code.
/// The order of static object destruction is not determined by the C++
/// standard.
/// This could lead to a segmentation fault during the program exit.
/// Ref https://github.com/aws/aws-sdk-cpp/issues/1550#issuecomment-1412601061
void finalizeS3FileSystem();

This is written in Velox (RegisterS3FileSystem.h). But, this is never called by Gluten. Also, shouldn't this be called when there are too many S3FileSystem created in the cache? Looks like there is no cache eviction mechanism for S3FileSystem which can be technically memory & resource leak since S3FileSystem contains S3Client.

Gluten version

No response

Spark version

None

Spark configurations

No response

System information

No response

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions