Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-2631] URLSession crash #3934

Closed
pushkarnk opened this issue Sep 13, 2016 · 2 comments
Closed

[SR-2631] URLSession crash #3934

pushkarnk opened this issue Sep 13, 2016 · 2 comments
Assignees

Comments

@pushkarnk
Copy link
Collaborator

Previous ID SR-2631
Radar None
Original Reporter @pushkarnk
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @pushkarnk
Priority Medium

md5: 59274b0cf31701712b31415379d31d57

Issue Description:

The following code hits a Trace/breakpoint trap

import Foundation
import Dispatch

func run() {
    var request = URLRequest(url: URL(string: "http://httpstat.us/200")!)
    request.httpMethod = "GET"
    print("req: \(request.description)")
    let session = URLSession(configuration: .default)
    let task = session.dataTask(with: request) { data, response, error in
        print("response: \(response)")
    }
    task.resume()
}

run()
dispatchMain()
@pushkarnk
Copy link
Collaborator Author

Here's the back trace:

#​0  0x00007ffff7d0dacd in ?? () from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libswiftCore.so
#​1  0x00007ffff75b3459 in _TTSf4g_n___TFC10Foundation14URLSessionTaskP33_655ABFF49E18DABF12076554C1107FC416startNewTransferfT4withVS_10URLRequest_T_ ()
   from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libFoundation.so
#​2  0x00007ffff75a3864 in _TFC10Foundation14URLSessionTaskP33_655ABFF49E18DABF12076554C1107FC413performResumefT_T_ ()
   from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libFoundation.so
#​3  0x00007ffff75a37fe in _TFFFC10Foundation14URLSessionTask6resumeFT_T_U_FT_T_U_FT_T_ ()
   from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libFoundation.so
#​4  0x00007ffff7eeb8b7 in _dispatch_call_block_and_release () from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libdispatch.so
#​5  0x00007ffff7ef7d71 in _dispatch_queue_serial_drain () from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libdispatch.so
#​6  0x00007ffff7ef83b1 in _dispatch_queue_invoke () from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libdispatch.so
#​7  0x00007ffff7efa429 in _dispatch_root_queue_drain () from /root/pushkar/nsurlsession/tests/usr/lib/swift/linux/libdispatch.so
#&#8203;8  0x00007ffff7f21bf8 in overcommit_worker_main (unused=<optimized out>)
    at /root/pushkar/nsurlsession/swift-corelibs-libdispatch/libpwq/src/posix/manager.c:287
#&#8203;9  0x00007ffff6d3a6aa in start_thread (arg=0x7fffe6ffd700) at pthread_create.c:333
#&#8203;10 0x00007ffff5dc813d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

@pushkarnk
Copy link
Collaborator Author

Submitted a PR: #640

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant