malloc():未排序的双链接列表损坏中止(核心转储)python

malloc():未排序的双链接列表损坏中止(核心转储)python,python,python-3.x,google-api,google-drive-api,concurrent.futures,Python,Python 3.x,Google Api,Google Drive Api,Concurrent.futures,尝试使用concurrent.futures模块从google drive并行下载文件时,下面的脚本抛出malloc():未排序的双链接列表已损坏。 files = [ {"id": "2131easd232", "name": "image1.jpg"}, {"id": "2131easdfsd232", "name": "ima

尝试使用concurrent.futures模块从google drive并行下载文件时,下面的脚本抛出
malloc():未排序的双链接列表已损坏。

files = [
    {"id": "2131easd232", "name": "image1.jpg"},
    {"id": "2131easdfsd232", "name": "image2.jpg"},
    {"id": "2131ea32cesd232", "name": "image3.jpg"}
 ]

def download_file(data):
    request = drive_service.files().get_media(fileId=data['id'])
    fh = io.FileIO(data['name'], 'wb')
    downloader = MediaIoBaseDownload(fh, request)
    done = False
    while done is False:
        status, done = downloader.next_chunk()
    
with concurrent.futures.ThreadPoolExecutor() as executor:
    executor.map(download_file, files)
malloc():未排序的双链接列表损坏中止(核心转储)


脚本执行速度很快(在2秒内),只创建垃圾文件(大小为0字节的文件)。但是我可以同步下载文件而不受任何中断。

我也遇到了这个问题。我正在使用谷歌目录api。我认为解决这个问题的方法是在线程化的函数中创建服务对象

def get_user_data(useremail):
        Threadedservice = build('admin', 'directory_v1', credentials=delegated_credentials)

        userresults = Threadedservice.users().get(userKey=useremail, viewType='admin_view', fields='recoveryPhone, name(fullName)').execute()