Skip to content

Merge darwin/libdispatch-890 to master #254

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

Merged
merged 3 commits into from
Jun 2, 2017

Conversation

das
Copy link
Contributor

@das das commented Jun 1, 2017

Merge tag darwin/libdispatch-890 on darwin/trunk

This includes the latest Apple source drop libdispatch-890 (up from libdispatch-806), on top of darwin/darwin-008 already merged in #252

das and others added 2 commits June 1, 2017 00:42
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <das@apple.com>
@das das requested a review from dgrove-oss June 1, 2017 08:13
@das das force-pushed the das-darwin-libdispatch-890-merge-master branch from 399235f to a21d179 Compare June 1, 2017 09:43
@das
Copy link
Contributor Author

das commented Jun 1, 2017

@swift-ci please test

// _swift_apply_current_root_queue() {
// return DISPATCH_APPLY_CURRENT_ROOT_QUEUE;
// }

Copy link
Contributor

@dgrove-oss dgrove-oss Jun 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also be taken out of src/swift/Queue.swift in the overlay? There's a silgen directive for this symbol towards the bottom of that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, good point, thanks!
fixed

Copy link
Contributor

@dgrove-oss dgrove-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a quick scan; didn't see anything that was an obvious Linux problem. Did not look at Darwin-specific files or try to deeply understand the semantics of the wlh changes.

Had one comment about src/swift/Queue.swift (removing silgen for function removed from DispatchStubs).

@das
Copy link
Contributor Author

das commented Jun 1, 2017

@dgrove-oss thanks! removed that obsolete symbol in b9b44c3

would you mind giving this branch a local sanity check on your setup? I fixed all the build errors that the CI found but it hit some weird errors that I think are unrelated but it would be good to be sure, given the size of the change and how close we are to the next 4.0 tag.

FWIW my plan is to merge master back into swift-4.0 branch after we have merged this PR

@das
Copy link
Contributor Author

das commented Jun 1, 2017

@swift-ci please test

@dgrove-oss
Copy link
Contributor

It's crashing for me on pretty much every dispatch test that uses non-overcommit queues. Here's the backtrace. I'd assume it is something relatively simple, but I might not have a chance to dig into it until later tonight. Have to leave work a bit early today.

714			DISPATCH_INTERNAL_CRASH(0, "Lingering DISPATCH_WLH_ANON");
(gdb) bt
#0  _dispatch_adopt_wlh_anon () at ./inline_internal.h:714
#1  _dispatch_mgr_thread (dq=0x7ffff7ff0fc0 <_dispatch_mgr_q>, dic=0x7ffff5d37d18, flags=196608) at source.c:2324
#2  0x00007ffff7fa3c75 in _dispatch_continuation_pop_inline (dou=..., dic=0x7ffff5d37d18, flags=196608, dq=0x7ffff7ff0f40 <_dispatch_mgr_root_queue>)
    at ./inline_internal.h:2505
#3  0x00007ffff7fafe8a in _dispatch_root_queue_drain (dq=0x7ffff7ff0f40 <_dispatch_mgr_root_queue>, pp=0) at queue.c:5710
#4  0x00007ffff7faf92d in _dispatch_worker_thread (context=0x7ffff7ff0f40 <_dispatch_mgr_root_queue>) at queue.c:5819
#5  0x00007ffff79ac6ba in start_thread (arg=0x7ffff5d38700) at pthread_create.c:333
#6  0x00007ffff76e282d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

@das
Copy link
Contributor Author

das commented Jun 1, 2017

ugh, thanks, we should be able to figure that one out by source inspection

@das
Copy link
Contributor Author

das commented Jun 2, 2017

@dgrove-oss 7de6bba should fix it, please have another go, thanks!

@das
Copy link
Contributor Author

das commented Jun 2, 2017

@swift-ci please test

@das
Copy link
Contributor Author

das commented Jun 2, 2017

looks like the CI was happy this time, so the previous failures may have been (non-obviously) a consequence of that crash

@dgrove-oss
Copy link
Contributor

Confirmed. The test suite runs cleanly for me as well.

@das
Copy link
Contributor Author

das commented Jun 2, 2017

awesome, thanks for confirming Dave!

I'll squash and merge

define WORKQ_ADDTHREADS_OPTION_OVERCOMMIT for DISPATCH_USE_INTERNAL_WORKQUEUE
remove unused _swift_dispatch_apply_current_root_queue symbol
remove duplicate _dispatch_adopt_wlh_anon() in _dispatch_mgr_thread(), this is already set by its caller _dispatch_root_queue_drain()

Signed-off-by: Daniel A. Steffen <das@apple.com>
@das das force-pushed the das-darwin-libdispatch-890-merge-master branch from 7de6bba to 835418a Compare June 2, 2017 17:43
@das das merged commit 22df1e7 into master Jun 2, 2017
das added a commit that referenced this pull request Jul 31, 2017
…aster

Merge darwin/libdispatch-890 to master

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
@das das removed the darwin pending label Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants